--- cmake-2.6.0.ebuild 2008-05-08 17:53:11.000000000 +0200 +++ cmake-2.6.1.ebuild 2008-08-27 01:33:05.201647093 +0200 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.6.0.ebuild,v 1.1 2008/05/08 15:53:11 cryos Exp $ -inherit elisp-common toolchain-funcs eutils versionator qt3 flag-o-matic +EAPI="1" + +inherit elisp-common toolchain-funcs eutils versionator flag-o-matic MY_PV="${PV/rc/RC-}" MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})" @@ -14,13 +16,16 @@ LICENSE="CMake" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="emacs vim-syntax" +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 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 ) )" @@ -29,6 +34,8 @@ SITEFILE="50${PN}-gentoo.el" VIMFILE="${PN}.vim" +S="${WORKDIR}/${MY_P}" + pkg_setup() { if ! built_with_use -o dev-libs/xmlrpc-c curl libwww; then echo @@ -44,6 +51,12 @@ unpack ${A} cd "${S}" + # Fix compatibility with -Wl,--gc-sections, bug #235731 + epatch "${FILESDIR}/${PN}-2.6.1-gc-sections.patch" + + # Fix rpath handling security, bug #224901 + epatch "${FILESDIR}/${PN}-2.6.1-rpath.patch" + # Link against the shared Python library rather than the static one epatch "${FILESDIR}/${PN}-FindPythonLibs.patch" } @@ -55,12 +68,32 @@ 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 + + ./bootstrap \ --system-libs \ --prefix=/usr \ --docdir=/share/doc/${PF} \ --datadir=/share/${PN} \ - --mandir=/share/man || die "./bootstrap failed" + --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"