1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit unpacker toolchain-funcs flag-o-matic
7 DESCRIPTION="pax (Portable Archive eXchange) is the POSIX standard archive tool"
8 HOMEPAGE="https://www.mirbsd.org/pax.htm"
9 SRC_URI="https://www.mirbsd.org/MirOS/dist/mir/cpio/paxmirabilis-${PV}.cpio.gz"
13 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86"
17 elibc_musl? ( sys-libs/fts-standalone )
21 $(unpacker_src_uri_depends)
24 "${FILESDIR}/${PN}-20160306-glibc-to-linux.patch"
29 # Newer C libraries omit this include from sys/types.h.
30 sed -i '1i#include <sys/sysmacros.h>' extern.h || die
35 tc-export CC PKG_CONFIG
39 use elibc_musl && append-ldflags "-lfts"
41 # We can't rely on LFS flags as it uses the fts.h interface which lacks 64-bit support.
43 ${CC} ${CPPFLAGS} ${CFLAGS} \
44 -DPAX_SAFE_PATH=\"/bin:/usr/bin\" \
45 -DHAVE_STRLCPY -DHAVE_VIS -DHAVE_STRMODE \
46 -DLONG_OFF_T -DHAVE_LINKAT \
47 $(${PKG_CONFIG} --cflags libbsd-overlay) \
48 -Wall ${LDFLAGS} *.c -o ${PN} \
49 $(${PKG_CONFIG} --libs libbsd-overlay)
58 dosym pax /usr/bin/paxcpio
59 newman cpio.1 paxcpio.1
61 dosym pax /usr/bin/paxtar