diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2017-03-23 13:01:05 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2017-03-23 13:20:03 +0100 |
commit | c61eff3f68a45d5b25653c8022f97634fab20f36 (patch) | |
tree | a267bc8c9ac93bc7c64a0fe4fac4c3212e2981f0 /dev-util/cmake | |
parent | dev-perl/Path-IsDev: Bump to version 1.1.3 (diff) | |
download | gentoo-c61eff3f68a45d5b25653c8022f97634fab20f36.tar.gz gentoo-c61eff3f68a45d5b25653c8022f97634fab20f36.tar.bz2 gentoo-c61eff3f68a45d5b25653c8022f97634fab20f36.zip |
dev-util/cmake: Attempt to fix FindBoost-python patch (bug #613442).
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-util/cmake')
-rw-r--r-- | dev-util/cmake/cmake-3.7.2-r1.ebuild | 199 | ||||
-rw-r--r-- | dev-util/cmake/cmake-3.7.2-r10.ebuild | 2 | ||||
-rw-r--r-- | dev-util/cmake/cmake-3.8.0_rc2-r1.ebuild (renamed from dev-util/cmake/cmake-3.8.0_rc2.ebuild) | 2 | ||||
-rw-r--r-- | dev-util/cmake/files/cmake-3.8.0_rc2-FindBoost-python.patch | 95 |
4 files changed, 296 insertions, 2 deletions
diff --git a/dev-util/cmake/cmake-3.7.2-r1.ebuild b/dev-util/cmake/cmake-3.7.2-r1.ebuild new file mode 100644 index 000000000000..f2c467a0459a --- /dev/null +++ b/dev-util/cmake/cmake-3.7.2-r1.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +CMAKE_REMOVE_MODULES="no" +inherit bash-completion-r1 elisp-common toolchain-funcs eutils versionator cmake-utils virtualx flag-o-matic + +MY_P="${P/_/-}" + +DESCRIPTION="Cross platform Make" +HOMEPAGE="http://www.cmake.org/" +SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz" + +LICENSE="CMake" +SLOT="0" +[[ "${PV}" = *_rc* ]] || \ +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs system-jsoncpp ncurses qt5" + +RDEPEND=" + >=app-arch/libarchive-3.0.0:= + >=dev-libs/expat-2.0.1 + >=dev-libs/libuv-1.0.0:= + >=net-misc/curl-7.21.5[ssl] + sys-libs/zlib + virtual/pkgconfig + emacs? ( virtual/emacs ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= ) +" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx ) +" + +S="${WORKDIR}/${MY_P}" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( + # prefix + "${FILESDIR}"/${PN}-3.4.0_rc1-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.8.0_rc2-FindBoost-python.patch + "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch + "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch + + # respect python eclasses + "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch + "${FILESDIR}"/${PN}-3.1.0-FindPythonInterp.patch + + # upstream fixes (can usually be removed with a version bump) +) + +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 + + # disable running of cmake in boostrap command + sed -i \ + -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \ + bootstrap || die "sed failed" + + # 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 + # Qt5Autogen, which breaks for unknown reason + # TestUpload, which requires network access + "${BUILD_DIR}"/bin/ctest ${ctestargs} \ + -E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|Qt5Autogen|TestUpload)" \ + || die "Tests failed" + + popd > /dev/null +} + +src_prepare() { + cmake-utils_src_prepare + + # 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" + if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { + # Fix linking on Solaris + [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl + + local mycmakeargs=( + -DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp) + -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) + -DBUILD_CursesDialog="$(usex ncurses)" + ) + + if 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() { + virtx cmake_src_test +} + +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/vim/syntax/cmake.vim + + insinto /usr/share/vim/vimfiles/indent + doins Auxiliary/vim/indent/cmake.vim + + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/${PN}.vim" + + dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack} + + rm -r "${ED}"/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/cmake-3.7.2-r10.ebuild b/dev-util/cmake/cmake-3.7.2-r10.ebuild index d706bdb8a293..e2f29fb2645d 100644 --- a/dev-util/cmake/cmake-3.7.2-r10.ebuild +++ b/dev-util/cmake/cmake-3.7.2-r10.ebuild @@ -52,7 +52,7 @@ PATCHES=( # 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.8.0_rc2-FindBoost-python.patch "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch diff --git a/dev-util/cmake/cmake-3.8.0_rc2.ebuild b/dev-util/cmake/cmake-3.8.0_rc2-r1.ebuild index 60d045351204..b5e7affd517f 100644 --- a/dev-util/cmake/cmake-3.8.0_rc2.ebuild +++ b/dev-util/cmake/cmake-3.8.0_rc2-r1.ebuild @@ -52,7 +52,7 @@ PATCHES=( # 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.8.0_rc2-FindBoost-python.patch "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch diff --git a/dev-util/cmake/files/cmake-3.8.0_rc2-FindBoost-python.patch b/dev-util/cmake/files/cmake-3.8.0_rc2-FindBoost-python.patch new file mode 100644 index 000000000000..441650b72a2a --- /dev/null +++ b/dev-util/cmake/files/cmake-3.8.0_rc2-FindBoost-python.patch @@ -0,0 +1,95 @@ +From 7d3a5c466bf14a0c12edc6ece359012b723e39bc Mon Sep 17 00:00:00 2001 +From: Michael Palimaka <kensington@gentoo.org> +Date: Thu, 23 Mar 2017 11:36:39 +0100 +Subject: [PATCH] Fix detection of PYTHON_ABI-versioned Boost Python libraries + +Gentoo-bug: 400969 +Gentoo-bug: 613442 +--- + Modules/FindBoost.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake +index e795aadcc..11269c30b 100644 +--- a/Modules/FindBoost.cmake ++++ b/Modules/FindBoost.cmake +@@ -1481,6 +1481,16 @@ 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") ++ # If a certain version of python has already been selected ensure we select the corresponding boost python version. ++ if(PYTHON_EXECUTABLE) ++ set(GENTOO_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") ++ else() ++ set(GENTOO_PYTHON_EXECUTABLE "python") ++ endif() ++ execute_process(COMMAND "${GENTOO_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 +@@ -1529,6 +1539,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 +@@ -1536,6 +1555,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}) +@@ -1571,6 +1597,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 +@@ -1578,6 +1613,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}) +-- +2.12.1 + |