summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-12-01 14:52:51 +0100
committerMichał Górny <mgorny@gentoo.org>2017-12-02 00:40:25 +0100
commitaf80621b07f943bce5280a00468f2688c2df23b1 (patch)
tree6d0685f16e3849718feb743d8e17f02842339566 /sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild
parentsci-libs/pymmlib: [QA] Fix DESCRIPTION.toolong (diff)
downloadgentoo-af80621b07f943bce5280a00468f2688c2df23b1.tar.gz
gentoo-af80621b07f943bce5280a00468f2688c2df23b1.tar.bz2
gentoo-af80621b07f943bce5280a00468f2688c2df23b1.zip
sys-devel/gcc-config: Fix storing libdir & PV in installed executable
Fix the ebuild to pass libdir & PV during src_compile() rather than delaying it until src_install(). This is necessary since the gcc-config executable is created during the compile phase, and there is no reason why make would recreate it during install. As a result, gcc-config was installed with vanilla 'lib' libdir and 'git' version.
Diffstat (limited to 'sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild')
-rw-r--r--sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild49
1 files changed, 49 insertions, 0 deletions
diff --git a/sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild
new file mode 100644
index 00000000000..b27cc3b5c41
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-1.9.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="Utility to manage compilers"
+HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=sys-apps/gentoo-functions-0.10"
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ PV="${PV}" \
+ SUBLIBDIR="$(get_libdir)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PV="${PV}" \
+ SUBLIBDIR="$(get_libdir)" \
+ install
+}
+
+pkg_postinst() {
+ # Scrub eselect-compiler remains
+ rm -f "${ROOT}"/etc/env.d/05compiler &
+
+ # We not longer use the /usr/include/g++-v3 hacks, as
+ # it is not needed ...
+ rm -f "${ROOT}"/usr/include/g++{,-v3} &
+
+ # Do we have a valid multi ver setup ?
+ local x
+ for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
+ gcc-config ${x}
+ done
+
+ wait
+}