1 |
commit: 12c1bdd7ae9904e58156c2aa74e16dc83ee4e5f4 |
2 |
Author: ktrace <coyote <AT> bks <DOT> tv> |
3 |
AuthorDate: Sat Jul 14 22:21:41 2018 +0000 |
4 |
Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 16 13:35:07 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12c1bdd7 |
7 |
|
8 |
app-arch/rpm: fix automagic, add USE "zstd" |
9 |
|
10 |
Fix automagic dependency on app-arch/zstd, add USE zstd |
11 |
|
12 |
Bug: https://bugs.gentoo.org/658746 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/9232 |
14 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
15 |
Closes: https://github.com/gentoo/gentoo/pull/9232 |
16 |
Closes: https://bugs.gentoo.org/658746 |
17 |
|
18 |
app-arch/rpm/metadata.xml | 6 ++ |
19 |
app-arch/rpm/rpm-4.14.1-r1.ebuild | 133 ++++++++++++++++++++++++++++++++++++++ |
20 |
2 files changed, 139 insertions(+) |
21 |
|
22 |
diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml |
23 |
index 7a38bb90096..e8a64db778c 100644 |
24 |
--- a/app-arch/rpm/metadata.xml |
25 |
+++ b/app-arch/rpm/metadata.xml |
26 |
@@ -2,4 +2,10 @@ |
27 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
28 |
<pkgmetadata> |
29 |
<!-- maintainer-needed --> |
30 |
+ <use> |
31 |
+ <flag name="zstd">Enable support for ZSTD compression using <pkg>app-arch/zstd</pkg></flag> |
32 |
+ </use> |
33 |
+ <upstream> |
34 |
+ <remote-id type="github">rpm-software-management/rpm</remote-id> |
35 |
+ </upstream> |
36 |
</pkgmetadata> |
37 |
|
38 |
diff --git a/app-arch/rpm/rpm-4.14.1-r1.ebuild b/app-arch/rpm/rpm-4.14.1-r1.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..1afa7aeae2c |
41 |
--- /dev/null |
42 |
+++ b/app-arch/rpm/rpm-4.14.1-r1.ebuild |
43 |
@@ -0,0 +1,133 @@ |
44 |
+# Copyright 1999-2018 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=6 |
48 |
+ |
49 |
+PYTHON_COMPAT=( python2_7 python3_{5,6} ) |
50 |
+ |
51 |
+inherit autotools flag-o-matic perl-module python-single-r1 eapi7-ver |
52 |
+ |
53 |
+DESCRIPTION="Red Hat Package Management Utils" |
54 |
+HOMEPAGE="http://www.rpm.org |
55 |
+ https://github.com/rpm-software-management/rpm" |
56 |
+SRC_URI="http://ftp.rpm.org/releases/rpm-$(ver_cut 1-2).x/${P}.tar.bz2" |
57 |
+ |
58 |
+LICENSE="GPL-2 LGPL-2" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
61 |
+ |
62 |
+# Tests are broken. See bug 657500 |
63 |
+RESTRICT="test" |
64 |
+ |
65 |
+IUSE="acl caps doc lua nls python selinux test zstd" |
66 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
67 |
+ |
68 |
+CDEPEND="!app-arch/rpm5 |
69 |
+ app-arch/libarchive |
70 |
+ >=sys-libs/db-4.5:* |
71 |
+ >=sys-libs/zlib-1.2.3-r1 |
72 |
+ >=app-arch/bzip2-1.0.1 |
73 |
+ >=dev-libs/popt-1.7 |
74 |
+ >=app-crypt/gnupg-1.2 |
75 |
+ dev-libs/elfutils |
76 |
+ virtual/libintl |
77 |
+ >=dev-lang/perl-5.8.8 |
78 |
+ dev-libs/nss |
79 |
+ python? ( ${PYTHON_DEPS} ) |
80 |
+ nls? ( virtual/libintl ) |
81 |
+ lua? ( >=dev-lang/lua-5.1.0:*[deprecated] ) |
82 |
+ acl? ( virtual/acl ) |
83 |
+ caps? ( >=sys-libs/libcap-2.0 ) |
84 |
+ zstd? ( app-arch/zstd ) |
85 |
+" |
86 |
+DEPEND="${CDEPEND} |
87 |
+ nls? ( sys-devel/gettext ) |
88 |
+ doc? ( app-doc/doxygen ) |
89 |
+ virtual/pkgconfig |
90 |
+ test? ( sys-apps/fakechroot ) |
91 |
+" |
92 |
+RDEPEND="${CDEPEND} |
93 |
+ selinux? ( sec-policy/selinux-rpm ) |
94 |
+" |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ eapply "${FILESDIR}"/${PN}-4.11.0-autotools.patch |
98 |
+ eapply "${FILESDIR}"/${PN}-4.8.1-db-path.patch |
99 |
+ eapply "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch |
100 |
+ |
101 |
+ # fix #356769 |
102 |
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed" |
103 |
+ # fix #492642 |
104 |
+ sed -i "s:@__PYTHON@:${PYTHON}:" macros.in || die "Fixing %__python failed" |
105 |
+ |
106 |
+ eapply_user |
107 |
+ |
108 |
+ eautoreconf |
109 |
+ |
110 |
+ # Prevent automake maintainer mode from kicking in (#450448). |
111 |
+ touch -r Makefile.am preinstall.am |
112 |
+} |
113 |
+ |
114 |
+src_configure() { |
115 |
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr" |
116 |
+ econf \ |
117 |
+ --without-selinux \ |
118 |
+ --with-external-db \ |
119 |
+ --with-crypto=nss \ |
120 |
+ $(use_enable python) \ |
121 |
+ $(use_with doc hackingdocs) \ |
122 |
+ $(use_enable nls) \ |
123 |
+ $(use_with lua) \ |
124 |
+ $(use_with caps cap) \ |
125 |
+ $(use_with acl) \ |
126 |
+ $(use_enable zstd zstd $(usex zstd yes no)) |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ default |
131 |
+ |
132 |
+ # remove la files |
133 |
+ find "${ED}" -name '*.la' -delete || die |
134 |
+ |
135 |
+ # fix symlinks to /bin/rpm (#349840) |
136 |
+ for binary in rpmquery rpmverify;do |
137 |
+ ln -sf rpm "${ED}"/usr/bin/${binary} || die |
138 |
+ done |
139 |
+ |
140 |
+ if ! use nls; then |
141 |
+ rm -rf "${ED}"/usr/share/man/?? || die |
142 |
+ fi |
143 |
+ |
144 |
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD} |
145 |
+ |
146 |
+ dodoc CREDITS README* |
147 |
+ if use doc; then |
148 |
+ for docname in hacking librpm; do |
149 |
+ docinto "html/${docname}" |
150 |
+ dodoc -r "doc/${docname}/html/." |
151 |
+ done |
152 |
+ fi |
153 |
+ |
154 |
+ # Fix perllocal.pod file collision |
155 |
+ perl_delete_localpod |
156 |
+} |
157 |
+ |
158 |
+src_test() { |
159 |
+ # Known to fail with FEATURES=usersandbox (bug #657500): |
160 |
+ if has usersandbox $FEATURES ; then |
161 |
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \ |
162 |
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!" |
163 |
+ fi |
164 |
+ |
165 |
+ emake check |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then |
170 |
+ einfo "RPM database found... Rebuilding database (may take a while)..." |
171 |
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}" || die |
172 |
+ else |
173 |
+ einfo "No RPM database found... Creating database..." |
174 |
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}" || die |
175 |
+ fi |
176 |
+} |