1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit flag-o-matic multilib-minimal multilib
8 DESCRIPTION="An easily extensible archive format"
9 HOMEPAGE="https://opensource.apple.com/source/xar/"
10 SRC_URI="https://opensource.apple.com/tarballs/xar/xar-${APPLE_PV}.tar.gz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="libressl kernel_Darwin"
19 !kernel_SunOS? ( virtual/acl )
20 !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
21 libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
23 app-arch/bzip2[${MULTILIB_USEDEP}]
24 sys-libs/zlib[${MULTILIB_USEDEP}]
25 dev-libs/libxml2[${MULTILIB_USEDEP}]
30 "${FILESDIR}"/${PN}-1.6.1-ext2.patch
31 "${FILESDIR}"/${PN}-1.8-safe_dirname.patch
32 "${FILESDIR}"/${PN}-1.8-arm-ppc.patch
33 "${FILESDIR}"/${PN}-1.8-openssl-1.1.patch
36 S=${WORKDIR}/${PN}-${APPLE_PV}/${PN}
41 # make lib headers available (without installing first?)
42 cd "${S}"/include || die
43 mv ../lib/*.h . || die
45 # strip RPATH pointing to ED
47 sed -i -e 's/@RPATH@//' Makefile.inc.in || die
49 # avoid GNU make (bug?) behaviour of removing xar.o as intermediate
50 # file, this doesn't happen outside portage, but it does from the
51 # ebuild env, causing the install phase to re-compile xar.o and link
53 echo ".PRECIOUS: @objroot@src/%.o" >> Makefile.inc.in || die
56 multilib_src_configure() {
57 use kernel_Darwin || append-libs $(pkg-config --libs openssl)
61 # botched check, fix it up
62 if use kernel_SunOS ; then
63 sed -i -e '/HAVE_SYS_ACL_H/s:^\(.*\)$:/* \1 */:' include/config.h || die
67 multilib_src_install() {
69 find "${D}" -name '*.la' -delete || die