commit: a1c2506d564ca4527b029d542eef35d38d466570 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> AuthorDate: Wed Apr 1 13:19:31 2015 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Wed Apr 1 13:19:31 2015 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=a1c2506d
[dev-util/cmake] Version bump wrt bug #543700. Package-Manager: portage-2.2.18 dev-util/cmake/cmake-3.2.1.ebuild | 192 +++++++++++++++++++++ dev-util/cmake/files/50cmake-gentoo.el | 4 + .../cmake/files/cmake-2.8.10-darwin-bundle.patch | 23 +++ .../files/cmake-2.8.10.2-FindPythonLibs.patch | 24 +++ .../files/cmake-2.8.12.1-FindImageMagick.patch | 23 +++ dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch | 43 +++++ .../cmake/files/cmake-3.0.0-FindBoost-python.patch | 93 ++++++++++ dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch | 142 +++++++++++++++ dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch | 43 +++++ .../cmake/files/cmake-3.1.0-FindPythonInterp.patch | 29 ++++ .../cmake/files/cmake-3.1.0-darwin-isysroot.patch | 48 ++++++ dev-util/cmake/files/cmake.vim | 3 + dev-util/cmake/metadata.xml | 5 + 13 files changed, 672 insertions(+) diff --git a/dev-util/cmake/cmake-3.2.1.ebuild b/dev-util/cmake/cmake-3.2.1.ebuild new file mode 100644 index 0000000..97a8121 --- /dev/null +++ b/dev-util/cmake/cmake-3.2.1.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-3.1.0.ebuild,v 1.1 2015/01/16 20:35:46 johu Exp $ + +EAPI=5 + +CMAKE_REMOVE_MODULES="no" +inherit bash-completion-r1 elisp-common toolchain-funcs eutils versionator cmake-utils virtualx + +DESCRIPTION="Cross platform Make" +HOMEPAGE="http://www.cmake.org/" +SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${P}.tar.gz" + +LICENSE="CMake" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs ncurses qt4 qt5" + +REQUIRED_USE="?? ( qt4 qt5 )" + +RDEPEND=" + >=app-arch/libarchive-2.8.0:= + >=dev-libs/expat-2.0.1 + >=dev-libs/jsoncpp-0.6.0_rc2 + >=net-misc/curl-7.20.0-r1[ssl] + sys-libs/zlib + virtual/pkgconfig + emacs? ( virtual/emacs ) + ncurses? ( sys-libs/ncurses ) + qt4? ( + dev-qt/qtcore:4 + dev-qt/qtgui:4 + ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx ) +" + +SITEFILE="50${PN}-gentoo.el" + +CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + +PATCHES=( + # prefix + "${FILESDIR}"/${PN}-2.8.10-darwin-bundle.patch + "${FILESDIR}"/${PN}-3.0.0-prefix-dirs.patch + "${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch + + # handle gentoo packaging in find modules + "${FILESDIR}"/${PN}-2.8.12.1-FindImageMagick.patch + "${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch + "${FILESDIR}"/${PN}-3.0.0-FindBoost-python.patch + "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch + + # respect python eclasses + "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch + "${FILESDIR}"/${PN}-3.1.0-FindPythonInterp.patch +) + +cmake_src_bootstrap() { + # Cleanup args to extract only JOBS. + # Because bootstrap does not know anything else. + echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null + if [ $? -eq 0 ]; then + par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+') + par_arg="--parallel=${par_arg}" + else + par_arg="--parallel=1" + fi + + # execinfo.h on Solaris isn't quite what it is on Darwin + if [[ ${CHOST} == *-solaris* ]] ; then + sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die + fi + + tc-export CC CXX LD + + # bootstrap script isn't exactly /bin/sh compatible + ${CONFIG_SHELL:-sh} ./bootstrap \ + --prefix="${T}/cmakestrap/" \ + ${par_arg} \ + || die "Bootstrap failed" +} + +cmake_src_test() { + # fix OutDir and SelectLibraryConfigurations tests + # these are altered thanks to our eclass + sed -i -e 's:#IGNORE ::g' \ + "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \ + || die + + pushd "${BUILD_DIR}" > /dev/null + + local ctestargs + [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" + + # Excluded tests: + # BootstrapTest: we actualy bootstrap it every time so why test it. + # BundleUtilities: bundle creation broken + # CTest.updatecvs: which fails to commit as root + # Fortran: requires fortran + # Qt4Deploy, which tries to break sandbox and ignores prefix + # TestUpload, which requires network access + "${BUILD_DIR}"/bin/ctest ${ctestargs} \ + -E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|TestUpload)" \ + || die "Tests failed" + + popd > /dev/null +} + +src_prepare() { + cmake-utils_src_prepare + + # disable running of cmake in boostrap command + sed -i \ + -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \ + bootstrap || die "sed failed" + + # Add gcc libs to the default link paths + sed -i \ + -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ + -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ + Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" + + cmake_src_bootstrap +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr + -DCMAKE_DOC_DIR=/share/doc/${PF} + -DCMAKE_MAN_DIR=/share/man + -DCMAKE_DATA_DIR=/share/${PN} + -DSPHINX_MAN=$(usex doc) + -DSPHINX_HTML=$(usex doc) + $(cmake-utils_use_build ncurses CursesDialog) + ) + + if use qt4 || use qt5 ; then + mycmakeargs+=( + -DBUILD_QtDialog=ON + $(cmake-utils_use_find_package qt5 Qt5Widgets) + ) + fi + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + use emacs && elisp-compile Auxiliary/cmake-mode.el +} + +src_test() { + VIRTUALX_COMMAND="cmake_src_test" virtualmake +} + +src_install() { + cmake-utils_src_install + + if use emacs; then + elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins Auxiliary/cmake-syntax.vim + + insinto /usr/share/vim/vimfiles/indent + doins Auxiliary/cmake-indent.vim + + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/${PN}.vim" + + dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack} + + rm -rf "${D}"/usr/share/cmake/{completions,editors} || die +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-util/cmake/files/50cmake-gentoo.el b/dev-util/cmake/files/50cmake-gentoo.el new file mode 100644 index 0000000..e4a1a6d --- /dev/null +++ b/dev-util/cmake/files/50cmake-gentoo.el @@ -0,0 +1,4 @@ +(add-to-list 'load-path "@SITELISP@") +(autoload 'cmake-mode "cmake-mode" "Major mode for editing CMake files." t) +(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-mode)) +(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-mode)) diff --git a/dev-util/cmake/files/cmake-2.8.10-darwin-bundle.patch b/dev-util/cmake/files/cmake-2.8.10-darwin-bundle.patch new file mode 100644 index 0000000..9cb4777 --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.10-darwin-bundle.patch @@ -0,0 +1,23 @@ +Don't use .so for modules on darwin/macos. Use .bundle instead. +Patch by Heiko Przybyl + +--- Modules/Platform/Darwin.cmake ++++ Modules/Platform/Darwin.cmake +@@ -26,7 +26,7 @@ + set(CMAKE_SHARED_LIBRARY_PREFIX "lib") + set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") + set(CMAKE_SHARED_MODULE_PREFIX "lib") +-set(CMAKE_SHARED_MODULE_SUFFIX ".so") ++set(CMAKE_SHARED_MODULE_SUFFIX ".bundle") + set(CMAKE_MODULE_EXISTS 1) + set(CMAKE_DL_LIBS "") + +@@ -48,7 +48,7 @@ + set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names") + set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") + set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") +-set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") ++set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".bundle" ".a") + + # hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree + # (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache diff --git a/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch new file mode 100644 index 0000000..2a83ff7 --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.10.2-FindPythonLibs.patch @@ -0,0 +1,24 @@ +diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake +index bffa9fb..8fc90ee 100644 +--- a/Modules/FindPythonLibs.cmake ++++ b/Modules/FindPythonLibs.cmake +@@ -74,6 +74,19 @@ set(_Python_VERSIONS + ${_PYTHON_FIND_OTHER_VERSIONS} + ) + ++# Gentoo portage requires that you use exactly the given python version ++if (CMAKE_BUILD_TYPE STREQUAL Gentoo) ++ execute_process(COMMAND python -c "import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))" ++ OUTPUT_VARIABLE _Gentoo_Python_VERSION) ++ list(FIND _Python_VERSIONS "${_Gentoo_Python_VERSION}" _Gentoo_Python_INDEX) ++ if (_Gentoo_Python_INDEX EQUAL -1) ++ # the current Gentoo python version is not compatible with what is requested ++ set(_Python_VERSIONS) ++ else () ++ set(_Python_VERSIONS "${_Gentoo_Python_VERSION}") ++ endif () ++endif() ++ + unset(_PYTHON_FIND_OTHER_VERSIONS) + unset(_PYTHON1_VERSIONS) + unset(_PYTHON2_VERSIONS) diff --git a/dev-util/cmake/files/cmake-2.8.12.1-FindImageMagick.patch b/dev-util/cmake/files/cmake-2.8.12.1-FindImageMagick.patch new file mode 100644 index 0000000..b094f17 --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.12.1-FindImageMagick.patch @@ -0,0 +1,23 @@ +--- Modules/FindImageMagick.cmake ++++ Modules/FindImageMagick.cmake +@@ -147,17 +147,17 @@ + ) + if(component STREQUAL "Magick++") + FIND_IMAGEMAGICK_API(Magick++ Magick++.h +- Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++-6.Q16HDRI Magick++-Q16HDRI Magick++-6.Q8HDRI Magick++-Q8HDRI ++ Magick++ CORE_RL_Magick++_ Magick++-6.Q64 Magick++-6.Q64HDRI Magick++-6.Q32 Magick++-6.Q32HDRI Magick++-6.Q16 Magick++-6.Q16HDRI Magick++-6.Q8 Magick++-6.Q8HDRI + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY) + elseif(component STREQUAL "MagickWand") + FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h +- Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 MagickWand-6.Q16HDRI MagickWand-Q16HDRI MagickWand-6.Q8HDRI MagickWand-Q8HDRI ++ Wand MagickWand CORE_RL_wand_ MagickWand-6.Q64 MagickWand-6.Q64HDRI MagickWand-6.Q32 MagickWand-6.Q32HDRI MagickWand-6.Q16 MagickWand-6.Q16HDRI MagickWand-6.Q8 MagickWand-6.Q8HDRI + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY) + elseif(component STREQUAL "MagickCore") + FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h +- Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI ++ Magick MagickCore CORE_RL_magick_ MagickCore-6.Q64 MagickCore-6.Q64HDRI MagickCore-6.Q32 MagickCore-6.Q32HDRI MagickCore-6.Q16 MagickCore-6.Q16HDRI MagickCore-6.Q8 MagickCore-6.Q8HDRI + ) + list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY) + else() diff --git a/dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch b/dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch new file mode 100644 index 0000000..86c5dc7 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.0.0-FindBLAS.patch @@ -0,0 +1,43 @@ +--- Modules/FindBLAS.cmake ++++ Modules/FindBLAS.cmake +@@ -4,6 +4,10 @@ + # + # Find BLAS library + # ++# Version modified for Gentoo Linux. ++# If a valid PkgConfig configuration is found, this overrides and cancels ++# all further checks. ++# + # This module finds an installed fortran library that implements the + # BLAS linear-algebra interface (see http://www.netlib.org/blas/). The + # list of libraries searched for is taken from the autoconf macro file, +@@ -50,6 +54,23 @@ + # (To distribute this file outside of CMake, substitute the full + # License text for the above reference.) + ++# first, try PkgConfig ++# ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(PC_BLAS blas) ++if(PC_BLAS_FOUND) ++ foreach(PC_LIB ${PC_BLAS_LIBRARIES}) ++ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_BLAS_LIBRARY_DIRS} ) ++ if (NOT ${PC_LIB}_LIBRARY) ++ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_BLAS_LIBRARY_DIRS}") ++ endif (NOT ${PC_LIB}_LIBRARY) ++ list(APPEND BLAS_LIBRARIES ${${PC_LIB}_LIBRARY}) ++ endforeach(PC_LIB) ++ find_package_handle_standard_args(BLAS DEFAULT_MSG BLAS_LIBRARIES) ++ mark_as_advanced(BLAS_LIBRARIES) ++else(PC_BLAS_FOUND) ++message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.") ++ + include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) + +@@ -688,3 +709,5 @@ + endif() + + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) ++ ++endif(PC_BLAS_FOUND) diff --git a/dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch b/dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch new file mode 100644 index 0000000..a6291d2 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.0.0-FindBoost-python.patch @@ -0,0 +1,93 @@ +From 934ec9add33d413e4d5c9cec1cb3ebb5cbfd81f4 Mon Sep 17 00:00:00 2001 +From: Michael Palimaka <kensing...@gentoo.org> +Date: Thu, 19 Jun 2014 00:17:48 +1000 +Subject: [PATCH] Fix detection of PYTHON_ABI-versioned Boost Python libraries + wrt bug #400969. + +--- + Modules/FindBoost.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake +index dfd4460..70bfb4f 100644 +--- a/Modules/FindBoost.cmake ++++ b/Modules/FindBoost.cmake +@@ -952,6 +952,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + set( _boost_docstring_release "Boost ${COMPONENT} library (release)") + set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)") + ++ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") ++ # Get version of Python. ++ if (NOT PYTHON_EXECUTABLE) ++ #if a certain version of python was detected by cmake before use that one ++ set(PYTHON_EXECUTABLE "python") ++ endif (NOT PYTHON_EXECUTABLE) ++ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version) ++ endif() ++ + # Compute component-specific hints. + set(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT "") + if(${COMPONENT} STREQUAL "mpi" OR ${COMPONENT} STREQUAL "mpi_python" OR +@@ -984,6 +993,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + ${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} ) ++ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") ++ list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} ) ++ endif() ++ + if(_boost_STATIC_RUNTIME_WORKAROUND) + set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}") + list(APPEND _boost_RELEASE_NAMES +@@ -991,6 +1009,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} + ${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} ) ++ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") ++ list(APPEND _boost_RELEASE_NAMES ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} ) ++ endif() + endif() + if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") + _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES}) +@@ -1020,6 +1045,15 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} ) ++ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") ++ list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} ) ++ endif() + if(_boost_STATIC_RUNTIME_WORKAROUND) + set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}") + list(APPEND _boost_DEBUG_NAMES +@@ -1027,6 +1061,13 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} + ${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} ) ++ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") ++ list(APPEND _boost_DEBUG_NAMES ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION} ++ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} ) ++ endif() + endif() + if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread") + _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES}) +-- +1.8.5.5 + diff --git a/dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch b/dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch new file mode 100644 index 0000000..decfb91 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.0.0-prefix-dirs.patch @@ -0,0 +1,142 @@ +From e7ce3e523f8cfa1bc749118f381753230766827f Mon Sep 17 00:00:00 2001 +From: Michael Palimaka <kensing...@gentoo.org> +Date: Thu, 19 Jun 2014 00:08:13 +1000 +Subject: [PATCH] Set some proper paths to make cmake find our tools. + +The ebuild now adds an extra / at the end of $EPREFIX so that it is +never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains +correct) + +Original patch by Heiko Przybyl. +Updated by Chris Reffett (cmake-2.8.8) +Updated by Johannes Huber (cmake-2.8.9) +Updated by Michael Palimaka (cmake-2.8.10) +Updated by Chris Reffett (cmake-2.8.11) +Updated by Michael Palimaka (cmake-3.0.0) +--- + Modules/Platform/Darwin.cmake | 12 +++++++---- + Modules/Platform/UnixPaths.cmake | 43 ++++++++++++++++++++-------------------- + 2 files changed, 29 insertions(+), 26 deletions(-) + +diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake +index e25df1e..9b22a6a 100644 +--- a/Modules/Platform/Darwin.cmake ++++ b/Modules/Platform/Darwin.cmake +@@ -132,9 +132,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) + set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) + set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) + +-# default to searching for frameworks first ++# default to searching for frameworks last + if(NOT DEFINED CMAKE_FIND_FRAMEWORK) +- set(CMAKE_FIND_FRAMEWORK FIRST) ++ set(CMAKE_FIND_FRAMEWORK LAST) + endif() + + # Older OS X linkers do not report their framework search path +@@ -156,6 +156,8 @@ endif() + + # set up the default search directories for frameworks + set(CMAKE_SYSTEM_FRAMEWORK_PATH ++ @GENTOO_PORTAGE_EPREFIX@Frameworks ++ @GENTOO_PORTAGE_EPREFIX@usr/lib + ~/Library/Frameworks + ) + if(_CMAKE_OSX_SYSROOT_PATH) +@@ -187,13 +189,15 @@ if(CMAKE_OSX_SYSROOT) + endif() + endif() + +-# default to searching for application bundles first ++# default to searching for application bundles last + if(NOT DEFINED CMAKE_FIND_APPBUNDLE) +- set(CMAKE_FIND_APPBUNDLE FIRST) ++ set(CMAKE_FIND_APPBUNDLE LAST) + endif() + # set up the default search directories for application bundles + set(_apps_paths) + foreach(_path ++ @GENTOO_PORTAGE_EPREFIX@Applications ++ @GENTOO_PORTAGE_EPREFIX@usr/bin + "~/Applications" + "/Applications" + "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ +diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake +index 20ee1d1..3481ca8 100644 +--- a/Modules/Platform/UnixPaths.cmake ++++ b/Modules/Platform/UnixPaths.cmake +@@ -33,6 +33,7 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + # search types. + list(APPEND CMAKE_SYSTEM_PREFIX_PATH + # Standard ++ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ + /usr/local /usr / + + # CMake install location +@@ -53,43 +54,41 @@ endif() + + # List common include file locations not under the common prefixes. + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH +- # Windows API on Cygwin +- /usr/include/w32api +- +- # X11 +- /usr/X11R6/include /usr/include/X11 +- +- # Other +- /usr/pkg/include +- /opt/csw/include /opt/include +- /usr/openwin/include ++ @GENTOO_PORTAGE_EPREFIX@usr/include + ) + + list(APPEND CMAKE_SYSTEM_LIBRARY_PATH +- # Windows API on Cygwin +- /usr/lib/w32api +- +- # X11 +- /usr/X11R6/lib /usr/lib/X11 +- +- # Other +- /usr/pkg/lib +- /opt/csw/lib /opt/lib +- /usr/openwin/lib ++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc ++ @GENTOO_PORTAGE_GCCLIBDIR@ ++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 ++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib ++ @GENTOO_PORTAGE_EPREFIX@lib + ) + + list(APPEND CMAKE_SYSTEM_PROGRAM_PATH +- /usr/pkg/bin ++ @GENTOO_PORTAGE_EPREFIX@usr/bin ++ @GENTOO_PORTAGE_EPREFIX@bin + ) + + list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 ++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc ++ @GENTOO_PORTAGE_GCCLIBDIR@ ++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 ++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib ++ @GENTOO_PORTAGE_EPREFIX@lib ++ /lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 + ) + + list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ++ GENTOO_PORTAGE_EPREFIX@usr/include + /usr/include + ) + list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ++ @GENTOO_PORTAGE_EPREFIX@usr/include + /usr/include + ) + +-- +1.8.5.5 + diff --git a/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch b/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch new file mode 100644 index 0000000..57250e4 --- /dev/null +++ b/dev-util/cmake/files/cmake-3.0.2-FindLAPACK.patch @@ -0,0 +1,43 @@ +--- Modules/FindLAPACK.cmake.orig 2014-09-15 23:50:11.377111987 +0200 ++++ Modules/FindLAPACK.cmake 2014-09-15 23:52:54.734388375 +0200 +@@ -4,6 +4,10 @@ + # + # Find LAPACK library + # ++# Version modified for Gentoo Linux. ++# If a valid PkgConfig configuration is found, this overrides and cancels ++# all further checks. ++# + # This module finds an installed fortran library that implements the + # LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). + # +@@ -140,6 +144,23 @@ + + endmacro() + ++# ++# first, try PkgConfig ++# ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(PC_LAPACK lapack) ++if(PC_LAPACK_FOUND) ++ foreach(PC_LIB ${PC_LAPACK_LIBRARIES}) ++ find_library(${PC_LIB}_LIBRARY NAMES ${PC_LIB} HINTS ${PC_LAPACK_LIBRARY_DIRS} ) ++ if (NOT ${PC_LIB}_LIBRARY) ++ message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_LAPACK_LIBRARY_DIRS}") ++ endif (NOT ${PC_LIB}_LIBRARY) ++ list(APPEND LAPACK_LIBRARIES ${${PC_LIB}_LIBRARY}) ++ endforeach(PC_LIB) ++ find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARIES) ++ mark_as_advanced(LAPACK_LIBRARIES) ++else(PC_LAPACK_FOUND) ++message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.") + + set(LAPACK_LINKER_FLAGS) + set(LAPACK_LIBRARIES) +@@ -348,3 +369,5 @@ + endif() + + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) ++ ++endif(PC_LAPACK_FOUND) diff --git a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch new file mode 100644 index 0000000..78f622d --- /dev/null +++ b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch @@ -0,0 +1,29 @@ +--- Modules/FindPythonInterp.cmake.orig 2015-01-06 11:50:03.376357898 +0100 ++++ Modules/FindPythonInterp.cmake 2015-01-06 12:25:48.614989290 +0100 +@@ -75,6 +75,11 @@ + else() + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) + endif() ++ ++if (CMAKE_BUILD_TYPE STREQUAL Gentoo) ++ set(_Python_NAMES python) ++endif() ++ + find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) + + # Set up the versions we know about, in the order we will search. Always add +@@ -99,12 +104,13 @@ + unset(_PYTHON3_VERSIONS) + + # Search for newest python version if python executable isn't found +-if(NOT PYTHON_EXECUTABLE) ++if(NOT PYTHON_EXECUTABLE AND NOT CMAKE_BUILD_TYPE STREQUAL Gentoo) + foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) + set(_Python_NAMES python${_CURRENT_VERSION}) + if(WIN32) + list(APPEND _Python_NAMES python) + endif() ++ + find_program(PYTHON_EXECUTABLE + NAMES ${_Python_NAMES} + PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] diff --git a/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch b/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch new file mode 100644 index 0000000..119001a --- /dev/null +++ b/dev-util/cmake/files/cmake-3.1.0-darwin-isysroot.patch @@ -0,0 +1,48 @@ +Do not detect Xcode and set -isysroot for its SDK, since that messes up +our toolchain, and hence makes any compilation fail, bug #445308 + +--- Modules/Platform/Darwin-Initialize.cmake ++++ Modules/Platform/Darwin-Initialize.cmake +@@ -1,16 +1,16 @@ + # Ask xcode-select where to find /Developer or fall back to ancient location. +-execute_process(COMMAND xcode-select -print-path +- OUTPUT_VARIABLE _stdout +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ERROR_VARIABLE _stderr +- RESULT_VARIABLE _failed) +-if(NOT _failed AND IS_DIRECTORY ${_stdout}) +- set(OSX_DEVELOPER_ROOT ${_stdout}) +-elseif(IS_DIRECTORY "/Developer") +- set(OSX_DEVELOPER_ROOT "/Developer") +-else() ++#execute_process(COMMAND xcode-select -print-path ++# OUTPUT_VARIABLE _stdout ++# OUTPUT_STRIP_TRAILING_WHITESPACE ++# ERROR_VARIABLE _stderr ++# RESULT_VARIABLE _failed) ++#if(NOT _failed AND IS_DIRECTORY ${_stdout}) ++# set(OSX_DEVELOPER_ROOT ${_stdout}) ++#elseif(IS_DIRECTORY "/Developer") ++# set(OSX_DEVELOPER_ROOT "/Developer") ++#else() + set(OSX_DEVELOPER_ROOT "") +-endif() ++#endif() + + execute_process(COMMAND sw_vers -productVersion + OUTPUT_VARIABLE CURRENT_OSX_VERSION +@@ -91,10 +91,10 @@ + # CMAKE_OSX_DEPLOYMENT_TARGET + + # Set cache variable - end user may change this during ccmake or cmake-gui configure. +-if(_CURRENT_OSX_VERSION VERSION_GREATER 10.3) +- set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING +- "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.") +-endif() ++#if(_CURRENT_OSX_VERSION VERSION_GREATER 10.3) ++# set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING ++# "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.") ++#endif() + + #---------------------------------------------------------------------------- + # CMAKE_OSX_SYSROOT diff --git a/dev-util/cmake/files/cmake.vim b/dev-util/cmake/files/cmake.vim new file mode 100644 index 0000000..5cecd7d --- /dev/null +++ b/dev-util/cmake/files/cmake.vim @@ -0,0 +1,3 @@ +autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt,*.cmake.in runtime! indent/cmake.vim +autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt,*.cmake.in setf cmake +autocmd BufRead,BufNewFile *.ctest,*.ctest.in setf cmake diff --git a/dev-util/cmake/metadata.xml b/dev-util/cmake/metadata.xml new file mode 100644 index 0000000..a23f444 --- /dev/null +++ b/dev-util/cmake/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>kde</herd> +</pkgmetadata>