From a0b02935443311765bb1201e867dbd18588bf330971055e055b67e45086eb9a9 Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Wed, 3 Jan 2018 12:25:52 +0000 Subject: [PATCH 1/4] Accepting request 561327 from openSUSE:Factory:Staging:O - switch to python3-base for requirements - switch to python3 for cmake.prov OBS-URL: https://build.opensuse.org/request/show/561327 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=307 --- cmake.changes | 6 ++++++ cmake.prov | 2 +- cmake.spec | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake.changes b/cmake.changes index 8e12837..e6a37dd 100644 --- a/cmake.changes +++ b/cmake.changes @@ -26,6 +26,12 @@ Tue Nov 28 21:46:30 UTC 2017 - foss@grueninger.de full changelog: https://cmake.org/cmake/help/v3.10/release/3.10.html - update form.patch +------------------------------------------------------------------- +Tue Nov 7 15:36:19 UTC 2017 - jmatejek@suse.com + +- switch to python3-base for requirements +- switch to python3 for cmake.prov + ------------------------------------------------------------------- Fri Nov 3 14:29:04 UTC 2017 - aavindraa@gmail.com diff --git a/cmake.prov b/cmake.prov index 1156923..b0d0092 100644 --- a/cmake.prov +++ b/cmake.prov @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding:utf-8 -*- # # Copyright (C) 2015 Daniel Vrátil diff --git a/cmake.spec b/cmake.spec index ab4729b..1480777 100644 --- a/cmake.spec +++ b/cmake.spec @@ -66,7 +66,7 @@ BuildRequires: zlib-devel BuildRequires: pkgconfig(liblzma) Requires: make # bnc#953842 - A python file is shipped so require python base so it can be run. -Requires: python-base +Requires: python3-base Recommends: cmake-mans BuildRoot: %{_tmppath}/%{name}-%{version}-build From 14f07e784ce91e875b3e630c4f36ba8b09381c57ac028b5af169285c5cbbd867 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 4 Jan 2018 08:08:42 +0000 Subject: [PATCH 2/4] Accepting request 561555 from home:X0F - Add cmake-3.10.1_boost-1.66.patch to fix detection of Boost 1.66 (fixes boo#1074314 among other boost-dependant cmake-users) OBS-URL: https://build.opensuse.org/request/show/561555 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=308 --- cmake-3.10.1_boost-1.66.patch | 237 ++++++++++++++++++++++++++++++++++ cmake-gui.spec | 2 +- cmake.changes | 6 + cmake.spec | 4 +- 4 files changed, 247 insertions(+), 2 deletions(-) create mode 100644 cmake-3.10.1_boost-1.66.patch diff --git a/cmake-3.10.1_boost-1.66.patch b/cmake-3.10.1_boost-1.66.patch new file mode 100644 index 0000000..ce065c8 --- /dev/null +++ b/cmake-3.10.1_boost-1.66.patch @@ -0,0 +1,237 @@ +diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake +index 88d14ab..5db15a5 100644 +--- a/Modules/FindBoost.cmake ++++ b/Modules/FindBoost.cmake +@@ -797,9 +797,8 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + endif() +- if(NOT Boost_VERSION VERSION_LESS 106600) ++ if(NOT Boost_VERSION VERSION_LESS 106700) + message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets") +- set(_Boost_IMPORTED_TARGETS FALSE) + endif() + endif() + +@@ -831,8 +830,8 @@ function(_Boost_COMPONENT_HEADERS component _hdrs) + set(_Boost_CONTAINER_HEADERS "boost/container/container_fwd.hpp") + set(_Boost_CONTEXT_HEADERS "boost/context/all.hpp") + set(_Boost_COROUTINE_HEADERS "boost/coroutine/all.hpp") +- set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp") + set(_Boost_DATE_TIME_HEADERS "boost/date_time/date.hpp") ++ set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp") + set(_Boost_FIBER_HEADERS "boost/fiber/all.hpp") + set(_Boost_FILESYSTEM_HEADERS "boost/filesystem/path.hpp") + set(_Boost_GRAPH_HEADERS "boost/graph/adjacency_list.hpp") +@@ -931,8 +930,8 @@ endfunction() + # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`. + # + function(_Boost_COMPILER_FEATURES component _ret) +- # Boost >= 1.62 and < 1.65 +- if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500) ++ # Boost >= 1.62 and < 1.67 ++ if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700) + set(_Boost_FIBER_COMPILER_FEATURES + cxx_alias_templates + cxx_auto_type +@@ -951,6 +950,13 @@ function(_Boost_COMPILER_FEATURES component _ret) + set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE) + endfunction() + ++# Architecture name will be useful for finding library names starting 1.66.0 ++if(CMAKE_SIZEOF_VOID_P EQUAL 8) ++ set(_arch_suffix 64) ++else() ++ set(_arch_suffix 32) ++endif() ++ + # + # Update library search directory hint variable with paths used by prebuilt boost binaries. + # +@@ -961,11 +967,7 @@ endfunction() + # + function(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) + if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- set(_arch_suffix 64) +- else() +- set(_arch_suffix 32) +- endif() ++ + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0) +@@ -1038,7 +1040,7 @@ else() + # _Boost_COMPONENT_HEADERS. See the instructions at the top of + # _Boost_COMPONENT_DEPENDENCIES. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} +- "1.65.1" "1.65.0" "1.65" ++ "1.65.1" "1.65.0" "1.65" "1.66.1" "1.66.0" "1.66" + "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" + "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" +@@ -1616,10 +1618,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + unset(_boost_RELEASE_NAMES) + foreach(compiler IN LISTS _boost_COMPILER) + list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ) + endforeach() + list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) +@@ -1627,10 +1631,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") + foreach(compiler IN LISTS _boost_COMPILER) + list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) + endforeach() + list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) + endif() +@@ -1666,10 +1672,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + unset(_boost_DEBUG_NAMES) + foreach(compiler IN LISTS _boost_COMPILER) + list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} ) + endforeach() + list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED} +@@ -1678,10 +1686,12 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") + foreach(compiler IN LISTS _boost_COMPILER) + list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) + endforeach() + list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-x${_arch_suffix}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) + endif() +diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake +index 76afa8a..a854516 100644 +--- a/Modules/FindPkgConfig.cmake ++++ b/Modules/FindPkgConfig.cmake +@@ -187,10 +187,10 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat + # set the options that are used as long as the .pc file does not provide a library + # path to look into + if(_no_cmake_path) +- set(_find_opts "NO_CMAKE_PATH") ++ list(APPEND _find_opts "NO_CMAKE_PATH") + endif() + if(_no_cmake_environment_path) +- string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH") ++ list(APPEND _find_opts "NO_CMAKE_ENVIRONMENT_PATH") + endif() + + unset(_search_paths) +@@ -454,7 +454,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) + + if (_imp_target) +- _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) ++ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) + endif() + endif() + +@@ -597,7 +597,7 @@ macro(pkg_check_modules _prefix _module0) + _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}") + endif() + elseif (${_prefix}_FOUND AND ${_imp_target}) +- _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) ++ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) + endif() + endmacro() + +@@ -648,7 +648,7 @@ macro(pkg_search_module _prefix _module0) + + _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) + elseif (${_prefix}_FOUND AND ${_imp_target}) +- _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path) ++ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path}) + endif() + endmacro() + +diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +index 00cbb7b..606b1df 100644 +--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake ++++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +@@ -24,3 +24,64 @@ if (NCURSES_FOUND) + else () + message(STATUS "skipping test; ncurses not found") + endif () ++ ++ ++# Setup for the remaining package tests below ++set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH) ++set(fakePkgDir ${CMAKE_CURRENT_BINARY_DIR}/pc-fakepackage) ++foreach(i 1 2) ++ set(pname cmakeinternalfakepackage${i}) ++ file(WRITE ${fakePkgDir}/lib/lib${pname}.a "") ++ file(WRITE ${fakePkgDir}/lib/${pname}.lib "") ++ file(WRITE ${fakePkgDir}/lib/pkgconfig/${pname}.pc ++"Name: CMakeInternalFakePackage${i} ++Description: Dummy package (${i}) for FindPkgConfig IMPORTED_TARGET test ++Version: 1.2.3 ++Libs: -l${pname} ++") ++endforeach() ++ ++# Always find the .pc file in the calls further below so that we can test that ++# the import target find_library() calls handle the NO...PATH options correctly ++set(ENV{PKG_CONFIG_PATH} ${fakePkgDir}/lib/pkgconfig) ++ ++# Confirm correct behavior of NO_CMAKE_PATH, ensuring we only find the library ++# for the imported target if we have both set CMAKE_PREFIX_PATH and have not ++# given the NO_CMAKE_PATH option ++unset(CMAKE_PREFIX_PATH) ++unset(ENV{CMAKE_PREFIX_PATH}) ++pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET cmakeinternalfakepackage1) ++if (TARGET PkgConfig::FakePackage1) ++ message(FATAL_ERROR "Have import target for fake package 1 with no path prefix") ++endif() ++ ++set(CMAKE_PREFIX_PATH ${fakePkgDir}) ++pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET NO_CMAKE_PATH cmakeinternalfakepackage1) ++if (TARGET PkgConfig::FakePackage1) ++ message(FATAL_ERROR "Have import target for fake package 1 with ignored cmake path") ++endif() ++ ++pkg_check_modules(FakePackage1 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage1) ++if (NOT TARGET PkgConfig::FakePackage1) ++ message(FATAL_ERROR "No import target for fake package 1 with prefix path") ++endif() ++ ++# And now do the same for the NO_CMAKE_ENVIRONMENT_PATH - ENV{CMAKE_PREFIX_PATH} ++# combination ++unset(CMAKE_PREFIX_PATH) ++unset(ENV{CMAKE_PREFIX_PATH}) ++pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET cmakeinternalfakepackage2) ++if (TARGET PkgConfig::FakePackage2) ++ message(FATAL_ERROR "Have import target for fake package 2 with no path prefix") ++endif() ++ ++set(ENV{CMAKE_PREFIX_PATH} ${fakePkgDir}) ++pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET NO_CMAKE_ENVIRONMENT_PATH cmakeinternalfakepackage2) ++if (TARGET PkgConfig::FakePackage2) ++ message(FATAL_ERROR "Have import target for fake package 2 with ignored cmake path") ++endif() ++ ++pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage2) ++if (NOT TARGET PkgConfig::FakePackage2) ++ message(FATAL_ERROR "No import target for fake package 2 with prefix path") ++endif() diff --git a/cmake-gui.spec b/cmake-gui.spec index eb29d93..f8e17dd 100644 --- a/cmake-gui.spec +++ b/cmake-gui.spec @@ -1,7 +1,7 @@ # # spec file for package cmake-gui # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/cmake.changes b/cmake.changes index e6a37dd..77f5002 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 3 22:06:52 UTC 2018 - virtuousfox@gmail.com + +- Add cmake-3.10.1_boost-1.66.patch to fix detection of Boost 1.66 + (fixes boo#1074314 among other boost-dependant cmake-users) + ------------------------------------------------------------------- Sat Dec 16 07:16:40 UTC 2017 - foss@grueninger.de diff --git a/cmake.spec b/cmake.spec index 1480777..80ab649 100644 --- a/cmake.spec +++ b/cmake.spec @@ -1,7 +1,7 @@ # # spec file for package cmake # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -37,6 +37,7 @@ Patch2: cmake-fix-ruby-test.patch Patch4: form.patch # PATCH-FIX-UPSTREAM system-libs.patch -- allow choosing between bundled and system jsoncpp & form libs Patch5: system-libs.patch +Patch6: cmake-3.10.1_boost-1.66.patch %if 0%{?suse_version} >= 1330 BuildRequires: libcurl-mini-devel %else @@ -81,6 +82,7 @@ echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOU %patch2 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build export CFLAGS="%{optflags}" From 5032e1818c9fbb619510f6d9ffe6bbfb7671fe8141286e8ca50b54ac1dcef2c0 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 4 Jan 2018 12:34:02 +0000 Subject: [PATCH 3/4] Accepting request 561593 from home:scarabeus_iv:branches:devel:tools:building - Do not add no-undefined on module linking, should reduce us a bit of redefining as most modules dynamically load stuff OBS-URL: https://build.opensuse.org/request/show/561593 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=309 --- cmake.changes | 6 ++++++ cmake.macros | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake.changes b/cmake.changes index 77f5002..5648838 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 4 11:09:29 UTC 2018 - tchvatal@suse.com + +- Do not add no-undefined on module linking, should reduce us a bit + of redefining as most modules dynamically load stuff + ------------------------------------------------------------------- Wed Jan 3 22:06:52 UTC 2018 - virtuousfox@gmail.com diff --git a/cmake.macros b/cmake.macros index 138b7cc..681c8a6 100644 --- a/cmake.macros +++ b/cmake.macros @@ -29,7 +29,7 @@ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\ -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \\\ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\ %if "%{?_lib}" == "lib64" \ -DLIB_SUFFIX=64 \\\ From 79eab23e07426cbc6a206c372bd0e00eb0673c3d899a997328bcfe7e3dfb95ae Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Fri, 5 Jan 2018 00:49:45 +0000 Subject: [PATCH 4/4] Accepting request 561776 from home:simotek:branches:devel:tools - Add feature-suse-python-interp-search-order.patch to make sure that python3 is found before python2 - switch to using %autopatch OBS-URL: https://build.opensuse.org/request/show/561776 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=310 --- cmake.changes | 7 +++++++ cmake.spec | 7 +++---- feature-suse-python-interp-search-order.patch | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 feature-suse-python-interp-search-order.patch diff --git a/cmake.changes b/cmake.changes index 5648838..173b192 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 4 11:42:59 UTC 2018 - sflees@suse.de + +- Add feature-suse-python-interp-search-order.patch to make sure + that python3 is found before python2 +- switch to using %autopatch + ------------------------------------------------------------------- Thu Jan 4 11:09:29 UTC 2018 - tchvatal@suse.com diff --git a/cmake.spec b/cmake.spec index 80ab649..ebfdcd6 100644 --- a/cmake.spec +++ b/cmake.spec @@ -38,6 +38,8 @@ Patch4: form.patch # PATCH-FIX-UPSTREAM system-libs.patch -- allow choosing between bundled and system jsoncpp & form libs Patch5: system-libs.patch Patch6: cmake-3.10.1_boost-1.66.patch +# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice +Patch7: feature-suse-python-interp-search-order.patch %if 0%{?suse_version} >= 1330 BuildRequires: libcurl-mini-devel %else @@ -79,10 +81,7 @@ CMake is a cross-platform, open-source build system # Verify hashes in that file against source tarball. echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURCE0}" | sha256sum -c %setup -q -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%autopatch -p1 %build export CFLAGS="%{optflags}" diff --git a/feature-suse-python-interp-search-order.patch b/feature-suse-python-interp-search-order.patch new file mode 100644 index 0000000..4c3d291 --- /dev/null +++ b/feature-suse-python-interp-search-order.patch @@ -0,0 +1,16 @@ +Index: cmake-3.10.1/Modules/FindPythonInterp.cmake +=================================================================== +--- cmake-3.10.1.orig/Modules/FindPythonInterp.cmake ++++ cmake-3.10.1/Modules/FindPythonInterp.cmake +@@ -78,8 +78,9 @@ if(DEFINED PYTHONLIBS_VERSION_STRING) + list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR) + list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR}) + endif() +-# Search for the current active python version first +-list(APPEND _Python_VERSIONS ";") ++ ++# Search python versions from newest to oldest as python3 is the default and ++# /usr/bin/python doesn't mean the systemd on SUSE / openSUSE systems + list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) + + unset(_PYTHON_FIND_OTHER_VERSIONS)