1 |
commit: 872cc8338b31060f743b07373858875d2a588882 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 31 02:04:19 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 02:04:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=872cc833 |
7 |
|
8 |
dev-libs/libsodium: add 1.0.18_p20220618 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-libs/libsodium/Manifest | 2 + |
13 |
.../libsodium/libsodium-1.0.18_p20220618.ebuild | 94 ++++++++++++++++++++++ |
14 |
2 files changed, 96 insertions(+) |
15 |
|
16 |
diff --git a/dev-libs/libsodium/Manifest b/dev-libs/libsodium/Manifest |
17 |
index dc10b9fb4f1c..38f2cf37106a 100644 |
18 |
--- a/dev-libs/libsodium/Manifest |
19 |
+++ b/dev-libs/libsodium/Manifest |
20 |
@@ -2,3 +2,5 @@ DIST libsodium-1.0.18.tar.gz 1919817 BLAKE2B a42d898fe77f232dcbb75728e776b88f006 |
21 |
DIST libsodium-1.0.18.tar.gz.sig 566 BLAKE2B bb892901e2228c93018d79a5c8e70e0ea458513b0fdf99e8f6c015132b618fd0fefbe6a18ed514c20fbe1e56719dd6dd3762bc4bb6348a439146fdaa951090c0 SHA512 ba69d372263e63126d6ce24f67fe85d83f74e558db81391ddcd7eacb6787dcdd5209a149eebca897e9806f295e78f5a8ababa0ab884b85d9a8dd1a54507a8b0c |
22 |
DIST libsodium-1.0.18_p20210617.tar.gz 1854880 BLAKE2B 5b421c7efacca5b2a2b5a99a04719d708c217bc6f0b344f08d566bde85c4f758862c0ad61924346eac508542c2d9c6313cb1e3e421743e424f396dd1972e8195 SHA512 d7cd64101fed11ce33c4865dec253f1058acab376c3a6097422508087f4449b2f7fd1b38835915843106f620bf86694d846695e0c8a35f921e4f190dea3164bc |
23 |
DIST libsodium-1.0.18_p20210617.tar.gz.minisig 311 BLAKE2B c54b76a9e29f49bccca80466a5aaa77fb8341e8164041331003710de8f9b173fd25de4812157377645d97ba8a97470076a7f5e037501ba8376b285a06461efa9 SHA512 2180beb872716ad6b728a455981b548003b18594c3f28435c5ddc9803ab2a0f8f1945b6c77de5928b948bbb803b4fa7527cc2e72059931364343a2fdf51ca1be |
24 |
+DIST libsodium-1.0.18_p20220618.tar.gz 1869858 BLAKE2B 60d46f722c4e5c9896226e3e03c31768a2183bae80a535234b23ac5bc9a2c3632d6c891ce72cbc1d6dc633a15b539111e322c2d210f993f99d6e5bd32f8a8b63 SHA512 14d1c6109de2ac02ba6cb5541746275f6deb25302b60cb3f65a7922b34d2c3bd5f17a4d730acf77a53d5837be00228c68fa06c6a2e9095ea97f6d8c4b782ab6b |
25 |
+DIST libsodium-1.0.18_p20220618.tar.gz.minisig 318 BLAKE2B a2cba3c62ca5a84e7897373cdfe4033c636c652c848bf9beff15765d359f1dd2a8834dc3a4d4443d0b9418a59a94309cf9c5c917ae9c8965778411e21f98e4e6 SHA512 ca1ac892b41c5cb6dd1ba9d4bbde8e75987e66023d29cfc81839bbb3b99efa215f7db1ef903c375dd9d2d5a76f6064b3c7eab833081d21983693b7db87175160 |
26 |
|
27 |
diff --git a/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild b/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..cc921b7865b0 |
30 |
--- /dev/null |
31 |
+++ b/dev-libs/libsodium/libsodium-1.0.18_p20220618.ebuild |
32 |
@@ -0,0 +1,94 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+inherit autotools multilib-minimal |
39 |
+ |
40 |
+DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library" |
41 |
+HOMEPAGE="https://libsodium.org" |
42 |
+ |
43 |
+if [[ ${PV} == *_p* ]] ; then |
44 |
+ MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-) |
45 |
+ MINISIGN_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3" |
46 |
+ |
47 |
+ # We use _pN to represent 'stable releases' |
48 |
+ # These are backports from upstream to the last release branch |
49 |
+ # See https://download.libsodium.org/libsodium/releases/README.html |
50 |
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz" |
51 |
+ |
52 |
+ # TODO: Could verify-sig.eclass support minisig? bug #783066 |
53 |
+ SRC_URI+=" verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig )" |
54 |
+ |
55 |
+ S="${WORKDIR}"/${PN}-stable |
56 |
+else |
57 |
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/jedisct1.asc |
58 |
+ inherit verify-sig |
59 |
+ |
60 |
+ SRC_URI="https://download.libsodium.org/${PN}/releases/${P}.tar.gz" |
61 |
+ SRC_URI+=" verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.sig )" |
62 |
+fi |
63 |
+ |
64 |
+LICENSE="ISC" |
65 |
+SLOT="0/23" |
66 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
67 |
+IUSE="+asm minimal static-libs +urandom" |
68 |
+ |
69 |
+CPU_USE=( cpu_flags_x86_{aes,sse4_1} ) |
70 |
+IUSE+=" ${CPU_USE[@]}" |
71 |
+ |
72 |
+if [[ ${PV} == *_p* ]] ; then |
73 |
+ IUSE+=" verify-sig" |
74 |
+ BDEPEND+=" verify-sig? ( app-crypt/minisign )" |
75 |
+fi |
76 |
+ |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch |
79 |
+) |
80 |
+ |
81 |
+src_unpack() { |
82 |
+ if [[ ${PV} == *_p* ]] ; then |
83 |
+ if use verify-sig ; then |
84 |
+ ebegin "Verifying signature using app-crypt/minisign" |
85 |
+ minisign -V \ |
86 |
+ -P ${MINISIGN_KEY} \ |
87 |
+ -x "${DISTDIR}"/${P}.tar.gz.minisig \ |
88 |
+ -m "${DISTDIR}"/${P}.tar.gz |
89 |
+ eend $? || die "Failed to verify distfile using minisign!" |
90 |
+ fi |
91 |
+ |
92 |
+ default |
93 |
+ else |
94 |
+ verify-sig_src_unpack |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+src_prepare() { |
99 |
+ default |
100 |
+ |
101 |
+ eautoreconf |
102 |
+} |
103 |
+ |
104 |
+multilib_src_configure() { |
105 |
+ local myeconfargs=( |
106 |
+ $(use_enable asm) |
107 |
+ $(use_enable cpu_flags_x86_aes aesni) |
108 |
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) |
109 |
+ $(use_enable minimal) |
110 |
+ $(use_enable static-libs static) |
111 |
+ $(use_enable !urandom blocking-random) |
112 |
+ ) |
113 |
+ |
114 |
+ # --disable-pie is needed on x86, see bug #512734 |
115 |
+ # TODO: Check if still needed? |
116 |
+ if [[ ${ABI} == x86 ]] ; then |
117 |
+ myeconfargs+=( --disable-pie ) |
118 |
+ fi |
119 |
+ |
120 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
121 |
+} |
122 |
+ |
123 |
+multilib_src_install_all() { |
124 |
+ default |
125 |
+ find "${ED}" -type f -name "*.la" -delete || die |
126 |
+} |