From 305eda7637a5091fccbaf0da5561d3fdb2de1abe Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 26 Sep 2016 16:15:14 +0200 Subject: [PATCH 1/8] Add aarch32 to libarch for arm platform --- cmake-libarch-arm-findjni.patch | 12 ++++++++++++ cmake.spec | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 cmake-libarch-arm-findjni.patch diff --git a/cmake-libarch-arm-findjni.patch b/cmake-libarch-arm-findjni.patch new file mode 100644 index 0000000..1a93f59 --- /dev/null +++ b/cmake-libarch-arm-findjni.patch @@ -0,0 +1,12 @@ +diff -up cmake-3.6.2/Modules/FindJNI.cmake.than cmake-3.6.2/Modules/FindJNI.cmake +--- cmake-3.6.2/Modules/FindJNI.cmake.than 2016-09-26 16:07:43.486195741 +0200 ++++ cmake-3.6.2/Modules/FindJNI.cmake 2016-09-26 16:08:53.239573692 +0200 +@@ -53,7 +53,7 @@ macro(java_append_library_directories _v + set(_java_libarch "alpha") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + # Subdir is "arm" for both big-endian (arm) and little-endian (armel). +- set(_java_libarch "arm") ++ set(_java_libarch "arm" "aarch32") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") + # mips* machines are bi-endian mostly so processor does not tell + # endianess of the underlying system. diff --git a/cmake.spec b/cmake.spec index 3fc87a9..feb9e58 100644 --- a/cmake.spec +++ b/cmake.spec @@ -43,7 +43,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -66,7 +66,8 @@ Source4: %{name}.prov Patch2: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora Patch3: %{name}-fedora-flag_release.patch - +# add extra aarch32 to libarch for arm platform +Patch4: %{name}-libarch-arm-findjni.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} Patch1000: %{name}-rename.patch @@ -392,6 +393,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Mon Sep 26 2016 Than Ngo - 3.6.2-3 +- Add aarch32 to libarch for arm platform + * Mon Sep 12 2016 Orion Poplawski - 3.6.2-2 - Provide the major version cmakeX name From 4f3147d1f4c0d5fea1c5df8c9459fa71d9611f18 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 26 Sep 2016 16:15:51 +0200 Subject: [PATCH 2/8] apply the patch --- cmake.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake.spec b/cmake.spec index feb9e58..3107acd 100644 --- a/cmake.spec +++ b/cmake.spec @@ -178,6 +178,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. # We cannot use backups with patches to Modules as they end up being installed %patch2 -p1 %patch3 -p1 +%patch4 -p1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov From 3c531e141a9a3a64ee182e55f38a8296add97f8d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 26 Sep 2016 21:48:50 -0600 Subject: [PATCH 3/8] Add upstream patch for Qt5 QFileDialog usage --- cmake.git-48624b3c.patch | 32 ++++++++++++++++++++++++++++++++ cmake.spec | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 cmake.git-48624b3c.patch diff --git a/cmake.git-48624b3c.patch b/cmake.git-48624b3c.patch new file mode 100644 index 0000000..c3d1698 --- /dev/null +++ b/cmake.git-48624b3c.patch @@ -0,0 +1,32 @@ +From 48624b3cb85a6e1854eff0ef45996ef75b5aa9e9 Mon Sep 17 00:00:00 2001 +From: Clinton Stimpson +Date: Thu, 22 Sep 2016 13:13:38 -0600 +Subject: [PATCH] cmake-gui: Do not remove library paths for Qt5 plugins. + +Not removing library paths is necessary for QFileDialog to function correctly +on Linux when using Qt5. +--- + Source/QtDialog/CMakeSetup.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx +index c849d52..61c4d7b 100644 +--- a/Source/QtDialog/CMakeSetup.cxx ++++ b/Source/QtDialog/CMakeSetup.cxx +@@ -101,11 +101,13 @@ int main(int argc, char** argv) + QTextCodec::setCodecForLocale(utf8_codec); + #endif + ++#if QT_VERSION < 0x050000 + // clean out standard Qt paths for plugins, which we don't use anyway + // when creating Mac bundles, it potentially causes problems + foreach (QString p, QApplication::libraryPaths()) { + QApplication::removeLibraryPath(p); + } ++#endif + + // tell the cmake library where cmake is + QDir cmExecDir(QApplication::applicationDirPath()); +-- +1.7.10.4 + diff --git a/cmake.spec b/cmake.spec index 3107acd..9651cea 100644 --- a/cmake.spec +++ b/cmake.spec @@ -60,6 +60,9 @@ Source2: macros.%{name} Source3: %{name}.attr Source4: %{name}.prov +# Upstream patch to fix cmake-gui with Qt5 +# https://cmake.org/gitweb?p=cmake.git;a=commit;h=48624b3c +Patch0: cmake.git-48624b3c.patch # Patch to fix RindRuby vendor settings # http://public.kitware.com/Bug/view.php?id=12965 # https://bugzilla.redhat.com/show_bug.cgi?id=822796 @@ -166,6 +169,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. %prep %setup -qn %{orig_name}-%{version}%{?rcver:-%rcver} +%patch0 -p1 # Apply renaming on EPEL before all other patches %if 0%{?name_suffix:1} @@ -394,6 +398,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Mon Sep 26 2016 Orion Poplawski - 3.6.2-4 +- Add upstream patch for Qt5 QFileDialog usage + * Mon Sep 26 2016 Than Ngo - 3.6.2-3 - Add aarch32 to libarch for arm platform From a297e21a366302efe28257fbef9a07c866ef59c2 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 26 Sep 2016 21:49:38 -0600 Subject: [PATCH 4/8] Bump release --- cmake.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake.spec b/cmake.spec index 9651cea..48534bf 100644 --- a/cmake.spec +++ b/cmake.spec @@ -43,7 +43,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Cross-platform make system # most sources are BSD From 82b4873ab4e8b553f6dd0b93cb6d458bdde0d14f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Sep 2016 15:48:37 +0100 Subject: [PATCH 5/8] Backport upstream RISC-V support. This is a trivial backport of an upstream patch: https://gitlab.kitware.com/utils/kwiml/commit/12f000d5b7b4c8394b16282da50126bccd4d4819 --- cmake-3.6.1-riscv.patch | 15 +++++++++++++++ cmake.spec | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 cmake-3.6.1-riscv.patch diff --git a/cmake-3.6.1-riscv.patch b/cmake-3.6.1-riscv.patch new file mode 100644 index 0000000..3a10ed6 --- /dev/null +++ b/cmake-3.6.1-riscv.patch @@ -0,0 +1,15 @@ +diff -ur cmake-3.6.1.old/Utilities/KWIML/include/kwiml/abi.h cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml/abi.h +--- cmake-3.6.1.old/Utilities/KWIML/include/kwiml/abi.h 2016-07-22 14:50:23.000000000 +0100 ++++ cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml/abi.h 2016-09-07 17:59:15.929447366 +0100 +@@ -467,6 +467,10 @@ + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." +Only in cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml: abi.h~ diff --git a/cmake.spec b/cmake.spec index 48534bf..5e4740d 100644 --- a/cmake.spec +++ b/cmake.spec @@ -71,6 +71,11 @@ Patch2: %{name}-findruby.patch Patch3: %{name}-fedora-flag_release.patch # add extra aarch32 to libarch for arm platform Patch4: %{name}-libarch-arm-findjni.patch + +# Upstream patch which adds RISC-V support. +# https://gitlab.kitware.com/utils/kwiml/commit/12f000d5b7b4c8394b16282da50126bccd4d4819 +Patch5: %{name}-3.6.1-riscv.patch + # Patch for renaming on EPEL %if 0%{?name_suffix:1} Patch1000: %{name}-rename.patch @@ -183,6 +188,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov From 01775a1307d3cd0809dd9dc1620325fe6dd15ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 23 Aug 2016 14:48:19 +0200 Subject: [PATCH 6/8] add compatibility for el6 --- cmake.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake.spec b/cmake.spec index 5e4740d..2b02186 100644 --- a/cmake.spec +++ b/cmake.spec @@ -314,10 +314,16 @@ EOF %check +%if 0%{?rhel} && 0%{?rhel} <= 6 +mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled +%endif pushd build #CMake.FileDownload, and CTestTestUpload require internet access bin/ctest%{?name_suffix} -V -E 'CMake.FileDownload|CTestTestUpload' %{?_smp_mflags} popd +%if 0%{?rhel} && 0%{?rhel} <= 6 +mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake +%endif %if %{with gui} From 23958a5bb48410385ca7f8d1f264c8792b86652c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 3 Oct 2016 05:47:26 +0200 Subject: [PATCH 7/8] Rebuilt for libjsoncpp.so.11 --- cmake.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake.spec b/cmake.spec index 2b02186..b58ddd2 100644 --- a/cmake.spec +++ b/cmake.spec @@ -43,7 +43,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -410,6 +410,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Mon Oct 03 2016 Björn Esser - 3.6.2-5 +- Rebuilt for libjsoncpp.so.11 + * Mon Sep 26 2016 Orion Poplawski - 3.6.2-4 - Add upstream patch for Qt5 QFileDialog usage From 62d0f3cc323a88d7f1950c8079f5b11408379733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 3 Oct 2016 06:49:49 +0200 Subject: [PATCH 8/8] Bootstrap without gui, due inter-circular dependency in qt5-rpm-macros --- cmake.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake.spec b/cmake.spec index b58ddd2..c0773e6 100644 --- a/cmake.spec +++ b/cmake.spec @@ -3,7 +3,7 @@ %bcond_with bootstrap # Set to bcond_with or use --without gui to disable qt4 gui build -%bcond_without gui +%bcond_with gui # Setting the Python-version used by default %if 0%{?rhel} && 0%{?rhel} < 8 @@ -412,6 +412,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog * Mon Oct 03 2016 Björn Esser - 3.6.2-5 - Rebuilt for libjsoncpp.so.11 +- Bootstrap without gui, due inter-circular dependency in qt5-rpm-macros * Mon Sep 26 2016 Orion Poplawski - 3.6.2-4 - Add upstream patch for Qt5 QFileDialog usage