1 |
commit: a897adf292a147ccae858d50a630ac00fd955b25 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 16 03:35:20 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 16 03:58:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a897adf2 |
7 |
|
8 |
dev-libs/libsodium: add 1.0.18_p20210508 |
9 |
|
10 |
Upstream regularly backport fixes from the main development branch |
11 |
to the last release branch. This is the first of such releases added in Gentoo |
12 |
(at least for 1.0.18). |
13 |
|
14 |
We also add verify-sig-like behaviour via app-crypt/minisign. Upstream |
15 |
don't provide PGP signatures for all backport/stable releases, so we need to use |
16 |
this instead. |
17 |
|
18 |
Bug: https://bugs.gentoo.org/783066 |
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
dev-libs/libsodium/Manifest | 2 + |
22 |
.../libsodium/libsodium-1.0.18_p20210508.ebuild | 95 ++++++++++++++++++++++ |
23 |
2 files changed, 97 insertions(+) |
24 |
|
25 |
diff --git a/dev-libs/libsodium/Manifest b/dev-libs/libsodium/Manifest |
26 |
index 5ef0f34e468..2274e50ec6f 100644 |
27 |
--- a/dev-libs/libsodium/Manifest |
28 |
+++ b/dev-libs/libsodium/Manifest |
29 |
@@ -1,2 +1,4 @@ |
30 |
DIST libsodium-1.0.18.tar.gz 1919817 BLAKE2B a42d898fe77f232dcbb75728e776b88f006e89f734c4d335e75e01d37b1034cc024df2e89d4350ecbe713d3e4b32c08bec537922c81cc63b0e87ee7fd89b2940 SHA512 17e8638e46d8f6f7d024fe5559eccf2b8baf23e143fadd472a7d29d228b186d86686a5e6920385fe2020729119a5f12f989c3a782afbd05a8db4819bb18666ef |
31 |
DIST libsodium-1.0.18.tar.gz.sig 566 BLAKE2B bb892901e2228c93018d79a5c8e70e0ea458513b0fdf99e8f6c015132b618fd0fefbe6a18ed514c20fbe1e56719dd6dd3762bc4bb6348a439146fdaa951090c0 SHA512 ba69d372263e63126d6ce24f67fe85d83f74e558db81391ddcd7eacb6787dcdd5209a149eebca897e9806f295e78f5a8ababa0ab884b85d9a8dd1a54507a8b0c |
32 |
+DIST libsodium-1.0.18_p20210508.tar.gz 1855576 BLAKE2B 18cb62483ff6ead4f8524fac2cd5b505a316c59395757a258fcdec505ae3a9f16c7ebb9d18ac64387654e18012a554da1e0228d587d38d3a3f25676d322e42ee SHA512 41f7efdac246ec2460cc2a3ce5cc0f1bf963a7de6b3617a443178ed544e911de425fe175f231a1bd1d6a1fec9f19e9f8001dcf66d45ad2f46f0d37522954f299 |
33 |
+DIST libsodium-1.0.18_p20210508.tar.gz.minisig 311 BLAKE2B f3f66d4bc60fcb3bf6619a4a8dbe367d321a35b0386c9498ba8a08307f85ab3eaf6094d157492fc3e805fa4dfc247f2eeed77fe703c329b21116e29f93296bfa SHA512 4d05361736db001cc1102a0941decf0a4437712c6ab3246608ca3df8b1f3aee01e21f84dc3763f3347c732a026dfd08ef9a09508e54ea60d9f21a3a6bf697dfe |
34 |
|
35 |
diff --git a/dev-libs/libsodium/libsodium-1.0.18_p20210508.ebuild b/dev-libs/libsodium/libsodium-1.0.18_p20210508.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..ddf5fc8f983 |
38 |
--- /dev/null |
39 |
+++ b/dev-libs/libsodium/libsodium-1.0.18_p20210508.ebuild |
40 |
@@ -0,0 +1,95 @@ |
41 |
+# Copyright 1999-2021 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+ |
46 |
+inherit autotools multilib-minimal |
47 |
+ |
48 |
+DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library" |
49 |
+HOMEPAGE="https://libsodium.org" |
50 |
+ |
51 |
+if [[ ${PV} == *_p* ]] ; then |
52 |
+ MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) |
53 |
+ MINISIGN_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" |
54 |
+ |
55 |
+ # We use _pN to represent 'stable releases' |
56 |
+ # These are backports from upstream to the last release branch |
57 |
+ # See https://download.libsodium.org/libsodium/releases/README.html |
58 |
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz" |
59 |
+ |
60 |
+ # TODO: Could verify-sig.eclass support minisig? bug #783066 |
61 |
+ SRC_URI+=" verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig )" |
62 |
+ |
63 |
+ S="${WORKDIR}/${PN}-stable" |
64 |
+else |
65 |
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jedisct1.asc |
66 |
+ inherit verify-sig |
67 |
+ |
68 |
+ SRC_URI="https://download.libsodium.org/${PN}/releases/${P}.tar.gz" |
69 |
+ SRC_URI+=" verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.sig )" |
70 |
+fi |
71 |
+ |
72 |
+LICENSE="ISC" |
73 |
+SLOT="0/23" |
74 |
+KEYWORDS="~amd64 ~ppc64" |
75 |
+IUSE="+asm minimal static-libs +urandom cpu_flags_x86_sse4_1 cpu_flags_x86_aes" |
76 |
+ |
77 |
+if [[ ${PV} == *_p* ]] ; then |
78 |
+ IUSE+=" verify-sig" |
79 |
+ |
80 |
+ BDEPEND+="app-crypt/minisign" |
81 |
+fi |
82 |
+ |
83 |
+PATCHES=( |
84 |
+ "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch |
85 |
+) |
86 |
+ |
87 |
+src_unpack() { |
88 |
+ if [[ ${PV} == *_p* ]] ; then |
89 |
+ if use verify-sig ; then |
90 |
+ elog "Verifying signature using app-crypt/minisign" |
91 |
+ minisign -V \ |
92 |
+ -P ${MINISIGN_KEY} \ |
93 |
+ -x "${DISTDIR}"/${P}.tar.gz.minisig \ |
94 |
+ -m "${DISTDIR}"/${P}.tar.gz || die "Failed to verify distfile using minisign!" |
95 |
+ fi |
96 |
+ |
97 |
+ default |
98 |
+ else |
99 |
+ verify-sig_src_unpack |
100 |
+ fi |
101 |
+} |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ default |
105 |
+ eautoreconf |
106 |
+} |
107 |
+ |
108 |
+multilib_src_configure() { |
109 |
+ local myeconfargs=( |
110 |
+ $(use_enable asm) |
111 |
+ $(use_enable cpu_flags_x86_aes aesni) |
112 |
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) |
113 |
+ $(use_enable minimal) |
114 |
+ $(use_enable static-libs static) |
115 |
+ $(use_enable !urandom blocking-random) |
116 |
+ ) |
117 |
+ |
118 |
+ # --disable-pie is needed on x86, see bug #512734 |
119 |
+ if [[ "${MULTILIB_ABI_FLAG}" == "abi_x86_32" ]] ; then |
120 |
+ myeconfargs+=( --disable-pie ) |
121 |
+ |
122 |
+ # --disable-ssp is needed on musl x86 |
123 |
+ # TODO: Check if still needed? bug #747346 |
124 |
+ if use elibc_musl ; then |
125 |
+ myeconfargs+=( --disable-ssp ) |
126 |
+ fi |
127 |
+ fi |
128 |
+ |
129 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
130 |
+} |
131 |
+ |
132 |
+multilib_src_install_all() { |
133 |
+ default |
134 |
+ find "${ED}" -type f -name "*.la" -delete || die |
135 |
+} |