1 |
commit: f8cb7eb4992dadfc2313ff2840aef86e329e2527 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 27 05:17:13 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 27 05:34:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8cb7eb4 |
7 |
|
8 |
dev-libs/botan: add 2.18.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-libs/botan/Manifest | 2 + |
13 |
dev-libs/botan/botan-2.18.2.ebuild | 165 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 167 insertions(+) |
15 |
|
16 |
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest |
17 |
index 7695eab0d96..eef83723d52 100644 |
18 |
--- a/dev-libs/botan/Manifest |
19 |
+++ b/dev-libs/botan/Manifest |
20 |
@@ -1,3 +1,5 @@ |
21 |
DIST Botan-2.17.3.tar.xz 5937596 BLAKE2B 605e71c959889b459bc26f17d310a33f26c9a51fe00db91db407ac5b96c9ff57bef67a401f71826e83e0d4eda2289c22685957289e6bb357f3693a1bce60f44d SHA512 ead0f144dfb9eca66d0e81e376d0d49f4b0b6bc1599f8cf52299e1753645b5b20100efa004ef5f9571f7bea88958f35db38367fc26f2603890f8f199cc890dbc |
22 |
DIST Botan-2.18.1.tar.xz 5953936 BLAKE2B 82f6a9563377542d059901adec0fc17a41b0184cf59af76084babec2591830314a4d7f8d3308eb393c4910c9b0e6c056625765f0d95b435f47dc94cf4b83b128 SHA512 2f11d1ab703d977a2d64504d2a2489ce56109a2a6c46c0dc7c8db428470ce511bcc0160f70baedad29237abd5e1622f2c155ea58c4dec4d3ae57ee7b350415c3 |
23 |
DIST Botan-2.18.1.tar.xz.asc 488 BLAKE2B d7e6f18ba969b1fffe5aec27ec28839bb6eefac438b0971bb24293a9a1dc104d4355feaae4f8749ea9ea9a729e9f0c0368782c60c2f1aaed58620624248d09d2 SHA512 0cb24d544e31f347e649661d28fedaad4352cd5096ad41e1513c7915138981c7c099e4ee6025893ed829a65082aaded738a94018a8e0bc079f4f0fb63bbec262 |
24 |
+DIST Botan-2.18.2.tar.xz 5996928 BLAKE2B 5c5ac1e8e2de16a012aa5716138f4c2d2b8178f0a811993e5e297aa5ae9e7f6d5a4f182d50566f5848a4f93a88bcec622291a15370c4c017361ca65d3bb189bf SHA512 ccf9286ee891fb201065a0a6a991ce78ef7f5dd0caf04010527cd524b824ea470e5ce302853c1839e999a1b3dafb2e82eb298036a37d11f0cf3df5fa09529d9c |
25 |
+DIST Botan-2.18.2.tar.xz.asc 488 BLAKE2B 03744e95f52031295162b63dc34d7e0fd9a6b01ae751a809eed5f24c46017fca253c8d42c88b568566f393f0e6dd55d488ef56223d164941386690e2accdf296 SHA512 6764bcdb52a3a28672bcf22f8c364c926511a7b7c9bc227ba15f1e4b2feb9b371a9a4bd9bb1ee43e85faacbef4df5ce39a158357b4ce3706a00f4220bea8d926 |
26 |
|
27 |
diff --git a/dev-libs/botan/botan-2.18.2.ebuild b/dev-libs/botan/botan-2.18.2.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..d33373a7c38 |
30 |
--- /dev/null |
31 |
+++ b/dev-libs/botan/botan-2.18.2.ebuild |
32 |
@@ -0,0 +1,165 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{8..10} ) |
39 |
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/botan.asc |
40 |
+inherit python-r1 toolchain-funcs verify-sig |
41 |
+ |
42 |
+MY_P="Botan-${PV}" |
43 |
+DESCRIPTION="C++ crypto library" |
44 |
+HOMEPAGE="https://botan.randombit.net/" |
45 |
+SRC_URI="https://botan.randombit.net/releases/${MY_P}.tar.xz" |
46 |
+SRC_URI+=" verify-sig? ( https://botan.randombit.net/releases/${MY_P}.tar.xz.asc )" |
47 |
+S="${WORKDIR}/${MY_P}" |
48 |
+ |
49 |
+LICENSE="BSD-2" |
50 |
+SLOT="2/$(ver_cut 1-2)" # soname version |
51 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~ppc-macos" |
52 |
+IUSE="bindist doc boost bzip2 lzma python ssl static-libs sqlite zlib" |
53 |
+ |
54 |
+CPU_USE=( |
55 |
+ cpu_flags_arm_{aes,neon} |
56 |
+ cpu_flags_ppc_altivec |
57 |
+ cpu_flags_x86_{aes,avx2,popcnt,rdrand,sse2,ssse3,sse4_1,sse4_2} |
58 |
+) |
59 |
+ |
60 |
+IUSE+=" ${CPU_USE[@]}" |
61 |
+ |
62 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
63 |
+ |
64 |
+# NOTE: Boost is needed at runtime too for the CLI tool. |
65 |
+DEPEND=" |
66 |
+ boost? ( >=dev-libs/boost-1.48:= ) |
67 |
+ bzip2? ( >=app-arch/bzip2-1.0.5:= ) |
68 |
+ lzma? ( app-arch/xz-utils:= ) |
69 |
+ python? ( ${PYTHON_DEPS} ) |
70 |
+ ssl? ( dev-libs/openssl:0=[bindist(-)=] ) |
71 |
+ sqlite? ( dev-db/sqlite:3= ) |
72 |
+ zlib? ( >=sys-libs/zlib-1.2.3:= ) |
73 |
+" |
74 |
+RDEPEND="${DEPEND}" |
75 |
+BDEPEND=" |
76 |
+ ${PYTHON_DEPS} |
77 |
+ $(python_gen_any_dep ' |
78 |
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
79 |
+ ') |
80 |
+ verify-sig? ( app-crypt/openpgp-keys-botan ) |
81 |
+" |
82 |
+ |
83 |
+# NOTE: Considering patching Botan? |
84 |
+# Please see upstream's guidance: |
85 |
+# https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches |
86 |
+ |
87 |
+python_check_deps() { |
88 |
+ if use doc ; then |
89 |
+ has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" || return 1 |
90 |
+ fi |
91 |
+} |
92 |
+ |
93 |
+src_configure() { |
94 |
+ python_setup |
95 |
+ |
96 |
+ local disable_modules=( |
97 |
+ $(usev !boost 'boost') |
98 |
+ $(usev bindist 'ecdsa') |
99 |
+ ) |
100 |
+ |
101 |
+ if [[ -z "${DISABLE_MODULES}" ]] ; then |
102 |
+ elog "Disabling module(s): ${disable_modules[@]}" |
103 |
+ fi |
104 |
+ |
105 |
+ local chostarch="${CHOST%%-*}" |
106 |
+ |
107 |
+ # Arch specific wrangling |
108 |
+ local myos= |
109 |
+ case ${CHOST} in |
110 |
+ *-darwin*) |
111 |
+ myos=darwin |
112 |
+ ;; |
113 |
+ |
114 |
+ *) |
115 |
+ myos=linux |
116 |
+ |
117 |
+ if [[ ${CHOST} == *hppa* ]] ; then |
118 |
+ chostarch=parisc |
119 |
+ elif [[ ${PROFILE_ARCH} == "sparc64" ]] ; then |
120 |
+ chostarch="sparc32-v9" |
121 |
+ fi |
122 |
+ ;; |
123 |
+ |
124 |
+ esac |
125 |
+ |
126 |
+ local pythonvers=() |
127 |
+ if use python ; then |
128 |
+ _append() { |
129 |
+ pythonvers+=( ${EPYTHON/python/} ) |
130 |
+ } |
131 |
+ |
132 |
+ python_foreach_impl _append |
133 |
+ fi |
134 |
+ |
135 |
+ local myargs=( |
136 |
+ # Intrinsics |
137 |
+ # TODO: x86 RDSEED (new CPU_FLAGS_X86?) |
138 |
+ # TODO: POWER Crypto (new CPU_FLAGS_PPC?) |
139 |
+ $(usev !cpu_flags_arm_aes '--disable-armv8crypto') |
140 |
+ $(usev !cpu_flags_arm_neon '--disable-neon') |
141 |
+ $(usev !cpu_flags_ppc_altivec '--disable-altivec') |
142 |
+ $(usev !cpu_flags_x86_aes '--disable-aes-ni') |
143 |
+ $(usev !cpu_flags_x86_avx2 '--disable-avx2') |
144 |
+ $(usev !cpu_flags_x86_popcnt '--disable-bmi2') |
145 |
+ $(usev !cpu_flags_x86_rdrand '--disable-rdrand') |
146 |
+ $(usev !cpu_flags_x86_sse2 '--disable-sse2') |
147 |
+ $(usev !cpu_flags_x86_ssse3 '--disable-ssse3') |
148 |
+ $(usev !cpu_flags_x86_sse4_1 '--disable-sse4.1') |
149 |
+ $(usev !cpu_flags_x86_sse4_2 '--disable-sse4.2') |
150 |
+ |
151 |
+ $(usev hppa '--without-stack-protector') |
152 |
+ |
153 |
+ $(use_with boost) |
154 |
+ $(use_with bzip2) |
155 |
+ $(use_with doc documentation) |
156 |
+ $(use_with doc sphinx) |
157 |
+ $(use_with lzma) |
158 |
+ $(use_enable static-libs static-library) |
159 |
+ $(use_with ssl openssl) |
160 |
+ $(use_with sqlite sqlite3) |
161 |
+ $(use_with zlib) |
162 |
+ |
163 |
+ --cpu=${chostarch} |
164 |
+ --docdir=share/doc |
165 |
+ --disable-modules=$( IFS=","; echo "${disable_modules[*]}" ) |
166 |
+ --distribution-info="Gentoo ${PVR}" |
167 |
+ --libdir=$(get_libdir) |
168 |
+ |
169 |
+ # Don't install Python bindings automatically |
170 |
+ # (do it manually later in the right place) |
171 |
+ # https://bugs.gentoo.org/723096 |
172 |
+ --no-install-python-module |
173 |
+ |
174 |
+ --os=${myos} |
175 |
+ --prefix="${EPREFIX}/usr" |
176 |
+ --with-endian="$(tc-endian)" |
177 |
+ --with-python-version=$( IFS=","; echo "${pythonvers[*]}" ) |
178 |
+ --without-doxygen |
179 |
+ ) |
180 |
+ |
181 |
+ tc-export CC CXX AR |
182 |
+ |
183 |
+ ${EPYTHON} configure.py "${myargs[@]}" || die "configure.py failed with ${EPYTHON}" |
184 |
+} |
185 |
+ |
186 |
+src_test() { |
187 |
+ LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed" |
188 |
+} |
189 |
+ |
190 |
+src_install() { |
191 |
+ default |
192 |
+ |
193 |
+ # Manually install the Python bindings (bug #723096) |
194 |
+ if use python ; then |
195 |
+ python_foreach_impl python_domodule src/python/botan2.py |
196 |
+ fi |
197 |
+} |