sys-devel/binutils-config: fix --version output #612438
authorMike Frysinger <vapier@gentoo.org>
Sun, 12 Mar 2017 21:39:31 +0000 (14:39 -0700)
committerMike Frysinger <vapier@gentoo.org>
Sun, 12 Mar 2017 21:40:10 +0000 (14:40 -0700)
sys-devel/binutils-config/binutils-config-5-r3.ebuild [moved from sys-devel/binutils-config/binutils-config-5-r2.ebuild with 90% similarity]
sys-devel/binutils-config/files/binutils-config-5

similarity index 90%
rename from sys-devel/binutils-config/binutils-config-5-r2.ebuild
rename to sys-devel/binutils-config/binutils-config-5-r3.ebuild
index ac64d4eaa4b973bcc1492ef57b66eed3e9588fec..6a486bdebf466b374a07eb6e1a662d396d730173 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="4"
+EAPI="5"
 
 inherit prefix
 
@@ -23,6 +23,7 @@ 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
index 4c0f36249a7d624d335061176c170ce31deec280..acb72b7e343589f147a1d3585cd6963a232bd0c0 100755 (executable)
@@ -403,12 +403,8 @@ while [[ $# -gt 0 ]] ; do
                -d|--debug)                DEBUG="yes" ;;
                -h|--help)                 usage 0 ;;
                -V|--version)
-                       unset Header
-                       cvsver="$Id$"
-                       cvsver=${cvsver##*binutils-config-}
-                       bver=${cvsver%%,v *}
-                       cvsver=${cvsver#* }
-                       echo "binutils-config-${bver} (r${cvsver%% *})"
+                       ver="@PV@"
+                       echo "binutils-config-${ver/@'PV'@/git}"
                        exit 0
                        ;;
                -*)