diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-01-03 22:05:13 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-01-03 22:05:13 +0000 |
commit | 335e63e10f61f7d220312363db56ecd7df71431d (patch) | |
tree | 490514bcedc30543c1599976f993fb4685acdbcc /dev-util/cmake | |
parent | add use-based deps (diff) | |
download | gentoo-2-335e63e10f61f7d220312363db56ecd7df71431d.tar.gz gentoo-2-335e63e10f61f7d220312363db56ecd7df71431d.tar.bz2 gentoo-2-335e63e10f61f7d220312363db56ecd7df71431d.zip |
Add patch for python lib detection. Per bug #253593. Thanks to Oldrich Jedlicka for patch.
(Portage version: 2.2_rc20/cvs/Linux 2.6.27-gentoo x86_64)
Diffstat (limited to 'dev-util/cmake')
-rw-r--r-- | dev-util/cmake/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/cmake/cmake-2.6.2-r1.ebuild | 113 | ||||
-rw-r--r-- | dev-util/cmake/files/cmake-FindPythonInterp.patch | 12 |
3 files changed, 134 insertions, 2 deletions
diff --git a/dev-util/cmake/ChangeLog b/dev-util/cmake/ChangeLog index d4d8be1a0dec..8587a18028c6 100644 --- a/dev-util/cmake/ChangeLog +++ b/dev-util/cmake/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/cmake -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.76 2008/12/02 23:25:37 scarabeus Exp $ +# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.77 2009/01/03 22:05:12 scarabeus Exp $ + +*cmake-2.6.2-r1 (03 Jan 2009) + + 03 Jan 2009; Tomas Chvatal <scarabeus@gentoo.org> + +files/cmake-FindPythonInterp.patch, +cmake-2.6.2-r1.ebuild: + Add patch for python lib detection. Per bug #253593. Thanks to Oldrich + Jedlicka for patch. 02 Dec 2008; Tomas Chvatal <scarabeus@gentoo.org> -files/cmake-2.6.1-gc-sections.patch, -files/cmake-2.6.1-rpath.patch, diff --git a/dev-util/cmake/cmake-2.6.2-r1.ebuild b/dev-util/cmake/cmake-2.6.2-r1.ebuild new file mode 100644 index 000000000000..5baa4b6b3e7d --- /dev/null +++ b/dev-util/cmake/cmake-2.6.2-r1.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.6.2-r1.ebuild,v 1.1 2009/01/03 22:05:12 scarabeus Exp $ + +EAPI="2" + +inherit elisp-common toolchain-funcs eutils versionator flag-o-matic + +MY_PV="${PV/rc/RC-}" +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" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="emacs qt4 vim-syntax" + +DEPEND=">=net-misc/curl-7.16.4 + >=dev-libs/expat-2.0.1 + >=dev-libs/libxml2-2.6.28 + >=dev-libs/xmlrpc-c-1.06.09[curl] + emacs? ( virtual/emacs ) + qt4? ( || ( ( x11-libs/qt-core:4 + x11-libs/qt-gui:4 ) + >=x11-libs/qt-4.3:4 ) ) + vim-syntax? ( || ( + app-editors/vim + app-editors/gvim ) )" +RDEPEND="${DEPEND}" + +SITEFILE="50${PN}-gentoo.el" +VIMFILE="${PN}.vim" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-FindPythonLibs.patch" + epatch "${FILESDIR}/${PN}-FindPythonInterp.patch" +} + +src_configure() { + if [[ "$(gcc-major-version)" -eq "3" ]] ; then + append-flags "-fno-stack-protector" + fi + + tc-export CC CXX LD + + local qt_arg + if use qt4; then + qt_arg="--qt-gui" + else + qt_arg="--no-qt-gui" + fi + + local par_arg + 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 +} + +src_compile() { + ./bootstrap \ + --system-libs \ + --prefix=/usr \ + --docdir=/share/doc/${PF} \ + --datadir=/share/${PN} \ + --mandir=/share/man \ + "$qt_arg" \ + "$par_arg" || die "./bootstrap failed" + + emake || die "emake failed." + if use emacs; then + elisp-compile Docs/cmake-mode.el || die "elisp compile failed" + fi +} + +src_test() { + emake test || \ + einfo "note test failure on qtwrapping was expected - nature of portage rather than a true failure" +} + +src_install() { + emake install DESTDIR="${D}" || die "install failed" + if use emacs; then + elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/syntax + doins "${S}"/Docs/cmake-syntax.vim + + insinto /usr/share/vim/vimfiles/indent + doins "${S}"/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-FindPythonInterp.patch b/dev-util/cmake/files/cmake-FindPythonInterp.patch new file mode 100644 index 000000000000..f70d4f83d357 --- /dev/null +++ b/dev-util/cmake/files/cmake-FindPythonInterp.patch @@ -0,0 +1,12 @@ +diff -ur cmake-2.6.2.orig/Modules/FindPythonInterp.cmake cmake-2.6.2/Modules/FindPythonInterp.cmake +--- cmake-2.6.2.orig/Modules/FindPythonInterp.cmake 2008-09-24 20:34:34.000000000 +0200 ++++ cmake-2.6.2/Modules/FindPythonInterp.cmake 2009-01-03 19:54:21.000000000 +0100 +@@ -7,7 +7,7 @@ + # + + FIND_PROGRAM(PYTHON_EXECUTABLE +- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python ++ NAMES python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] |