commit:     0c14b8df377c1f45cb05e838cf22f9b891acb912
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  4 16:49:51 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jan  4 16:49:51 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c14b8df

app-arch/tar: fix USE=static

Closes: https://bugs.gentoo.org/674506
Package-Manager: Portage-2.3.53, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-arch/tar/tar-1.31.ebuild | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/app-arch/tar/tar-1.31.ebuild b/app-arch/tar/tar-1.31.ebuild
index 71881369353..e26707c8e5d 100644
--- a/app-arch/tar/tar-1.31.ebuild
+++ b/app-arch/tar/tar-1.31.ebuild
@@ -15,10 +15,13 @@ SLOT="0"
 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr"
 
-RDEPEND="acl? ( virtual/acl )
+LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )"
+
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
        selinux? ( sys-libs/libselinux )"
 DEPEND="${RDEPEND}
        nls? ( >=sys-devel/gettext-0.10.35 )
+       static? ( ${LIB_DEPEND} )
        xattr? ( elibc_glibc? ( sys-apps/attr ) )"
 
 src_prepare() {
@@ -35,9 +38,9 @@ src_prepare() {
 src_configure() {
        use static && append-ldflags -static
        local myeconfargs=(
-               --bindir="${EPREFIX}"/bin
+               --bindir="${EPREFIX%/}"/bin
                --enable-backup-scripts
-               --libexecdir="${EPREFIX}"/usr/sbin
+               --libexecdir="${EPREFIX%/}"/usr/sbin
                $(usex userland_GNU "" "--program-prefix=g")
                $(use_with acl posix-acls)
                $(use_enable nls)
@@ -69,7 +72,7 @@ src_install() {
        mv "${ED%/}"/usr/sbin/${p}restore{,-tar} || die
 
        if use minimal ; then
-               find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+               find "${ED%/}"/etc "${ED%/}"/*bin/ "${ED%/}"/usr/*bin/ \
                        -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
                        -delete || die
        fi

Reply via email to