diff options
author | hans <hans@pkgsrc.org> | 2012-02-16 18:32:25 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2012-02-16 18:32:25 +0000 |
commit | 62226ae91c82e27dec3e650c58a85d53d93c5929 (patch) | |
tree | c8da5adc2a7323b28cefe78da72f05a57508c3ce /devel/cmake | |
parent | 8c3319c5713ec7933749010e7e1401331dbb2406 (diff) | |
download | pkgsrc-62226ae91c82e27dec3e650c58a85d53d93c5929.tar.gz |
Fix two problems observed on SunOS:
- don't try to find a python executable when running for pkgsrc
- use g++ instead of gcc for linking c++ libraries, patch from
http://public.kitware.com/pipermail/cmake/2011-July/045300.html
Diffstat (limited to 'devel/cmake')
-rw-r--r-- | devel/cmake/distinfo | 5 | ||||
-rw-r--r-- | devel/cmake/patches/patch-Modules_Platform_SunOS.cmake | 34 | ||||
-rw-r--r-- | devel/cmake/patches/patch-ab | 14 |
3 files changed, 46 insertions, 7 deletions
diff --git a/devel/cmake/distinfo b/devel/cmake/distinfo index 8ba3186cc49..fb5b860e0b2 100644 --- a/devel/cmake/distinfo +++ b/devel/cmake/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.35 2012/01/08 17:44:23 adam Exp $ +$NetBSD: distinfo,v 1.36 2012/02/16 18:32:25 hans Exp $ SHA1 (cmake-2.8.7.tar.gz) = d206182b454f4d1ddeb0f11d7d1be8a66e5c2464 RMD160 (cmake-2.8.7.tar.gz) = 13b188e75152feef4e5692807e3a9e7c34b26fe3 Size (cmake-2.8.7.tar.gz) = 5667409 bytes SHA1 (patch-Modules_FindX11.cmake) = a75a6834a376a51a314989b9996a5208cc0682ab +SHA1 (patch-Modules_Platform_SunOS.cmake) = a873f937568744208fec90f80ebb67ca3150b49a SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = 4e8cef0eab2ad8cb27cd7076e077bb5e7425a95c SHA1 (patch-aa) = 1af37a3f7bd8423785acff80d7b89c75018e5cab -SHA1 (patch-ab) = ef595be6f88f74622d1ef0d850a626882bf9c80a +SHA1 (patch-ab) = 85b3bf0d51d5235f57195c82fb3888d08b3d4099 SHA1 (patch-ac) = 1f11e98d50127fae12286708215a90f118b2d2bc diff --git a/devel/cmake/patches/patch-Modules_Platform_SunOS.cmake b/devel/cmake/patches/patch-Modules_Platform_SunOS.cmake new file mode 100644 index 00000000000..8c3e5a0a19d --- /dev/null +++ b/devel/cmake/patches/patch-Modules_Platform_SunOS.cmake @@ -0,0 +1,34 @@ +$NetBSD: patch-Modules_Platform_SunOS.cmake,v 1.1 2012/02/16 18:32:25 hans Exp $ + +Don't use gcc to link c++ libraries on SunOS, +unless we are really using a gcc lacking libstdc++. + +See http://public.kitware.com/pipermail/cmake/2011-July/045300.html + +--- Modules/Platform/SunOS.cmake.orig 2011-10-04 18:09:24.000000000 +0200 ++++ Modules/Platform/SunOS.cmake 2012-01-11 17:50:43.768105308 +0100 +@@ -5,12 +5,20 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-4.*") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*") + ++# Take the default c++ shared library creation rule from the ++# CMakeDefaultMakeRuleVariables.cmake file unless using GCC and libstdc++.so ++# does not exist, in which case fall back to the old implementation; ++# using gcc to invoke the linker. + IF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCC) +- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY +- "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") +- ELSE(CMAKE_COMPILER_IS_GNUCC) +- # Take default rule from CMakeDefaultMakeRuleVariables.cmake. ++ EXECUTE_PROCESS( ++ COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=libstdc++.so ++ OUTPUT_VARIABLE SHARED_LIBSTDCXX_FILENAME ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ IF(NOT EXISTS "${SHARED_LIBSTDCXX_FILENAME}") ++ SET(CMAKE_CXX_CREATE_SHARED_LIBRARY ++ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") ++ ENDIF(NOT EXISTS "${SHARED_LIBSTDCXX_FILENAME}") + ENDIF(CMAKE_COMPILER_IS_GNUCC) + ENDIF(CMAKE_COMPILER_IS_GNUCXX) + INCLUDE(Platform/UnixPaths) diff --git a/devel/cmake/patches/patch-ab b/devel/cmake/patches/patch-ab index 8da923e2c1f..d9ca6b9f333 100644 --- a/devel/cmake/patches/patch-ab +++ b/devel/cmake/patches/patch-ab @@ -1,18 +1,22 @@ -$NetBSD: patch-ab,v 1.11 2011/10/15 07:24:31 adam Exp $ +$NetBSD: patch-ab,v 1.12 2012/02/16 18:32:25 hans Exp $ --- Modules/FindPythonInterp.cmake.orig 2011-10-04 16:09:24.000000000 +0000 +++ Modules/FindPythonInterp.cmake -@@ -29,11 +29,18 @@ - # Search for the current active python version first - find_program(PYTHON_EXECUTABLE NAMES python) +@@ -26,14 +26,20 @@ + # (To distribute this file outside of CMake, substitute the full + # License text for the above reference.) +-# Search for the current active python version first +-find_program(PYTHON_EXECUTABLE NAMES python) +# for pkgsrc: force Python version (set in pyversion.mk) +IF(DEFINED PYVERSSUFFIX) + SET(_VERSIONS ${PYVERSSUFFIX}) +ELSE(DEFINED PYVERSSUFFIX) + SET(_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) ++ # Search for the current active python version first ++ find_program(PYTHON_EXECUTABLE NAMES python) +ENDIF(DEFINED PYVERSSUFFIX) -+ + # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. set(_Python_VERSIONS |