1 |
commit: e7660d41c70d1c01a0bbd06ecbaad3be2a8968d4 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 24 11:55:03 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 24 11:55:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7660d41 |
7 |
|
8 |
app-arch/rpm2targz: add zstd support |
9 |
|
10 |
Closes: https://bugs.gentoo.org/719208 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
.../rpm2targz-9.0.0.5g-add-zstd-support.patch | 20 +++++++++++++++ |
15 |
app-arch/rpm2targz/rpm2targz-9.0.0.5g-r2.ebuild | 30 ++++++++++++++++++++++ |
16 |
2 files changed, 50 insertions(+) |
17 |
|
18 |
diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch b/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..085c61aa4e7 |
21 |
--- /dev/null |
22 |
+++ b/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch |
23 |
@@ -0,0 +1,20 @@ |
24 |
+Origin: https://bugs.gentoo.org/719208 |
25 |
+Author: Rafał Mużyło |
26 |
+ |
27 |
+--- a/rpmoffset.c |
28 |
++++ b/rpmoffset.c |
29 |
+@@ -58,11 +58,13 @@ int is_magic_lzma(const char *buf) |
30 |
+ static const unsigned char magic_gzip[] = { '\037', '\213', '\010' }; |
31 |
+ static const unsigned char magic_bzip2[] = { 'B', 'Z', 'h' }; |
32 |
+ static const unsigned char magic_xz[] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 }; |
33 |
++static const unsigned char magic_zstd[] = { 0x28, 0xB5, 0x2F, 0xFD }; |
34 |
+ static const magic_t magics[] = { |
35 |
+ #define DECLARE_MAGIC_T(t) { .type = #t, .magic = magic_##t, .len = sizeof(magic_##t), }, |
36 |
+ DECLARE_MAGIC_T(gzip) |
37 |
+ DECLARE_MAGIC_T(bzip2) |
38 |
+ DECLARE_MAGIC_T(xz) |
39 |
++ DECLARE_MAGIC_T(zstd) |
40 |
+ #undef DECLARE_MAGIC_T |
41 |
+ }; |
42 |
+ #define MAGIC_SIZE_MIN 3 |
43 |
+ |
44 |
|
45 |
diff --git a/app-arch/rpm2targz/rpm2targz-9.0.0.5g-r2.ebuild b/app-arch/rpm2targz/rpm2targz-9.0.0.5g-r2.ebuild |
46 |
new file mode 100644 |
47 |
index 00000000000..6bc46a104cb |
48 |
--- /dev/null |
49 |
+++ b/app-arch/rpm2targz/rpm2targz-9.0.0.5g-r2.ebuild |
50 |
@@ -0,0 +1,30 @@ |
51 |
+# Copyright 1999-2020 Gentoo Authors |
52 |
+# Distributed under the terms of the GNU General Public License v2 |
53 |
+ |
54 |
+EAPI="7" |
55 |
+ |
56 |
+inherit toolchain-funcs |
57 |
+ |
58 |
+DESCRIPTION="Convert a .rpm file to a .tar.gz archive" |
59 |
+HOMEPAGE="http://www.slackware.com/config/packages.php" |
60 |
+SRC_URI="mirror://gentoo/${P}.tar.xz" |
61 |
+ |
62 |
+LICENSE="BSD-1" |
63 |
+SLOT="0" |
64 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
65 |
+IUSE="" |
66 |
+ |
67 |
+DEPEND="" |
68 |
+RDEPEND="app-arch/cpio |
69 |
+ app-arch/zstd" |
70 |
+ |
71 |
+PATCHES=( "${FILESDIR}"/${PN}-9.0.0.5g-add-zstd-support.patch ) |
72 |
+ |
73 |
+src_compile() { |
74 |
+ emake CC="$(tc-getCC)" |
75 |
+} |
76 |
+ |
77 |
+src_install() { |
78 |
+ emake DESTDIR="${D}" install # need explicit install line #397835 |
79 |
+ dodoc *.README* |
80 |
+} |