binutils-config: upgraded package to upstream

Upgraded sys-devel/binutils-config to version 5.3.1 on amd64

BUG=chromium:710073
TEST=CQ, SDK tryjob

Cq-Depend: chromium:956557
Change-Id: I18b939900da562e5e5c2d37d0c079dcb9713e699
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2244435
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
diff --git a/metadata/md5-cache/sys-devel/binutils-config-5.2 b/metadata/md5-cache/sys-devel/binutils-config-5.2
deleted file mode 100644
index 8f6a2ed..0000000
--- a/metadata/md5-cache/sys-devel/binutils-config-5.2
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install preinst
-DESCRIPTION=Utility to change the binutils version being used
-EAPI=7
-HOMEPAGE=https://wiki.gentoo.org/wiki/Project:Toolchain
-KEYWORDS=*
-LICENSE=GPL-2
-RDEPEND=sys-apps/gentoo-functions
-SLOT=0
-_eclasses_=prefix	e51c7882b7b721e54e684f7eb143cbfe
-_md5_=6a2782b7c28bc883fde64a5c8df455fb
diff --git a/metadata/md5-cache/sys-devel/binutils-config-5.3.1 b/metadata/md5-cache/sys-devel/binutils-config-5.3.1
new file mode 100644
index 0000000..944fd34
--- /dev/null
+++ b/metadata/md5-cache/sys-devel/binutils-config-5.3.1
@@ -0,0 +1,12 @@
+DEFINED_PHASES=compile install postinst
+DESCRIPTION=Utility to change the binutils version being used
+EAPI=7
+HOMEPAGE=https://wiki.gentoo.org/wiki/Project:Toolchain
+IUSE=+native-symlinks
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=sys-apps/gentoo-functions
+SLOT=0
+SRC_URI=https://dev.gentoo.org/~slyfox/distfiles/binutils-config-5.3.1.tar.xz
+_eclasses_=prefix	e51c7882b7b721e54e684f7eb143cbfe
+_md5_=a6fe41e0e998c6dec8646c82e52693fa
diff --git a/sys-devel/binutils-config/Manifest b/sys-devel/binutils-config/Manifest
new file mode 100644
index 0000000..38ab097
--- /dev/null
+++ b/sys-devel/binutils-config/Manifest
@@ -0,0 +1 @@
+DIST binutils-config-5.3.1.tar.xz 6688 BLAKE2B 3bc1b96a96b0c30e425f4ffd42f86a09e2a80cc3ad1dcf77d4b5d2d9eb3d6bc607f78dfff1ae888fe8abfe44405a1e4d1ab325aa92fc5889c18aa3187a506647 SHA512 c6d188b70935604a8a519c036dda210c20e5b6e916fab33e5026bd5c78adfff0a1aa85003759b751275576ff33471b25c920beb6b1c088115f28918389e09ce2
diff --git a/sys-devel/binutils-config/binutils-config-5.2.ebuild b/sys-devel/binutils-config/binutils-config-5.2.ebuild
deleted file mode 100644
index ed10778..0000000
--- a/sys-devel/binutils-config/binutils-config-5.2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit prefix
-
-DESCRIPTION="Utility to change the binutils version being used"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE=""
-
-# We also RDEPEND on sys-apps/findutils which is in base @system
-RDEPEND="sys-apps/gentoo-functions"
-
-S=${WORKDIR}
-
-src_install() {
-	newbin "${FILESDIR}"/${PN}-${PV} ${PN}
-	use prefix && eprefixify "${ED}"/usr/bin/${PN}
-	sed -i "s:@PV@:${PVR}:g" "${ED}"/usr/bin/${PN} || die
-	doman "${FILESDIR}"/${PN}.8
-
-	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
-}
diff --git a/sys-devel/binutils-config/binutils-config-5.3.1.ebuild b/sys-devel/binutils-config/binutils-config-5.3.1.ebuild
new file mode 100644
index 0000000..43bf1b7
--- /dev/null
+++ b/sys-devel/binutils-config/binutils-config-5.3.1.ebuild
@@ -0,0 +1,43 @@
+# 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="*"
+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_postinst() {
+	# Re-register all targets. USE flags or new versions can change
+	# installed symlinks.
+	local x
+	for x in $(binutils-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
+		binutils-config ${x}
+	done
+}