app-arch/rpm2targz: drop old
[gentoo.git] / app-arch / xar / xar-1.8-r3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit flag-o-matic multilib-minimal multilib
6
7 APPLE_PV=417.1
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"
11
12 LICENSE="BSD-2"
13 SLOT="0"
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"
16
17 DEPEND="
18         !kernel_Darwin? (
19                 !kernel_SunOS? ( virtual/acl )
20                 !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
21                 libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
22         )
23         app-arch/bzip2[${MULTILIB_USEDEP}]
24         sys-libs/zlib[${MULTILIB_USEDEP}]
25         dev-libs/libxml2[${MULTILIB_USEDEP}]
26 "
27 RDEPEND="${DEPEND}"
28
29 PATCHES=(
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
34 )
35
36 S=${WORKDIR}/${PN}-${APPLE_PV}/${PN}
37
38 src_prepare() {
39         default
40
41         # make lib headers available (without installing first?)
42         cd "${S}"/include || die
43         mv ../lib/*.h . || die
44
45         # strip RPATH pointing to ED
46         cd "${S}"/src || die
47         sed -i -e 's/@RPATH@//' Makefile.inc.in || die
48
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
52         # the executable
53         echo ".PRECIOUS: @objroot@src/%.o" >> Makefile.inc.in || die
54 }
55
56 multilib_src_configure() {
57         use kernel_Darwin || append-libs $(pkg-config --libs openssl)
58         ECONF_SOURCE=${S} \
59         econf \
60                 --disable-static
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
64         fi
65 }
66
67 multilib_src_install() {
68         default
69         find "${D}" -name '*.la' -delete || die
70 }