Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a7aa47b250
!94 [sync] PR-90: 修复源码包同源异构问题
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2025-01-24 00:53:54 +00:00
fly_fzc
308d6bea43 remove the architecture judgment in the patches section
(cherry picked from commit 03c97679c8ec765dac6c99ec9b67d407a9505259)
2025-01-23 21:39:24 +08:00
openeuler-ci-bot
622b8e7b0a
!82 [sync] PR-81: Support cmake_build and cmake_install
From: @openeuler-sync-bot 
Reviewed-by: @ 
Signed-off-by: @lyn1001
2024-09-11 06:43:29 +00:00
desert-sailor
92657e120a Support cmake_build and cmake_install
(cherry picked from commit 159ee79e2bdba7dfc11bd7dcadffb4bb5f04c5aa)
2024-09-02 15:08:34 +08:00
openeuler-ci-bot
ed817531da
!79 [sync] PR-77: Add compilation options for i686. Support arrch64-ilp32 compilation.
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-07-11 07:33:15 +00:00
fly_fzc
e4f75b45e3 Add compilation options for i686. Support arrch64-ilp32 compilation.
(cherry picked from commit 15d5025664f33e53d380d908affc75a53c378f65)
2024-07-11 10:44:46 +08:00
openeuler-ci-bot
02ddb8f807
!74 [sync] PR-72: [WIP]fix cmake compile issue due to cxx standard check failed
From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-04-15 06:02:22 +00:00
tiberium
57f7ff4d67 fix cmake compile issue due to cxx standard check failed
(cherry picked from commit 83f6533e84d6ed6d66cbb605120a9660564b5c46)
2024-04-15 09:52:11 +08:00
openeuler-ci-bot
2e6d9fe88b
!62 Remove Windows_TemporaryKey.pfx
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-02-02 09:11:51 +00:00
lyn1001
58e17b0368 Remove Windows_TemporaryKey.pfx 2024-02-02 15:33:12 +08:00
6 changed files with 387 additions and 10 deletions

View File

@ -0,0 +1,238 @@
From d5d39d3adba9f68b7c2e83920230102adb172c23 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 3 Dec 2020 17:03:47 +0800
Subject: [PATCH] cmake aarch64-ilp32 support
Reference:https://build.opensuse.org/package/view_file/devel:ARM:Factory:Contrib:ILP32/cmake/aarch64-ilp32.patch?expand=1
Conflict:Contextual adaptation
---
Modules/CMakeCompilerABI.h | 5 +++++
Modules/FindGTK2.cmake | 2 ++
Modules/FindJNI.cmake | 4 ++++
Modules/FindPkgConfig.cmake | 4 ++++
Modules/GNUInstallDirs.cmake | 5 +++++
Modules/Platform/UnixPaths.cmake | 3 ++-
Source/cmFindLibraryCommand.cxx | 6 ++++++
Source/cmFindPackageCommand.cxx | 11 +++++++++++
Source/cmFindPackageCommand.h | 1 +
Source/cmMakefile.cxx | 13 +++++++++++++
Source/cmMakefile.h | 3 +++
11 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h
index 45532af..38545c9 100644
--- a/Modules/CMakeCompilerABI.h
+++ b/Modules/CMakeCompilerABI.h
@@ -24,6 +24,11 @@ const char info_sizeof_dptr[] = {
defined(__ILP32__)
# define ABI_ID "ELF X32"
+#elif defined(__ELF__) && defined(__aarch64__) && defined(__LP64__)
+# define ABI_ID "ELF LP64"
+#elif defined(__ELF__) && defined(__aarch64__) && defined(__ILP32__)
+# define ABI_ID "ELF ILP32"
+
#elif defined(__ELF__)
# define ABI_ID "ELF"
#endif
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 83091f3..9ed1f4d 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -293,9 +293,11 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
PATHS
${_gtk2_arch_dir}
/usr/local/libx32
+ /usr/local/libilp32
/usr/local/lib64
/usr/local/lib
/usr/libx32
+ /usr/libilp32
/usr/lib64
/usr/lib
/opt/gnome/include
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 3a5bd31..04fe966 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -64,6 +64,8 @@ macro(java_append_library_directories _var)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
# Subdir is "arm" for both big-endian (arm) and little-endian (armel).
set(_java_libarch "arm" "aarch32")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
+ set(_java_libarch "aarch64" "aarch64_ilp32")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
# mips* machines are bi-endian mostly so processor does not tell
# endianness of the underlying system.
@@ -216,6 +218,8 @@ set(_JNI_JAVA_DIRECTORIES_BASE
# SuSE specific paths for default JVM
/usr/lib64/jvm/java
/usr/lib64/jvm/jre
+ /usr/libilp32/jvm/java
+ /usr/libilp32/jvm/jre
)
set(_JNI_JAVA_AWT_LIBRARY_TRIES)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index bd1bc7c..4773d99 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -317,6 +317,10 @@ macro(_pkg_set_path_internal)
if(uselibx32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF X32")
list(APPEND _lib_dirs "libx32/pkgconfig")
endif()
+ get_property(uselibilp32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBILP32_PATHS)
+ if(uselibilp32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF ILP32")
+ list(APPEND _lib_dirs "libilp32/pkgconfig")
+ endif()
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_CROSSCOMPILING)
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index f95e6e2..003e8cc 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -245,6 +245,11 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
set(__LAST_LIBDIR_DEFAULT "lib64")
endif()
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
+ set(_LIBDIR_DEFAULT "libilp32")
+ if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX)
+ set(__LAST_LIBDIR_DEFAULT "libilp32")
+ endif()
endif()
endif()
endif()
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 97f744d..9acb7b3 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -60,7 +60,7 @@ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ /lib /lib32 /lib64 /libilp32 /usr/lib /usr/lib32 /usr/lib64 /usr/libilp32
)
if(CMAKE_SYSROOT_COMPILE)
@@ -90,3 +90,4 @@ unset(_cmake_sysroot_compile)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBILP32_PATHS TRUE)
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 20221b1..b73b1c1 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -70,6 +70,12 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
"FIND_LIBRARY_USE_LIBX32_PATHS")) {
this->AddArchitecturePaths("x32");
}
+ // add special 32 bit paths if this is an ilp32 compile.
+ else if (this->Makefile->PlatformIsilp32() &&
+ this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ "FIND_LIBRARY_USE_LIBILP32_PATHS")) {
+ this->AddArchitecturePaths("ilp32");
+ }
std::string const library = this->FindLibrary();
if (!library.empty()) {
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 2b11b62..deb5f1e 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -100,6 +100,7 @@ cmFindPackageCommand::cmFindPackageCommand(cmExecutionStatus& status)
this->UseLib32Paths = false;
this->UseLib64Paths = false;
this->UseLibx32Paths = false;
+ this->UseLibilp32Paths = false;
this->UseRealPath = false;
this->PolicyScope = true;
this->VersionMajor = 0;
@@ -190,6 +191,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
this->UseLibx32Paths = true;
}
+ // Lookup whether libilp32 paths should be used.
+ if (this->Makefile->PlatformIsilp32() &&
+ this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ "FIND_LIBRARY_USE_LIBILP32_PATHS")) {
+ this->UseLibilp32Paths = true;
+ }
+
// Check if User Package Registry should be disabled
// The `CMAKE_FIND_USE_PACKAGE_REGISTRY` has
// priority over the deprecated CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
@@ -2097,6 +2105,9 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
if (this->UseLibx32Paths) {
common.emplace_back("libx32");
}
+ if (this->UseLibilp32Paths) {
+ common.emplace_back("libilp32");
+ }
common.emplace_back("lib");
common.emplace_back("share");
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 85fe7b6..f254581 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -178,6 +178,7 @@ private:
bool UseLib32Paths;
bool UseLib64Paths;
bool UseLibx32Paths;
+ bool UseLibilp32Paths;
bool UseRealPath;
bool PolicyScope;
std::string LibraryArchitecture;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f143ef7..8b5aee4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2569,6 +2569,9 @@ bool cmMakefile::PlatformIs32Bit() const
if (strcmp(plat_abi, "ELF X32") == 0) {
return false;
}
+ if (strcmp(plat_abi, "ELF ILP32") == 0) {
+ return false;
+ }
}
if (const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P")) {
return atoi(sizeof_dptr) == 4;
@@ -2595,6 +2598,16 @@ bool cmMakefile::PlatformIsx32() const
return false;
}
+bool cmMakefile::PlatformIsilp32() const
+{
+ if (const char* plat_abi = this->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
+ if (strcmp(plat_abi, "ELF ILP32") == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
cmMakefile::AppleSDK cmMakefile::GetAppleSDKType() const
{
std::string sdkRoot;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 6e59494..615e291 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -511,6 +511,9 @@ public:
/** Return whether the target platform is x32. */
bool PlatformIsx32() const;
+ /** Return whether the target platform is ilp32. */
+ bool PlatformIsilp32() const;
+
/** Apple SDK Type */
enum class AppleSDK
{
--
2.23.0

View File

@ -0,0 +1,13 @@
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 02627464..4f6ccdaf 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -44,6 +44,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*warning D[0-9][0-9][0-9][0-9][^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by user flags.
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
+ # Filter out clang output warnings
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*-Wunused-command-line-argument[^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by local configuration.
string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")

View File

@ -1,3 +1,3 @@
%__cmake_provides %{_rpmconfigdir}/cmake.prov
%__cmake_requires %{_rpmconfigdir}/cmake.req
%__cmake_path ^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$
%__cmake_path ^(/usr/lib(64|ilp32)?|%{_datadir})/cmake/.*/.*(Config\.cmake|-config\.cmake)$

View File

@ -45,6 +45,8 @@ class CMakeParser:
has_module = True
if re.match(".*/usr/lib(64)?/cmake/.*", modulePath):
is_arched = True
elif re.match(".*/usr/libilp32/cmake/.*", modulePath):
is_arched = True
if has_module:
if is_arched:

View File

@ -1,8 +1,19 @@
%define debug_package %{nil}
%bcond_with bootstrap
%bcond_without ncurses
%bcond_without sphinx
%bcond_without X11_test
%ifarch aarch64_ilp32
%bcond_with cmake_gui
%bcond_with emacs
%bcond_without bootstrap
%bcond_with sphinx
%else
%bcond_without cmake_gui
%bcond_without emacs
%bcond_with bootstrap
%bcond_without sphinx
%endif
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/cmake-%{version}}
@ -11,7 +22,7 @@
Name: cmake
Version: 3.27.9
Release: 1
Release: 6
Summary: Cross-platform make system
License: BSD and MIT and zlib
URL: http://www.cmake.org
@ -22,12 +33,21 @@ Source3: cmake.attr
Source4: cmake.prov
Source5: cmake.req
Patch0: cmake-findruby.patch
%ifarch sw_64
Patch1: cmake-3.22.0-sw.patch
%endif
Patch1: cmake-3.27.9-fix-cxx-standard-check-issue.patch
Patch2: cmake-3.22.0-sw.patch
Patch3: backport-cmake-aarch64-ilp32-support.patch
BuildRequires: coreutils findutils gcc-c++ gcc-gfortran sed
BuildRequires: emacs python3-devel pkgconfig(Qt5Widgets) desktop-file-utils
%if %{with cmake_gui}
BuildRequires: pkgconfig(Qt5Widgets) desktop-file-utils
%endif
%if %{with emacs}
BuildRequires: emacs
%endif
BuildRequires: python3-devel
%if %{with X11_test}
BuildRequires: libX11-devel
%endif
@ -61,7 +81,10 @@ generation, code generation, and template instantiation.
Summary: Common data-files for cmake
Requires: cmake = %{version}-%{release} cmake-filesystem = %{version}-%{release}
Requires: cmake-rpm-macros = %{version}-%{release}
%if %{with emacs}
Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
%endif
BuildArch: noarch
@ -74,6 +97,7 @@ Summary: Directories used by CMake modules
%description filesystem
This package owns all directories used by CMake modules.
%if %{with cmake_gui}
%package gui
Summary: Qt GUI for cmake
@ -83,6 +107,7 @@ Requires: shared-mime-info
%description gui
The cmake-gui package contains the Qt based GUI for cmake.
%endif
%package rpm-macros
Summary: Common RPM macros for cmake
@ -103,7 +128,15 @@ BuildArch: noarch
Documentation for cmake.
%prep
%autosetup -n cmake-%{version}%{?versuf} -p 1
%setup -n cmake-%{version}%{?versuf}
%patch 0 -p1
%patch 1 -p1
%ifarch sw_64
%patch 2 -p1
%endif
%ifarch aarch64_ilp32
%patch 3 -p1
%endif
echo '#!%{__python3}' > %{name}.prov
echo '#!%{__python3}' > %{name}.req
@ -127,7 +160,11 @@ pushd build
%else
--sphinx-build=%{_bindir}/false \
%endif
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
--qt-gui \
%endif
%endif
;
%make_build VERBOSE=1
@ -139,11 +176,17 @@ for f in ccmake cmake cpack ctest;
do
ln -s $f %{buildroot}%{_bindir}/${f}3;
done
%if %{with emacs}
install -d %{buildroot}%{_emacs_sitelispdir}/cmake
install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
%{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/cmake/cmake-mode.el
install -d %{buildroot}%{_emacs_sitestartdir}
install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}
%else
rm -f %{buildroot}%{_emacs_sitelispdir}
%endif
install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|3|" %{buildroot}%{rpm_macros_dir}/macros.cmake
touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.cmake
@ -166,10 +209,14 @@ cp -pr %{buildroot}%{_datadir}/cmake/Help %{buildroot}%{_pkgdocdir}
cp -p Utilities/cmcppdap/LICENSE LICENSE.cppdap
cp -p Utilities/cmcppdap/NOTICE NOTICE.cppdap
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
desktop-file-install --delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/cmake-gui.desktop
%endif
install -d %{buildroot}%{_metainfodir}
%endif
find %{buildroot}%{_datadir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf
find %{buildroot}%{_datadir}/cmake -type f | sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf
@ -183,6 +230,7 @@ find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
#export NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM"
#bin/ctest -V -E "$NO_TEST" %{?_smp_mflags}
%if %{with cmake_gui}
%post gui
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/mime || :
@ -200,6 +248,7 @@ fi
%posttrans gui
update-mime-database %{_datadir}/mime &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%files -f lib_files.mf
%doc %dir %{_pkgdocdir}
@ -209,19 +258,26 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files data -f data_files.mf
%{_datadir}/aclocal/cmake.m4
%{_datadir}/bash-completion
%if %{with emacs}
%{_emacs_sitelispdir}/cmake
%{_emacs_sitelispdir}/cmake-mode.el
%{_emacs_sitestartdir}/cmake-init.el
%endif
%{_datadir}/vim/vimfiles/indent/%{name}.vim
%{_datadir}/vim/vimfiles//syntax/%{name}.vim
%{_datadir}/vim/vimfiles/syntax/%{name}.vim
%exclude %{_datadir}/cmake/Templates/Windows/Windows_TemporaryKey.pfx
%files filesystem -f data_dirs.mf -f lib_dirs.mf
%if %{with cmake_gui}
%files gui
%if 0%{?build_cross} == 0
%{_bindir}/cmake-gui
%{_datadir}/applications/cmake-gui.desktop
%{_datadir}/mime/packages
%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
%endif
%endif
%files rpm-macros
%{rpm_macros_dir}/macros.cmake
@ -236,12 +292,33 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_mandir}/man1/cpack.1.*
%{_mandir}/man1/ctest.1.*
%{_mandir}/man7/*.7.*
%if %{with cmake_gui}
%if 0%{?build_cross} == 0
%{_mandir}/man1/cmake-gui.1.*
%endif
%endif
%endif
%doc %{_pkgdocdir}
%exclude %{_pkgdocdir}/Copyright.txt
%changelog
* Thu Jan 23 2025 fuanan <fuanan3@h-partners.com> - 3.27.9-6
- remove the architecture judgment in the patches section;
- include all patches in the source package.
* Thu Aug 22 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.27.9-5
- Support %cmake_build and %cmake_install.
* Wed Jul 10 2024 fuanan <fuanan3@h-partners.com> - 3.27.9-4
- Add compilation options for i686.
- Support arrch64-ilp32 compilation.
* Fri Apr 5 2024 tiberium <jinzhe.oerv@isrc.iscas.ac.cn> 3.27.9-3
- fix cmake compile issue due to cxx standard check failed
* Fri Feb 2 2024 liyanan <liyanan61@h-partners.com> - 3.27.9-2
- Remove Windows_TemporaryKey.pfx
* Fri Jan 5 2024 liyanan <liyanan61@h-partners.com> - 3.27.9-1
- Update to 3.27.9

View File

@ -5,6 +5,8 @@
%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
%_cmake_version @@CMAKE_VERSION@@
%__cmake /usr/bin/cmake
%__ctest /usr/bin/ctest
%__cmake_builddir %{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.}
# - Set default compile flags
# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables
@ -30,7 +32,52 @@
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
%if "%{?_lib}" == "libilp32" \
-DLIB_SUFFIX=ilp32 \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON
# cmake for cmake_build and cmake_install
%cmake_conf \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS ; \
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
%__cmake \\\
%{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \\\
%{!?__cmake_in_source_build:-B "%{__cmake_builddir}"} \\\
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
%if "%{?_lib}" == "libilp32" \
-DLIB_SUFFIX=ilp32 \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON
%cmake_build \
%__cmake --build "%{__cmake_builddir}" %{?_smp_mflags} --verbose
%cmake_install \
DESTDIR="%{buildroot}" %__cmake --install "%{__cmake_builddir}"
%ctest(:-:) \
cd "%{__cmake_builddir}" \
%__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %{**} \
cd -
%cmake@@CMAKE_MAJOR_VERSION@@ %cmake
%cmake@@CMAKE_MAJOR_VERSION@@_conf %cmake_conf
%cmake@@CMAKE_MAJOR_VERSION@@_build %cmake_build
%cmake@@CMAKE_MAJOR_VERSION@@_install %cmake_install
%ctest@@CMAKE_MAJOR_VERSION@@(:-:) %ctest %{**}