Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 587890
Collapse All | Expand All

(-)a/app-arch/libarchive/files/libarchive-3.2.1-osx-fix-acl.patch (+32 lines)
Line 0 Link Here
1
From 3e66829717c8fde611b2b611497f08a46da40ce7 Mon Sep 17 00:00:00 2001
2
From: Joerg Sonnenberger <joerg@bec.de>
3
Date: Tue, 21 Jun 2016 18:29:07 +0200
4
Subject: [PATCH] Dummy out copy_acls if sys/acl.h is missing or ACL support is
5
 disabled.
6
7
---
8
 libarchive/archive_write_disk_posix.c | 4 ++++
9
 1 file changed, 4 insertions(+)
10
11
diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
12
index 6737cd7..67aacf1 100644
13
--- a/libarchive/archive_write_disk_posix.c
14
+++ b/libarchive/archive_write_disk_posix.c
15
@@ -3487,6 +3487,9 @@ copy_xattrs(struct archive_write_disk *a, int tmpfd, int dffd)
16
 static int
17
 copy_acls(struct archive_write_disk *a, int tmpfd, int dffd)
18
 {
19
+#ifndef HAVE_SYS_ACL_H
20
+	return 0;
21
+#else
22
 	acl_t acl, dfacl = NULL;
23
 	int acl_r, ret = ARCHIVE_OK;
24
 
25
@@ -3514,6 +3517,7 @@ copy_acls(struct archive_write_disk *a, int tmpfd, int dffd)
26
 	if (dfacl)
27
 		acl_free(dfacl);
28
 	return (ret);
29
+#endif
30
 }
31
 
32
 static int
(-)a/app-arch/libarchive/libarchive-3.2.1-r2.ebuild (-117 lines)
Lines 1-117 Link Here
1
# Copyright 1999-2016 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
4
5
EAPI=6
6
inherit autotools eutils multilib-minimal toolchain-funcs
7
8
DESCRIPTION="BSD tar command"
9
HOMEPAGE="http://www.libarchive.org/"
10
SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
11
12
LICENSE="BSD BSD-2 BSD-4 public-domain"
13
SLOT="0/13"
14
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15
IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
16
17
RDEPEND="
18
	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
19
	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
20
	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
21
	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
22
	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
23
	kernel_linux? (
24
		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
25
	)
26
	!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
27
	libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
28
	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
29
	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
30
	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
31
	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
32
	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
33
DEPEND="${RDEPEND}
34
	kernel_linux? (
35
		virtual/os-headers
36
		e2fsprogs? ( sys-fs/e2fsprogs )
37
	)"
38
39
PATCHES=( "${FILESDIR}/${P}-fix-tests-gnu99.patch" )
40
41
multilib_src_configure() {
42
	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
43
44
	local myconf=()
45
	myconf=(
46
		$(use_enable acl)
47
		$(use_enable static-libs static)
48
		$(use_enable xattr)
49
		$(use_with bzip2 bz2lib)
50
		$(use_with expat)
51
		$(use_with !expat xml2)
52
		$(use_with iconv)
53
		$(use_with lz4)
54
		$(use_with lzma)
55
		$(use_with lzo lzo2)
56
		$(use_with nettle)
57
		$(use_with zlib)
58
	)
59
	if multilib_is_native_abi ; then myconf+=(
60
		--enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
61
		--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
62
		--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
63
	); else myconf+=(
64
		--disable-bsdcat
65
		--disable-bsdcpio
66
		--disable-bsdtar
67
	); fi
68
69
	# We disable lzmadec because we support the newer liblzma from xz-utils
70
	# and not liblzmadec with this version.
71
	myconf+=(
72
		--without-lzmadec
73
	)
74
75
	ECONF_SOURCE="${S}" econf "${myconf[@]}"
76
}
77
78
multilib_src_compile() {
79
	if multilib_is_native_abi ; then
80
		emake
81
	else
82
		emake libarchive.la
83
	fi
84
}
85
86
multilib_src_test() {
87
	# Replace the default src_test so that it builds tests in parallel
88
	multilib_is_native_abi && emake check
89
}
90
91
multilib_src_install() {
92
	if multilib_is_native_abi ; then
93
		emake DESTDIR="${D}" install
94
95
		# Create symlinks for FreeBSD
96
		if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
97
			for bin in cat cpio tar; do
98
				dosym bsd${bin} /usr/bin/${bin}
99
				echo '.so bsd${bin}.1' > "${T}"/${bin}.1
100
				doman "${T}"/${bin}.1
101
			done
102
		fi
103
	else
104
		emake DESTDIR="${D}" \
105
			install-includeHEADERS \
106
			install-libLTLIBRARIES \
107
			install-pkgconfigDATA
108
	fi
109
110
	# Libs.private: should be used from libarchive.pc instead
111
	prune_libtool_files
112
}
113
114
multilib_src_install_all() {
115
	cd "${S}" || die
116
	einstalldocs
117
}
(-)a/app-arch/libarchive/libarchive-3.2.1-r3.ebuild (-1 / +125 lines)
Line 0 Link Here
0
- 
1
# Copyright 1999-2016 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
4
5
EAPI=6
6
inherit autotools eutils multilib-minimal toolchain-funcs
7
8
DESCRIPTION="BSD tar command"
9
HOMEPAGE="http://www.libarchive.org/"
10
SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
11
12
LICENSE="BSD BSD-2 BSD-4 public-domain"
13
SLOT="0/13"
14
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15
IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs xattr +zlib"
16
17
RDEPEND="
18
	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
19
	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
20
	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
21
	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
22
	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
23
	kernel_linux? (
24
		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
25
	)
26
	!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
27
	libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
28
	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
29
	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
30
	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
31
	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
32
	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
33
DEPEND="${RDEPEND}
34
	kernel_linux? (
35
		virtual/os-headers
36
		e2fsprogs? ( sys-fs/e2fsprogs )
37
	)"
38
39
PATCHES=(
40
	"${FILESDIR}/${P}-fix-tests-gnu99.patch"
41
	"${FILESDIR}/${P}-osx-fix-acl.patch" #587890
42
)
43
44
src_prepare() {
45
	default
46
	eautoreconf
47
}
48
49
multilib_src_configure() {
50
	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
51
52
	local myconf=()
53
	myconf=(
54
		$(use_enable acl)
55
		$(use_enable static-libs static)
56
		$(use_enable xattr)
57
		$(use_with bzip2 bz2lib)
58
		$(use_with expat)
59
		$(use_with !expat xml2)
60
		$(use_with iconv)
61
		$(use_with lz4)
62
		$(use_with lzma)
63
		$(use_with lzo lzo2)
64
		$(use_with nettle)
65
		$(use_with zlib)
66
	)
67
	if multilib_is_native_abi ; then myconf+=(
68
		--enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
69
		--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
70
		--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
71
	); else myconf+=(
72
		--disable-bsdcat
73
		--disable-bsdcpio
74
		--disable-bsdtar
75
	); fi
76
77
	# We disable lzmadec because we support the newer liblzma from xz-utils
78
	# and not liblzmadec with this version.
79
	myconf+=(
80
		--without-lzmadec
81
	)
82
83
	ECONF_SOURCE="${S}" econf "${myconf[@]}"
84
}
85
86
multilib_src_compile() {
87
	if multilib_is_native_abi ; then
88
		emake
89
	else
90
		emake libarchive.la
91
	fi
92
}
93
94
multilib_src_test() {
95
	# Replace the default src_test so that it builds tests in parallel
96
	multilib_is_native_abi && emake check
97
}
98
99
multilib_src_install() {
100
	if multilib_is_native_abi ; then
101
		emake DESTDIR="${D}" install
102
103
		# Create symlinks for FreeBSD
104
		if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
105
			for bin in cat cpio tar; do
106
				dosym bsd${bin} /usr/bin/${bin}
107
				echo '.so bsd${bin}.1' > "${T}"/${bin}.1
108
				doman "${T}"/${bin}.1
109
			done
110
		fi
111
	else
112
		emake DESTDIR="${D}" \
113
			install-includeHEADERS \
114
			install-libLTLIBRARIES \
115
			install-pkgconfigDATA
116
	fi
117
118
	# Libs.private: should be used from libarchive.pc instead
119
	prune_libtool_files
120
}
121
122
multilib_src_install_all() {
123
	cd "${S}" || die
124
	einstalldocs
125
}

Return to bug 587890