From: Sergei Trofimovich Date: Thu, 21 May 2020 22:05:32 +0000 (+0100) Subject: sys-devel/binutils-config: add live ebuild X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8f92925b8d3eceb7e1d66571505ad040089b3921;p=gentoo.git sys-devel/binutils-config: add live ebuild To ease live testing of changes like bug #724454 let's have a live ebuild. Should also be a good hint where default repository hides. Add USE=+native-symlinks flag to install 'as', 'ar' and friends. Bug: https://bugs.gentoo.org/724454 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich --- diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild new file mode 100644 index 000000000000..fdc087086271 --- /dev/null +++ b/sys-devel/binutils-config/binutils-config-9999.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git" + inherit git-r3 +else + SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +fi + +DESCRIPTION="Utility to change the binutils version being used" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+native-symlinks" + +# We also RDEPEND on sys-apps/findutils which is in base @system +RDEPEND="sys-apps/gentoo-functions" + +src_compile() { + emake DESTDIR="${D}" PV="${PV}" USE_NATIVE_LINKS="$(usex native-symlinks)" +} + +src_install() { + emake DESTDIR="${D}" PV="${PV}" install + + use prefix && eprefixify "${ED}"/usr/bin/${PN} +} + +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 +} diff --git a/sys-devel/binutils-config/metadata.xml b/sys-devel/binutils-config/metadata.xml index e396f3755977..3c7c5c4c8e9b 100644 --- a/sys-devel/binutils-config/metadata.xml +++ b/sys-devel/binutils-config/metadata.xml @@ -1,8 +1,11 @@ - - toolchain@gentoo.org - Gentoo Toolchain Project - + + toolchain@gentoo.org + Gentoo Toolchain Project + + + Install native symlinks like 'as' or 'ar' to /usr/bin. Otherwise keep only ${CHOST}-as and friends. +