summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-12-29 16:01:38 +0100
committerFabian Groffen <grobian@gentoo.org>2017-12-29 16:01:38 +0100
commit5512e7b13a99aed764a069dc1ad7aa3059203b8d (patch)
tree5894f6a1e77aea45686eaf0b960ffdb35ea0d2a8
parentsys-devel/binutils-config: Use -rpath on Darwin (diff)
downloadprefix-5512e7b13a99aed764a069dc1ad7aa3059203b8d.tar.gz
prefix-5512e7b13a99aed764a069dc1ad7aa3059203b8d.tar.bz2
prefix-5512e7b13a99aed764a069dc1ad7aa3059203b8d.zip
sys-devel/binutils-config: revbump to enable -rpath on Darwin
Closes: https://bugs.gentoo.org/642616 Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6
-rw-r--r--sys-devel/binutils-config/Manifest1
-rw-r--r--sys-devel/binutils-config/binutils-config-5-r03.1.ebuild2
-rw-r--r--sys-devel/binutils-config/binutils-config-5-r03.2.ebuild2
-rw-r--r--sys-devel/binutils-config/binutils-config-5-r03.3.ebuild77
4 files changed, 80 insertions, 2 deletions
diff --git a/sys-devel/binutils-config/Manifest b/sys-devel/binutils-config/Manifest
index 335242f446..06ed4c2363 100644
--- a/sys-devel/binutils-config/Manifest
+++ b/sys-devel/binutils-config/Manifest
@@ -1,2 +1,3 @@
DIST binutils-config-ldwrapper-5.3.1.c 8342 BLAKE2B 18658a8188acfcd7494981bd60f53590f5610c7ffd9173f223da740c09acd9ed40aaf911faa6f9a517e5e8779cbaaea9d4398679b7a3037655a7994d9c319345 SHA512 af21c1b9bb465990e8490641023403ec27e31bd69f94fc86572392285a540ddc25d59fd8f682c0cb2d2a84c5e33fea08bd0ec2cb52861147075ccfd5e18067b0
DIST binutils-config-ldwrapper-5.3.2.c 11791 BLAKE2B 7284c1f201b581b87a3dccfd9c572e0e03fa81af1c72fcd4edce15c53c04329316aa20a1135f7b728e35b3551ebb418eacc599da6a4803924dfddf7fbccaf1be SHA512 5e0917d50ba1cb0daee71bdd225809579bfc0a129c7bed234346f17a21aec6a0cddde35d5bc598924e840c45d6f9e738fd09f969904ca5df6041d38e5e0f0c2e
+DIST binutils-config-ldwrapper-5.3.3.c 13467 BLAKE2B 4ae75c9eb91264d4c300c88419ae3470ae0271473fd1d2267d9b2aa5907423dd646e9feac1e1f215b1a4fa29f59a2e7d02d27118d6e2a7202bc9916a982a21bb SHA512 44892b4e00db432025e3bab08284f2bac5993a554f056fe66d4f85e9020d894e57c7080e41507435e8a4337d48268362045644fa9e7eed2d81c8004c92e6f1c5
diff --git a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
index 142a1e62ee..c42663d6d1 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.1.ebuild
@@ -41,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
- -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+ -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
$([[ ${CHOST} == *-darwin* ]] && echo -DTARGET_DARWIN)
diff --git a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
index 7aaa0d9ed7..f6ea065833 100644
--- a/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
+++ b/sys-devel/binutils-config/binutils-config-5-r03.2.ebuild
@@ -41,7 +41,7 @@ src_compile() {
$(tc-getCC)
${CPPFLAGS}
${CFLAGS}
- -o ldwrapper "${S}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+ -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
-DEPREFIX=\"${EPREFIX}\"
-DCHOST=\"${CHOST}\"
${LDFLAGS}
diff --git a/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild b/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
new file mode 100644
index 0000000000..3e79943a7f
--- /dev/null
+++ b/sys-devel/binutils-config/binutils-config-5-r03.3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils prefix
+
+DESCRIPTION="Utility to change the binutils version being used"
+HOMEPAGE="https://www.gentoo.org/"
+GIT_REV="b93602ba2a0f76a9a85cb36a1740a4522e45ce36"
+WRAPPER_REV="${PV}.3.3"
+SRC_URI="https://gitweb.gentoo.org/repo/proj/prefix.git/plain/sys-devel/binutils-config/files/ldwrapper.c?id=${GIT_REV} -> ${PN}-ldwrapper-${WRAPPER_REV}.c"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+# We also RDEPEND on sys-apps/findutils which is in base @system
+RDEPEND="sys-apps/gentoo-functions
+ !<app-admin/eselect-1.4.5"
+
+S=${WORKDIR}
+
+# NOTE: the ld wrapper is only enabled on rpath versions of prefix.
+src_prepare() {
+ cp "${FILESDIR}"/${PN}-${PV} ./${PN} || die
+ if use prefix-guest; then
+ epatch "${FILESDIR}/${PN}-5-ldwrapper.patch"
+ fi
+ eprefixify ${PN}
+ eapply_user
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ use prefix-guest || return
+ local args=(
+ $(tc-getCC)
+ ${CPPFLAGS}
+ ${CFLAGS}
+ -o ldwrapper "${DISTDIR}"/${PN}-ldwrapper-${WRAPPER_REV}.c
+ -DEPREFIX=\"${EPREFIX}\"
+ -DCHOST=\"${CHOST}\"
+ ${LDFLAGS}
+ )
+ echo ${args[*]}
+ "${args[@]}" || die
+}
+
+src_install() {
+ dobin ${PN}
+ use prefix && eprefixify "${ED}"/usr/bin/${PN}
+ sed -i "s:@PV@:${PVR}:g" "${ED}"/usr/bin/${PN} || die
+ doman "${FILESDIR}"/${PN}.8
+
+ dodir /usr/$(get_libdir)/misc/binutils-config
+ mv "${S}"/ldwrapper "${ED}"/usr/$(get_libdir)/misc/binutils-config/
+
+ insinto /usr/share/eselect/modules
+ doins "${FILESDIR}"/binutils.eselect
+}
+
+pkg_preinst() {
+ # Force a refresh when upgrading from an older version that symlinked
+ # in all the libs & includes that binutils-libs handles. #528088
+ if has_version "<${CATEGORY}/${PN}-5" ; then
+ local bc current
+ bc="${ED}/usr/bin/binutils-config"
+ if current=$("${bc}" -c) ; then
+ "${bc}" "${current}"
+ fi
+ fi
+}