diff options
author | Johannes Huber <johu@gentoo.org> | 2012-05-02 21:02:53 +0000 |
---|---|---|
committer | Johannes Huber <johu@gentoo.org> | 2012-05-02 21:02:53 +0000 |
commit | 2a48f97053bad5a2f99779858cf121f6c9494a2c (patch) | |
tree | 30afbb4ab4e3c0543fbe612a8df4643233e211e3 /dev-util/cmake | |
parent | dev-util/pkgconfig -> virtual/pkgconfig (diff) | |
download | gentoo-2-2a48f97053bad5a2f99779858cf121f6c9494a2c.tar.gz gentoo-2-2a48f97053bad5a2f99779858cf121f6c9494a2c.tar.bz2 gentoo-2-2a48f97053bad5a2f99779858cf121f6c9494a2c.zip |
Version bump by me and Chris Reffett <geekboy72@gmail.com> wrt bug #412925. Adds patch for FindPkgConfig to respect PKG_CONFIG environment variable by DaboD <daiderek@gmail.com> bug #414037.
(Portage version: 2.2.0_alpha101/cvs/Linux i686)
Diffstat (limited to 'dev-util/cmake')
-rw-r--r-- | dev-util/cmake/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/cmake/cmake-2.8.8-r1.ebuild | 176 | ||||
-rw-r--r-- | dev-util/cmake/files/cmake-2.8.8-FindPkgConfig.patch | 18 | ||||
-rw-r--r-- | dev-util/cmake/files/cmake-2.8.8-more-no_host_paths.patch | 110 | ||||
-rw-r--r-- | dev-util/cmake/files/cmake-2.8.8-tests.patch | 58 |
5 files changed, 372 insertions, 1 deletions
diff --git a/dev-util/cmake/ChangeLog b/dev-util/cmake/ChangeLog index 8a53cc2d03af..014efb902492 100644 --- a/dev-util/cmake/ChangeLog +++ b/dev-util/cmake/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/cmake # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.191 2012/04/26 20:17:42 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.192 2012/05/02 21:02:53 johu Exp $ + +*cmake-2.8.8-r1 (02 May 2012) + + 02 May 2012; Johannes Huber <johu@gentoo.org> +cmake-2.8.8-r1.ebuild, + +files/cmake-2.8.8-FindPkgConfig.patch, + +files/cmake-2.8.8-more-no_host_paths.patch, +files/cmake-2.8.8-tests.patch: + Version bump by me and Chris Reffett <geekboy72@gmail.com> wrt bug #412925. + Adds patch for FindPkgConfig to respect PKG_CONFIG environment variable by + DaboD <daiderek@gmail.com> bug #414037. 26 Apr 2012; Alexis Ballier <aballier@gentoo.org> cmake-2.8.7-r5.ebuild: keyword ~amd64-fbsd diff --git a/dev-util/cmake/cmake-2.8.8-r1.ebuild b/dev-util/cmake/cmake-2.8.8-r1.ebuild new file mode 100644 index 000000000000..b7ec0667c4a2 --- /dev/null +++ b/dev-util/cmake/cmake-2.8.8-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.8.8-r1.ebuild,v 1.1 2012/05/02 21:02:53 johu Exp $ + +EAPI=4 + +CMAKE_REMOVE_MODULES="no" +inherit elisp-common toolchain-funcs eutils versionator flag-o-matic base cmake-utils virtualx + +MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})" + +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" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +SLOT="0" +IUSE="emacs ncurses qt4 vim-syntax" + +DEPEND=" + >=app-arch/libarchive-2.8.0 + >=net-misc/curl-7.20.0-r1[ssl] + >=dev-libs/expat-2.0.1 + dev-util/pkgconfig + sys-libs/zlib + ncurses? ( sys-libs/ncurses ) + qt4? ( x11-libs/qt-gui:4 ) +" +RDEPEND="${DEPEND} + emacs? ( virtual/emacs ) + vim-syntax? ( + || ( + app-editors/vim + app-editors/gvim + ) + ) +" + +SITEFILE="50${PN}-gentoo.el" +VIMFILE="${PN}.vim" + +S="${WORKDIR}/${MY_P}" + +CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + +PATCHES=( + "${FILESDIR}"/${PN}-2.6.3-darwin-bundle.patch + "${FILESDIR}"/${PN}-2.6.3-no-duplicates-in-rpath.patch + "${FILESDIR}"/${PN}-2.6.3-fix_broken_lfs_on_aix.patch + "${FILESDIR}"/${PN}-2.8.0-darwin-default-install_name.patch + "${FILESDIR}"/${PN}-2.8.1-libform.patch + "${FILESDIR}"/${PN}-2.8.4-FindPythonLibs.patch + "${FILESDIR}"/${PN}-2.8.7-FindBoost-python.patch + "${FILESDIR}"/${PN}-2.8.7-FindBLAS.patch + "${FILESDIR}"/${PN}-2.8.7-FindLAPACK.patch + "${FILESDIR}"/${PN}-2.8.8-FindPkgConfig.patch + "${FILESDIR}"/${PN}-2.8.8-more-no_host_paths.patch + "${FILESDIR}"/${PN}-2.8.8-tests.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:]]+' | egrep -o '[[:digit:]]+') + par_arg="--parallel=${par_arg}" + else + par_arg="--parallel=1" + fi + + tc-export CC CXX LD + + ./bootstrap \ + --prefix="${T}/cmakestrap/" \ + ${par_arg} \ + || die "Bootstrap failed" +} + +cmake_src_test() { + # fix OutDir test + # this is altered thanks to our eclass + sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die + + pushd "${CMAKE_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. + # SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test + # as it was never intended to be used this way. + "${CMAKE_BUILD_DIR}"/bin/ctest ${ctestargs} \ + -E BootstrapTest SimpleCOnly_sdcc \ + || die "Tests failed" + + popd > /dev/null +} + +pkg_setup() { + einfo "Fixing java access violations ..." + # bug 387227 + addpredict /proc/self/coredump_filter +} + +src_prepare() { + base_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() { + # make things work with gentoo java setup + # in case java-config cannot be run, the variable just becomes unset + # per bug #315229 + export JAVA_HOME=$(java-config -g JAVA_HOME 2> /dev/null) + + 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} + $(cmake-utils_use_build ncurses CursesDialog) + $(cmake-utils_use_build qt4 QtDialog) + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + use emacs && elisp-compile Docs/cmake-mode.el +} + +src_test() { + VIRTUALX_COMMAND="cmake_src_test" virtualmake +} + +src_install() { + cmake-utils_src_install + if use emacs; then + elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins Docs/cmake-syntax.vim + + insinto /usr/share/vim/vimfiles/indent + doins Docs/cmake-indent.vim + + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/${VIMFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-util/cmake/files/cmake-2.8.8-FindPkgConfig.patch b/dev-util/cmake/files/cmake-2.8.8-FindPkgConfig.patch new file mode 100644 index 000000000000..c5e17c5ba64e --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.8-FindPkgConfig.patch @@ -0,0 +1,18 @@ +diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake +index c47f583..5783d37 100644 +--- a/Modules/FindPkgConfig.cmake ++++ b/Modules/FindPkgConfig.cmake +@@ -87,7 +87,12 @@ + set(PKG_CONFIG_VERSION 1) + set(PKG_CONFIG_FOUND 0) + +-find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") ++if(NOT PKG_CONFIG_EXECUTABLE) ++ set(PKG_CONFIG_EXECUTABLE $ENV{PKG_CONFIG}) ++ if(NOT PKG_CONFIG_EXECUTABLE) ++ find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") ++ endif(NOT PKG_CONFIG_EXECUTABLE) ++endif(NOT PKG_CONFIG_EXECUTABLE) + mark_as_advanced(PKG_CONFIG_EXECUTABLE) + + if(PKG_CONFIG_EXECUTABLE) diff --git a/dev-util/cmake/files/cmake-2.8.8-more-no_host_paths.patch b/dev-util/cmake/files/cmake-2.8.8-more-no_host_paths.patch new file mode 100644 index 000000000000..ca768351727a --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.8-more-no_host_paths.patch @@ -0,0 +1,110 @@ +Set some proper paths to make cmake find our tools. +Original patch by Heiko Przybyl, updated for cmake-2.8.8 by Chris Reffett + +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) + +--- cmake-2.8.8/Modules/Platform/Darwin.cmake ++++ cmake-2.8.8/Modules/Platform/Darwin.cmake +@@ -229,20 +229,24 @@ + + + +-# default to searching for frameworks first +-SET(CMAKE_FIND_FRAMEWORK FIRST) ++# default to searching for frameworks last ++SET(CMAKE_FIND_FRAMEWORK LAST) + # set up the default search directories for frameworks + SET(CMAKE_SYSTEM_FRAMEWORK_PATH ++ @GENTOO_PORTAGE_EPREFIX@Frameworks ++ @GENTOO_PORTAGE_EPREFIX@usr/lib + ~/Library/Frameworks + /Library/Frameworks + /Network/Library/Frameworks + /System/Library/Frameworks) + +-# default to searching for application bundles first +-SET(CMAKE_FIND_APPBUNDLE FIRST) ++# default to searching for application bundles last ++SET(CMAKE_FIND_APPBUNDLE LAST) + # 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 -ruN cmake-2.8.8.orig/Modules/Platform/UnixPaths.cmake cmake-2.8.8/Modules/Platform/UnixPaths.cmake +--- cmake-2.8.8/Modules/Platform/UnixPaths.cmake ++++ cmake-2.8.8/Modules/Platform/UnixPaths.cmake +@@ -33,6 +33,7 @@ + # 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 +@@ -44,43 +45,39 @@ + + # 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/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 ++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc ++ @GENTOO_PORTAGE_GCCLIBDIR@ ++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 ++ @GENTOO_PORTAGE_EPREFIX@usr/lib ++ @GENTOO_PORTAGE_EPREFIX@lib + /lib /usr/lib /usr/lib32 /usr/lib64 + ) + + 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 + ) + diff --git a/dev-util/cmake/files/cmake-2.8.8-tests.patch b/dev-util/cmake/files/cmake-2.8.8-tests.patch new file mode 100644 index 000000000000..64af9d314432 --- /dev/null +++ b/dev-util/cmake/files/cmake-2.8.8-tests.patch @@ -0,0 +1,58 @@ +Remove DeployQt4 test, which tries to break sandbox and ignores prefix, and CTest.updatecvs, which fails to commit as root +--- cmake-2.8.8/Tests/CMakeLists.txt ++++ cmake-2.8.8/Tests/CMakeLists.txt +@@ -273,23 +273,6 @@ + ) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleUtilities") + +- # run test for DeployQt4 on supported platforms/compilers (which depends on BundleUtilities) +- # this test also depends on the existence of the standard qtiff plugin +- if(QT4_WORKS AND QT_QTSQL_FOUND) +- ADD_TEST(Qt4Deploy ${CMAKE_CTEST_COMMAND} +- --build-and-test +- "${CMake_SOURCE_DIR}/Tests/Qt4Deploy" +- "${CMake_BINARY_DIR}/Tests/Qt4Deploy" +- --build-generator ${CMAKE_TEST_GENERATOR} +- --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} +- --build-project Qt4Deploy +- --build-options +- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} +- -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} +- ) +- LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Deploy") +- endif() +- + endif() + endif() + +@@ -1548,30 +1531,6 @@ + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateSVN_DIR}") + ENDIF(Subversion_FOUND) + +- # Test CTest Update with CVS +- IF(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) +- FIND_PACKAGE(CVS QUIET) +- ELSE(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) +- FIND_PROGRAM(CVS_EXECUTABLE NAMES cvs) +- SET(CVS_FOUND ${CVS_EXECUTABLE}) +- ENDIF(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) +- SET(CTEST_TEST_UPDATE_CVS ${CVS_FOUND}) +- IF(CTEST_TEST_UPDATE_CVS AND NOT UNIX) +- IF("${CVS_EXECUTABLE}" MATCHES "cygwin") +- MESSAGE(STATUS "No CTest.UpdateCVS test with cygwin cvs.exe outside cygwin!") +- SET(CTEST_TEST_UPDATE_CVS 0) +- ENDIF("${CVS_EXECUTABLE}" MATCHES "cygwin") +- ENDIF(CTEST_TEST_UPDATE_CVS AND NOT UNIX) +- IF(CTEST_TEST_UPDATE_CVS) +- SET(CTestUpdateCVS_DIR "CTest UpdateCVS") +- CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestUpdateCVS.cmake.in" +- "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" @ONLY) +- ADD_TEST(CTest.UpdateCVS ${CMAKE_CMAKE_COMMAND} +- -P "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" +- ) +- LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateCVS_DIR}") +- ENDIF(CTEST_TEST_UPDATE_CVS) +- + # Test CTest Update with BZR + FIND_PROGRAM(BZR_EXECUTABLE NAMES bzr) + MARK_AS_ADVANCED(BZR_EXECUTABLE) |