summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2010-08-26 07:07:43 +0000
committerFabian Groffen <grobian@gentoo.org>2010-08-26 07:07:43 +0000
commit42bc94c28b4ba1cb34b88cf153cafbd35b718e31 (patch)
tree1e436a266130a1a6a77e420c176009461fb290aa /sys-devel
parentBump to EAPI=3, make Prefix aware, add support for Darwin platforms, bug #333617 (diff)
downloadgentoo-2-42bc94c28b4ba1cb34b88cf153cafbd35b718e31.tar.gz
gentoo-2-42bc94c28b4ba1cb34b88cf153cafbd35b718e31.tar.bz2
gentoo-2-42bc94c28b4ba1cb34b88cf153cafbd35b718e31.zip
Bump to EAPI=3, make Prefix aware, add support for Darwin platforms, bug #332605
(Portage version: 2.2.01.15553-prefix/cvs/Darwin powerpc)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/clang/ChangeLog7
-rw-r--r--sys-devel/clang/clang-2.7-r2.ebuild25
-rw-r--r--sys-devel/clang/clang-9999.ebuild23
3 files changed, 45 insertions, 10 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog
index 05055b6521e7..cd97f657bad8 100644
--- a/sys-devel/clang/ChangeLog
+++ b/sys-devel/clang/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-devel/clang
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.19 2010/08/19 19:32:20 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.20 2010/08/26 07:07:43 grobian Exp $
+
+ 26 Aug 2010; Fabian Groffen <grobian@gentoo.org> clang-2.7-r2.ebuild,
+ clang-9999.ebuild:
+ Bump to EAPI=3, make Prefix aware, add support for Darwin platforms, bug
+ #332605
19 Aug 2010; Bernard Cafarelli <voyageur@gentoo.org> clang-9999.ebuild:
system-cxx-headers was missing in -9999 IUSE, spotted by Jack Lloyd
diff --git a/sys-devel/clang/clang-2.7-r2.ebuild b/sys-devel/clang/clang-2.7-r2.ebuild
index 421d384538a0..10e840f5678b 100644
--- a/sys-devel/clang/clang-2.7-r2.ebuild
+++ b/sys-devel/clang/clang-2.7-r2.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.7-r2.ebuild,v 1.1 2010/07/27 13:06:47 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.7-r2.ebuild,v 1.2 2010/08/26 07:07:43 grobian Exp $
-EAPI=2
+EAPI=3
RESTRICT_PYTHON_ABIS="3.*"
SUPPORT_PYTHON_ABIS="1"
@@ -17,7 +17,7 @@ SRC_URI="http://llvm.org/releases/${PV}/llvm-${PV}.tgz
LICENSE="UoI-NCSA"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
IUSE="debug +static-analyzer system-cxx-headers test"
# Note: for LTO support, clang will depend on binutils with gold plugins, and LLVM built after that - http://llvm.org/docs/GoldPlugin.html
@@ -50,7 +50,7 @@ src_prepare() {
# From llvm src_prepare
einfo "Fixing install dirs"
sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \
- -e 's,^PROJ_etcdir.*,PROJ_etcdir := /etc/llvm,' \
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \
-e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir), \
-i Makefile.config.in || die "Makefile.config sed failed"
@@ -73,6 +73,12 @@ src_configure() {
--disable-expensive-checks"
fi
+ # Setup the search path to include the Prefix includes
+ if use prefix ; then
+ CONF_FLAGS="${CONF_FLAGS} \
+ --with-c-include-dirs=${EPREFIX}/usr/include:/usr/include"
+ fi
+
if use amd64; then
CONF_FLAGS="${CONF_FLAGS} --enable-pic"
fi
@@ -127,10 +133,19 @@ src_install() {
install-scan-view() {
insinto "$(python_get_sitedir)"/clang
doins Reporter.py Resources ScanView.py startfile.py
- touch "${D}"/"$(python_get_sitedir)"/clang/__init__.py
+ touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py
}
python_execute_function install-scan-view
fi
+
+ # Fix install_names on Darwin. The build system is too complicated
+ # to just fix this, so we correct it post-install
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ for lib in libCIndex.dylib ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/${lib} \
+ "${ED}"/usr/lib/${lib}
+ done
+ fi
}
pkg_postinst() {
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
index 0e579d55a6b6..8ec648edd72b 100644
--- a/sys-devel/clang/clang-9999.ebuild
+++ b/sys-devel/clang/clang-9999.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-9999.ebuild,v 1.5 2010/08/19 19:32:20 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-9999.ebuild,v 1.6 2010/08/26 07:07:43 grobian Exp $
-EAPI=2
+EAPI=3
RESTRICT_PYTHON_ABIS="3.*"
SUPPORT_PYTHON_ABIS="1"
@@ -53,7 +53,7 @@ src_prepare() {
# From llvm src_prepare
einfo "Fixing install dirs"
sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \
- -e 's,^PROJ_etcdir.*,PROJ_etcdir := /etc/llvm,' \
+ -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \
-e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir), \
-i Makefile.config.in || die "Makefile.config sed failed"
@@ -76,6 +76,12 @@ src_configure() {
--disable-expensive-checks"
fi
+ # Setup the search path to include the Prefix includes
+ if use prefix ; then
+ CONF_FLAGS="${CONF_FLAGS} \
+ --with-c-include-dirs=${EPREFIX}/usr/include:/usr/include"
+ fi
+
if use amd64; then
CONF_FLAGS="${CONF_FLAGS} --enable-pic"
fi
@@ -130,10 +136,19 @@ src_install() {
install-scan-view() {
insinto "$(python_get_sitedir)"/clang
doins Reporter.py Resources ScanView.py startfile.py
- touch "${D}"/"$(python_get_sitedir)"/clang/__init__.py
+ touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py
}
python_execute_function install-scan-view
fi
+
+ # Fix install_names on Darwin. The build system is too complicated
+ # to just fix this, so we correct it post-install
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ for lib in libCIndex.dylib ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/${lib} \
+ "${ED}"/usr/lib/${lib}
+ done
+ fi
}
pkg_postinst() {