sys-apps/coreutils: Add symlink-usr USE flag

From: Michael Marineau <michael.marineau@coreos.com>
[Rebase to latest]
Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
Michael Marineau 2018-04-24 17:27:02 -07:00 committed by Geoff Levand
parent 03b5f6ab98
commit be9dfcd5cb
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
LICENSE="GPL-3" LICENSE="GPL-3"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~arm-linux ~x86-linux" KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~arm-linux ~x86-linux"
IUSE="acl caps gmp hostname kill multicall nls selinux static test userland_BSD vanilla xattr" IUSE="acl caps gmp hostname kill multicall nls selinux static symlink-usr test userland_BSD vanilla xattr"
LIB_DEPEND="acl? ( sys-apps/acl[static-libs] ) LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
caps? ( sys-libs/libcap ) caps? ( sys-libs/libcap )
@ -166,7 +166,7 @@ src_install() {
insinto /etc insinto /etc
newins src/dircolors.hin DIR_COLORS newins src/dircolors.hin DIR_COLORS
if [[ ${USERLAND} == "GNU" ]] ; then if [[ ${USERLAND} == "GNU" ]] && ! use symlink-usr; then
cd "${ED%/}"/usr/bin || die cd "${ED%/}"/usr/bin || die
dodir /bin dodir /bin
# move critical binaries into /bin (required by FHS) # move critical binaries into /bin (required by FHS)
@ -185,7 +185,7 @@ src_install() {
for x in ${com} uname ; do for x in ${com} uname ; do
dosym ../../bin/${x} /usr/bin/${x} dosym ../../bin/${x} /usr/bin/${x}
done done
else elif [[ ${USERLAND} != "GNU" ]] ; then
# For now, drop the man pages, collides with the ones of the system. # For now, drop the man pages, collides with the ones of the system.
rm -rf "${ED%/}"/usr/share/man rm -rf "${ED%/}"/usr/share/man
fi fi

View File

@ -12,6 +12,7 @@
<flag name="hostname">Build the hostname program</flag> <flag name="hostname">Build the hostname program</flag>
<flag name="kill">Build the kill program</flag> <flag name="kill">Build the kill program</flag>
<flag name="multicall">Build all tools into a single `coreutils` program akin to busybox to save space</flag> <flag name="multicall">Build all tools into a single `coreutils` program akin to busybox to save space</flag>
<flag name="symlink-usr">Make sym links /bin to /usr/bin</flag>
</use> </use>
<upstream> <upstream>
<remote-id type="cpe">cpe:/a:gnu:coreutils</remote-id> <remote-id type="cpe">cpe:/a:gnu:coreutils</remote-id>