commit:     b7aa3f39473224c01db14ff6ed623ec2ca7bf93c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  2 20:31:14 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Sep  2 20:35:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7aa3f39

sys-apps/file: Sync live ebuild.

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 sys-apps/file/file-9999.ebuild | 37 +++++++++++++++++++++++--------------
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/sys-apps/file/file-9999.ebuild b/sys-apps/file/file-9999.ebuild
index 05427c55cb7..4f3a87f8bf9 100644
--- a/sys-apps/file/file-9999.ebuild
+++ b/sys-apps/file/file-9999.ebuild
@@ -1,19 +1,19 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=6
 
 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
 DISTUTILS_OPTIONAL=1
 
-inherit eutils distutils-r1 libtool toolchain-funcs multilib-minimal
+inherit distutils-r1 libtool ltprune toolchain-funcs multilib-minimal
 
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://github.com/glensc/file.git";
        inherit autotools git-r3
 else
        SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz";
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd 
~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 
 DESCRIPTION="identify a file's format by scanning binary data for patterns"
@@ -34,19 +34,22 @@ RDEPEND="${DEPEND}
        python? ( !dev-python/python-magic )"
 
 src_prepare() {
+       default
+
        [[ ${PV} == "9999" ]] && eautoreconf
        elibtoolize
 
        # don't let python README kill main README #60043
-       mv python/README{,.python}
+       mv python/README{,.python} || die
 }
 
 multilib_src_configure() {
-       ECONF_SOURCE=${S} \
-       econf \
-               --enable-fsect-man5 \
-               $(use_enable static-libs static) \
+       local myeconfargs=(
+               --enable-fsect-man5
+               $(use_enable static-libs static)
                $(use_enable zlib)
+       )
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
 src_configure() {
@@ -54,8 +57,8 @@ src_configure() {
        # because people often don't keep matching host/target
        # file versions #362941
        if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-               mkdir -p "${WORKDIR}"/build
-               cd "${WORKDIR}"/build
+               mkdir -p "${WORKDIR}"/build || die
+               cd "${WORKDIR}"/build || die
                tc-export_build_env BUILD_C{C,XX}
                ECONF_SOURCE=${S} \
                ac_cv_header_zlib_h=no \
@@ -77,7 +80,7 @@ multilib_src_compile() {
        if multilib_is_native_abi ; then
                emake
        else
-               cd src
+               cd src || die
                emake magic.h #586444
                emake libmagic.la
        fi
@@ -91,20 +94,26 @@ src_compile() {
        fi
        multilib-minimal_src_compile
 
-       use python && cd python && distutils-r1_src_compile
+       if use python ; then
+               cd python || die
+               distutils-r1_src_compile
+       fi
 }
 
 multilib_src_install() {
        if multilib_is_native_abi ; then
                default
        else
-               emake -C src install-{includeHEADERS,libLTLIBRARIES} 
DESTDIR="${D}"
+               emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} 
DESTDIR="${D}"
        fi
 }
 
 multilib_src_install_all() {
        dodoc ChangeLog MAINT README
 
-       use python && cd python && distutils-r1_src_install
+       if use python ; then
+               cd python || die
+               distutils-r1_src_install
+       fi
        prune_libtool_files
 }

Reply via email to