app-arch/xar: Fix building (#583668)
authorPacho Ramos <pacho@gentoo.org>
Tue, 6 Jun 2017 12:00:25 +0000 (14:00 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 6 Jun 2017 12:02:49 +0000 (14:02 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

app-arch/xar/files/xar-1.6.1-ext2.patch [new file with mode: 0644]
app-arch/xar/xar-1.6.1-r1.ebuild [new file with mode: 0644]

diff --git a/app-arch/xar/files/xar-1.6.1-ext2.patch b/app-arch/xar/files/xar-1.6.1-ext2.patch
new file mode 100644 (file)
index 0000000..da413b0
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/lib/ext2.c.orig
++++ b/lib/ext2.c
+@@ -139,8 +139,10 @@
+       if(! (flags & ~EXT2_NOCOMPR_FL) )
+               x_addprop(f, "NoCompBlock");
+ #endif
++#ifdef EXT2_ECOMPR_FL
+       if(! (flags & ~EXT2_ECOMPR_FL) )
+               x_addprop(f, "CompError");
++#endif
+       if(! (flags & ~EXT2_BTREE_FL) )
+               x_addprop(f, "BTree");
+       if(! (flags & ~EXT2_INDEX_FL) )
+@@ -225,8 +227,10 @@
+       if( e2prop_get(f, "NoCompBlock", (char **)&tmp) == 0 )
+               flags |= EXT2_NOCOMPR_FL ;
+ #endif
++#ifdef EXT2_ECOMPR_FL
+       if( e2prop_get(f, "CompError", (char **)&tmp) == 0 )
+               flags |= EXT2_ECOMPR_FL ;
++#endif
+       if( e2prop_get(f, "BTree", (char **)&tmp) == 0 )
+               flags |= EXT2_BTREE_FL ;
+       if( e2prop_get(f, "HashIndexed", (char **)&tmp) == 0 )
diff --git a/app-arch/xar/xar-1.6.1-r1.ebuild b/app-arch/xar/xar-1.6.1-r1.ebuild
new file mode 100644 (file)
index 0000000..fe74468
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools ltprune
+
+DESCRIPTION="An easily extensible archive format"
+HOMEPAGE="https://github.com/mackyle/xar"
+SRC_URI="mirror://github/mackyle/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="+bzip2 libressl"
+
+DEPEND="
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+       bzip2? ( app-arch/bzip2 )
+       sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-ext2.patch )
+
+src_prepare() {
+       default
+       eautoconf
+}
+
+src_configure() {
+       econf \
+               $(use_with bzip2) \
+               --disable-static
+}
+
+src_install() {
+       default
+       prune_libtool_files
+}