summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-04-30 15:09:25 +0000
committerFabian Groffen <grobian@gentoo.org>2012-04-30 15:09:25 +0000
commitc2db79021f54a733d58862cdc86ee7c2a881e73f (patch)
treec7d718fa9ab716d146d2ff8c29b18e0327d74206 /sys-devel/llvm
parentImprove LDFLAGS patch. (diff)
downloadgentoo-2-c2db79021f54a733d58862cdc86ee7c2a881e73f.tar.gz
gentoo-2-c2db79021f54a733d58862cdc86ee7c2a881e73f.tar.bz2
gentoo-2-c2db79021f54a733d58862cdc86ee7c2a881e73f.zip
Extract the version LLVM refers to internally so we can properly fix install_names on Darwin, bug #412137
(Portage version: 2.2.01.20430-prefix/cvs/Darwin i386)
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/ChangeLog6
-rw-r--r--sys-devel/llvm/llvm-9999.ebuild12
2 files changed, 12 insertions, 6 deletions
diff --git a/sys-devel/llvm/ChangeLog b/sys-devel/llvm/ChangeLog
index f7d27cf7eb68..f75e5e8e1f2a 100644
--- a/sys-devel/llvm/ChangeLog
+++ b/sys-devel/llvm/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-devel/llvm
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.67 2012/04/13 14:16:55 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.68 2012/04/30 15:09:25 grobian Exp $
+
+ 30 Apr 2012; Fabian Groffen <grobian@gentoo.org> llvm-9999.ebuild:
+ Extract the version LLVM refers to internally so we can properly fix
+ install_names on Darwin, bug #412137
13 Apr 2012; Bernard Cafarelli <voyageur@gentoo.org> -llvm-3.0-r1.ebuild,
llvm-3.0-r2.ebuild, llvm-9999.ebuild:
diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index a38524cac9d3..714564b5706f 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.23 2012/04/13 14:16:55 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.24 2012/04/30 15:09:25 grobian Exp $
EAPI="4"
PYTHON_DEPEND="2"
@@ -152,9 +152,11 @@ src_install() {
# Fix install_names on Darwin. The build system is too complicated
# to just fix this, so we correct it post-install
- local lib= f= odylib=
+ local lib= f= odylib= libpv=${PV}
if [[ ${CHOST} == *-darwin* ]] ; then
- for lib in lib{EnhancedDisassembly,LLVM-${PV},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do
+ eval $(grep PACKAGE_VERSION= configure)
+ [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION}
+ for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do
# libEnhancedDisassembly is Darwin10 only, so non-fatal
[[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue
ebegin "fixing install_name of $lib"
@@ -164,11 +166,11 @@ src_install() {
eend $?
done
for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do
- odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${PV}.dylib)
+ odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib)
ebegin "fixing install_name reference to ${odylib} of ${f##*/}"
install_name_tool \
-change "${odylib}" \
- "${EPREFIX}"/usr/lib/${PN}/libLLVM-${PV}.dylib \
+ "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \
"${f}"
eend $?
done