--- pax-20160306.ebuild.old 2016-03-07 02:06:56.000000000 -0600 +++ pax-20160306.ebuild 2016-04-17 13:05:30.009006694 -0500 @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="5" +EAPI="6" -inherit unpacker toolchain-funcs +inherit unpacker toolchain-funcs flag-o-matic DESCRIPTION="pax (Portable Archive eXchange) is the POSIX standard archive tool" HOMEPAGE="https://www.mirbsd.org/pax.htm" @@ -15,15 +15,19 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="" -RDEPEND="dev-libs/libbsd" +RDEPEND="dev-libs/libbsd + elibc_musl? ( sys-libs/fts-standalone )" DEPEND="${RDEPEND} $(unpacker_src_uri_depends)" S=${WORKDIR}/${PN} +PATCHES=( "${FILESDIR}/${P}-glibc-to-linux.patch" ) + src_prepare() { # Newer C libraries omit this include from sys/types.h. sed -i '1i#include ' extern.h || die + default } src_configure() { @@ -31,6 +35,8 @@ } src_compile() { + use elibc_musl && append-ldflags "-lfts" + # We can't rely on LFS flags as it uses the fts.h interface which lacks 64-bit support. set -- \ ${CC} ${CPPFLAGS} ${CFLAGS} \