1 |
commit: 02650e029b00d217022c2e56bbcafd4ab1f797b4 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 18 17:21:29 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 18 17:21:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02650e02 |
7 |
|
8 |
dev-libs/openssl: drop 3.0.2, 3.0.3, 3.0.4-r1 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-libs/openssl/Manifest | 7 - |
13 |
dev-libs/openssl/openssl-3.0.2.ebuild | 297 ---------------------------- |
14 |
dev-libs/openssl/openssl-3.0.3.ebuild | 328 ------------------------------- |
15 |
dev-libs/openssl/openssl-3.0.4-r1.ebuild | 326 ------------------------------ |
16 |
4 files changed, 958 deletions(-) |
17 |
|
18 |
diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest |
19 |
index f960853b8a8a..eb14a155609f 100644 |
20 |
--- a/dev-libs/openssl/Manifest |
21 |
+++ b/dev-libs/openssl/Manifest |
22 |
@@ -10,12 +10,5 @@ DIST openssl-1.1.1p.tar.gz 9860217 BLAKE2B 4354753a5e52393c9cc4569954c2cac6d89a1 |
23 |
DIST openssl-1.1.1p.tar.gz.asc 488 BLAKE2B e68c8a4c992c2448b48428137f61f91fb89e4814f6e80c5525cea695bcf898326eca729f31b953fbd7ff51b448004101ca78abfbd3138ec2389596faa3eafc2f SHA512 c85d65df1ed0f1ae87b799d794ea43e32c8ecaf85caf6e36fbbd4a890ef1d47710380d3846296e0124898680be66113a959ad974e0448bc00d1253794dc48972 |
24 |
DIST openssl-1.1.1q.tar.gz 9864061 BLAKE2B fc8fd6a62dc291d0bda328a051e253175fb04442cc4b8f45d67c3a5027748a0fc5fb372d0483bc9024ae0bff119c4fac8f1e982a182612427696d6d09f5935f5 SHA512 cb9f184ec4974a3423ef59c8ec86b6bf523d5b887da2087ae58c217249da3246896fdd6966ee9c13aea9e6306783365239197e9f742c508a0e35e5744e3e085f |
25 |
DIST openssl-1.1.1q.tar.gz.asc 833 BLAKE2B 9311abf47469c3802a84dc9b7427a168ba7717496960e6f84b04e4d9263dea1168493082937a06bcb6ef4169b2ed9b2f36084bbac15b5f7ca5b4c41041c4bab6 SHA512 03a41f29d1713c47bb300e01e36dbd048074076a6a3b9913e2fc9a1b56b726c038978f99e86f9a3e4ea39f72bd82a15965842f6d94210fa9d3474f6f0f68559e |
26 |
-DIST openssl-3.0.2.tar.gz 15038141 BLAKE2B 140c4c80a0cad89cb0059fef6a4cd421460e6af9a3973f7a3eb5e39f64c0d44794d46e7a869e5235fced139f2249351e37a9ee5ebaa17f2708d63141ebebf919 SHA512 f986850d5be908b4d6b5fd7091bc4652d7378c9bccebfbc5becd7753843c04c1eb61a1749c432139d263dfac33df0b1f6c773664b485cad47542266823a4eb03 |
27 |
-DIST openssl-3.0.2.tar.gz.asc 488 BLAKE2B 2f6482114271c4f512159fa159486a3b3470637d770cd1614fda004918d06ed9ab562e655d1580d2ebb05745ec72987488c2161b72d078017cc157003d4205da SHA512 4303391a58107c76ad9b05510f5bfc95f687f4cb2f9ff5b03fb262ba99b573423ab83f0437471199954496799b343191b889ad9ef8fabdd7ee4ec3ec9b5f1d81 |
28 |
-DIST openssl-3.0.3-test-fixes-expiry.patch.xz 29056 BLAKE2B 11be776b9c4baec770d81ff180581d7d8292261f32ebfcb2cfd399d684cef1b9e7b4575d906f23e8a61d853eafb178e1b0e01d9324dbe598c876c0ef74bcf5e8 SHA512 23bc571dfca453deb4f1812aea5fc1bcf1c27358d8638a66ce7f359a698b09a35bdc86e01db36aa5e59b37cc7e36f0ced6f1463b383fb0d904aada69f5d5cb04 |
29 |
-DIST openssl-3.0.3.tar.gz 15058905 BLAKE2B 8141d13dbea2f1febdd4e46aa404e9f3bac51e1fdc0c9b0df8bf3bf6852e18b09201a2a8cbee99f72e8d6de660834093449b7a14a3fbdda8511286ca3b6743e7 SHA512 949472025211fabdaf2564122f0a9a3baef0facb6373e90cf6c4485164a50898050b179722d0b358c4d8cf1787384ea30d5fd03b98757634631d3e8978509b1a |
30 |
-DIST openssl-3.0.3.tar.gz.asc 488 BLAKE2B 3f31e3a73706b69683220e05b1b4ddc75dc3e7e12652dca711e4aa0eb3c023ef736aee9ade15172d7f28e1e1af03e86d4854ec6c3d167cad42882f483c5e56d4 SHA512 04afe65c6af1ae43a9967462383a6a4f567f5acff19ec1952cd6fce2dc3c3d4dfb3cb54126562724c148f40dcb66668abf727282d35730bbf36f82b5c6bacace |
31 |
-DIST openssl-3.0.4.tar.gz 15069605 BLAKE2B e8ef09d74aa128fee0ddc347458a41cde65af07a6e6836889a0230cd7989e46b5d10a4930eb7a63c0cf93485914ec33665d14637b6c27fd442c0e9becb2d2a86 SHA512 478cd801dc4787688e6d9062969ae738c24f869bb186f717ad3be54ae8f2630e5cd845c504efd3405ea1ecda07ebee00014cc6ef7bca9585a6240cf89d516557 |
32 |
-DIST openssl-3.0.4.tar.gz.asc 488 BLAKE2B 54f652ae78c6f39aef970fd7372808c876d37a823cc31431d770db67caf11342d1045992e393242d4c73253e4e16640dd9bd56203864394e907976918909e5dc SHA512 c30af3cda92b06cff864ed33c17d8dcb8c7d429ed8419f96d19d3049dfaa268c73ec7753815a134b069ae7f4ea20fb4bcdd04f86d33628592ce4500777494c85 |
33 |
DIST openssl-3.0.5.tar.gz 15074407 BLAKE2B 7bf89e042417c003ef02a8bb1278590a52ce4a3d50f66795c66b750f90248840edb0d3352811caaaaff708c7e65b77384142e316916a6c311f1d2b4747f44816 SHA512 782b0df3d0252468aa696bd74a3b661810499819c0df849aa9698ba0e06a845820dc856aac650fced4be234f1271e576d4317ac3ab1406cf0ffe087d695d20fe |
34 |
DIST openssl-3.0.5.tar.gz.asc 862 BLAKE2B 24f1839227be7acec45eb6b748cea7be0b5e66b5cf745814861f7290670733936bf1af2c1dc9357439b31a2ca28f418880d63726d4be6fa994902ac95b51e401 SHA512 516da9ef291601400576adaba7271854af3caa23dc1d70116004360f580e4c28fe61d51e86477d341e4c5bf0ca5f98db8264581ed6cc2c8df124da83ad3e40be |
35 |
|
36 |
diff --git a/dev-libs/openssl/openssl-3.0.2.ebuild b/dev-libs/openssl/openssl-3.0.2.ebuild |
37 |
deleted file mode 100644 |
38 |
index 3d56892f5980..000000000000 |
39 |
--- a/dev-libs/openssl/openssl-3.0.2.ebuild |
40 |
+++ /dev/null |
41 |
@@ -1,297 +0,0 @@ |
42 |
-# Copyright 1999-2022 Gentoo Authors |
43 |
-# Distributed under the terms of the GNU General Public License v2 |
44 |
- |
45 |
-EAPI="7" |
46 |
- |
47 |
-inherit flag-o-matic linux-info toolchain-funcs multilib-minimal verify-sig |
48 |
- |
49 |
-MY_P=${P/_/-} |
50 |
- |
51 |
-DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" |
52 |
-HOMEPAGE="https://www.openssl.org/" |
53 |
- |
54 |
-if [[ ${PV} == "9999" ]] ; then |
55 |
- EGIT_REPO_URI="https://github.com/openssl/openssl.git" |
56 |
- |
57 |
- inherit git-r3 |
58 |
-else |
59 |
- SRC_URI="mirror://openssl/source/${MY_P}.tar.gz |
60 |
- verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" |
61 |
- VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openssl.org.asc |
62 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" |
63 |
-fi |
64 |
- |
65 |
-LICENSE="Apache-2.0" |
66 |
-SLOT="0/3" # .so version of libssl/libcrypto |
67 |
- |
68 |
-IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" |
69 |
-RESTRICT="!test? ( test )" |
70 |
- |
71 |
-COMMON_DEPEND=" |
72 |
- >=app-misc/c_rehash-1.7-r1 |
73 |
- tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) |
74 |
-" |
75 |
- |
76 |
-BDEPEND=" |
77 |
- >=dev-lang/perl-5 |
78 |
- sctp? ( >=net-misc/lksctp-tools-1.0.12 ) |
79 |
- test? ( |
80 |
- sys-apps/diffutils |
81 |
- sys-devel/bc |
82 |
- sys-process/procps |
83 |
- ) |
84 |
- verify-sig? ( sec-keys/openpgp-keys-openssl )" |
85 |
- |
86 |
-DEPEND="${COMMON_DEPEND}" |
87 |
- |
88 |
-RDEPEND="${COMMON_DEPEND}" |
89 |
- |
90 |
-PDEPEND="app-misc/ca-certificates" |
91 |
- |
92 |
-S="${WORKDIR}/${MY_P}" |
93 |
- |
94 |
-MULTILIB_WRAPPED_HEADERS=( |
95 |
- /usr/include/openssl/configuration.h |
96 |
-) |
97 |
- |
98 |
-pkg_setup() { |
99 |
- if use ktls ; then |
100 |
- if kernel_is -lt 4 18 ; then |
101 |
- ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" |
102 |
- else |
103 |
- CONFIG_CHECK="~TLS ~TLS_DEVICE" |
104 |
- ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" |
105 |
- ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" |
106 |
- |
107 |
- linux-info_pkg_setup |
108 |
- fi |
109 |
- fi |
110 |
- |
111 |
- [[ ${MERGE_TYPE} == binary ]] && return |
112 |
- |
113 |
- # must check in pkg_setup; sysctl don't work with userpriv! |
114 |
- if use test && use sctp ; then |
115 |
- # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" |
116 |
- # if sctp.auth_enable is not enabled. |
117 |
- local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) |
118 |
- if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then |
119 |
- die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" |
120 |
- fi |
121 |
- fi |
122 |
-} |
123 |
- |
124 |
-src_prepare() { |
125 |
- # allow openssl to be cross-compiled |
126 |
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die |
127 |
- chmod a+rx gentoo.config || die |
128 |
- |
129 |
- # keep this in sync with app-misc/c_rehash |
130 |
- SSL_CNF_DIR="/etc/ssl" |
131 |
- |
132 |
- # Make sure we only ever touch Makefile.org and avoid patching a file |
133 |
- # that gets blown away anyways by the Configure script in src_configure |
134 |
- rm -f Makefile |
135 |
- |
136 |
- if ! use vanilla ; then |
137 |
- if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then |
138 |
- [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}" |
139 |
- fi |
140 |
- fi |
141 |
- |
142 |
- eapply_user |
143 |
- |
144 |
- if use test && use sctp && has network-sandbox ${FEATURES} ; then |
145 |
- einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." |
146 |
- rm test/recipes/80-test_ssl_new.t || die |
147 |
- fi |
148 |
- |
149 |
- # make sure the man pages are suffixed #302165 |
150 |
- # don't bother building man pages if they're disabled |
151 |
- # Make DOCDIR Gentoo compliant |
152 |
- sed -i \ |
153 |
- -e '/^MANSUFFIX/s:=.*:=ssl:' \ |
154 |
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ |
155 |
- -e $(has noman FEATURES \ |
156 |
- && echo '/^install:/s:install_docs::' \ |
157 |
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ |
158 |
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ |
159 |
- Configurations/unix-Makefile.tmpl \ |
160 |
- || die |
161 |
- |
162 |
- # quiet out unknown driver argument warnings since openssl |
163 |
- # doesn't have well-split CFLAGS and we're making it even worse |
164 |
- # and 'make depend' uses -Werror for added fun (#417795 again) |
165 |
- [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments |
166 |
- |
167 |
- append-flags -fno-strict-aliasing |
168 |
- append-flags $(test-flags-CC -Wa,--noexecstack) |
169 |
- |
170 |
- # Prefixify Configure shebang (#141906) |
171 |
- sed \ |
172 |
- -e "1s,/usr/bin/env,${BROOT}&," \ |
173 |
- -i Configure || die |
174 |
- |
175 |
- # Remove test target when FEATURES=test isn't set |
176 |
- if ! use test ; then |
177 |
- sed \ |
178 |
- -e '/^$config{dirs}/s@ "test",@@' \ |
179 |
- -i Configure || die |
180 |
- fi |
181 |
- |
182 |
- # The config script does stupid stuff to prompt the user. Kill it. |
183 |
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
184 |
- ./config --test-sanity || die "I AM NOT SANE" |
185 |
- |
186 |
- multilib_copy_sources |
187 |
-} |
188 |
- |
189 |
-multilib_src_configure() { |
190 |
- unset APPS #197996 |
191 |
- unset SCRIPTS #312551 |
192 |
- unset CROSS_COMPILE #311473 |
193 |
- |
194 |
- tc-export AR CC CXX RANLIB RC |
195 |
- |
196 |
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } |
197 |
- echoit() { echo "$@" ; "$@" ; } |
198 |
- |
199 |
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") |
200 |
- |
201 |
- local sslout=$(./gentoo.config) |
202 |
- einfo "Use configuration ${sslout:-(openssl knows best)}" |
203 |
- local config="Configure" |
204 |
- [[ -z ${sslout} ]] && config="config" |
205 |
- |
206 |
- local myeconfargs=( |
207 |
- ${sslout} |
208 |
- $(use cpu_flags_x86_sse2 || echo "no-sse2") |
209 |
- enable-camellia |
210 |
- enable-ec |
211 |
- enable-ec2m |
212 |
- enable-sm2 |
213 |
- enable-srp |
214 |
- $(use elibc_musl && echo "no-async") |
215 |
- enable-idea |
216 |
- enable-mdc2 |
217 |
- enable-rc5 |
218 |
- $(use fips && echo "enable-fips") |
219 |
- $(use_ssl asm) |
220 |
- $(use_ssl ktls) |
221 |
- $(use_ssl rfc3779) |
222 |
- $(use_ssl sctp) |
223 |
- $(use_ssl tls-compression zlib) |
224 |
- $(use_ssl weak-ssl-ciphers) |
225 |
- --prefix="${EPREFIX}"/usr |
226 |
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} |
227 |
- --libdir=$(get_libdir) |
228 |
- shared |
229 |
- threads |
230 |
- ) |
231 |
- |
232 |
- CFLAGS= LDFLAGS= echoit \ |
233 |
- ./${config} \ |
234 |
- "${myeconfargs[@]}" \ |
235 |
- || die |
236 |
- |
237 |
- # Clean out hardcoded flags that openssl uses |
238 |
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ |
239 |
- -e 's:^CFLAGS=::' \ |
240 |
- -e 's:\(^\| \)-fomit-frame-pointer::g' \ |
241 |
- -e 's:\(^\| \)-O[^ ]*::g' \ |
242 |
- -e 's:\(^\| \)-march=[^ ]*::g' \ |
243 |
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \ |
244 |
- -e 's:\(^\| \)-m[^ ]*::g' \ |
245 |
- -e 's:^ *::' \ |
246 |
- -e 's: *$::' \ |
247 |
- -e 's: \+: :g' \ |
248 |
- -e 's:\\:\\\\:g' |
249 |
- ) |
250 |
- |
251 |
- # Now insert clean default flags with user flags |
252 |
- sed -i \ |
253 |
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ |
254 |
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ |
255 |
- Makefile \ |
256 |
- || die |
257 |
-} |
258 |
- |
259 |
-multilib_src_compile() { |
260 |
- # depend is needed to use $confopts; it also doesn't matter |
261 |
- # that it's -j1 as the code itself serializes subdirs |
262 |
- emake -j1 depend |
263 |
- emake all |
264 |
-} |
265 |
- |
266 |
-multilib_src_test() { |
267 |
- emake -j1 test |
268 |
-} |
269 |
- |
270 |
-multilib_src_install() { |
271 |
- # We need to create $ED/usr on our own to avoid a race condition #665130 |
272 |
- if [[ ! -d "${ED}/usr" ]] ; then |
273 |
- # We can only create this directory once |
274 |
- mkdir "${ED}"/usr || die |
275 |
- fi |
276 |
- |
277 |
- emake DESTDIR="${D}" install |
278 |
- |
279 |
- # This is crappy in that the static archives are still built even |
280 |
- # when USE=static-libs. But this is due to a failing in the openssl |
281 |
- # build system: the static archives are built as PIC all the time. |
282 |
- # Only way around this would be to manually configure+compile openssl |
283 |
- # twice; once with shared lib support enabled and once without. |
284 |
- if ! use static-libs ; then |
285 |
- rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die |
286 |
- fi |
287 |
-} |
288 |
- |
289 |
-multilib_src_install_all() { |
290 |
- # openssl installs perl version of c_rehash by default, but |
291 |
- # we provide a shell version via app-misc/c_rehash |
292 |
- rm "${ED}"/usr/bin/c_rehash || die |
293 |
- |
294 |
- dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el |
295 |
- |
296 |
- # create the certs directory |
297 |
- keepdir ${SSL_CNF_DIR}/certs |
298 |
- |
299 |
- # Namespace openssl programs to prevent conflicts with other man pages |
300 |
- cd "${ED}"/usr/share/man || die |
301 |
- local m d s |
302 |
- for m in $(find . -type f | xargs grep -L '#include') ; do |
303 |
- d=${m%/*} ; d=${d#./} ; m=${m##*/} |
304 |
- |
305 |
- [[ ${m} == openssl.1* ]] && continue |
306 |
- |
307 |
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" |
308 |
- |
309 |
- mv ${d}/{,ssl-}${m} || die |
310 |
- |
311 |
- # fix up references to renamed man pages |
312 |
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} || die |
313 |
- ln -s ssl-${m} ${d}/openssl-${m} || die |
314 |
- |
315 |
- # locate any symlinks that point to this man page ... |
316 |
- # we assume that any broken links are due to the above renaming |
317 |
- for s in $(find -L ${d} -type l) ; do |
318 |
- s=${s##*/} |
319 |
- rm -f ${d}/${s} |
320 |
- # We don't want to "|| die" here |
321 |
- ln -s ssl-${m} ${d}/ssl-${s} |
322 |
- ln -s ssl-${s} ${d}/openssl-${s} |
323 |
- done |
324 |
- done |
325 |
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" |
326 |
- |
327 |
- dodir /etc/sandbox.d #254521 |
328 |
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl |
329 |
- |
330 |
- diropts -m0700 |
331 |
- keepdir ${SSL_CNF_DIR}/private |
332 |
-} |
333 |
- |
334 |
-pkg_postinst() { |
335 |
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" |
336 |
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null |
337 |
- eend $? |
338 |
-} |
339 |
|
340 |
diff --git a/dev-libs/openssl/openssl-3.0.3.ebuild b/dev-libs/openssl/openssl-3.0.3.ebuild |
341 |
deleted file mode 100644 |
342 |
index 23cddb4f6b9b..000000000000 |
343 |
--- a/dev-libs/openssl/openssl-3.0.3.ebuild |
344 |
+++ /dev/null |
345 |
@@ -1,328 +0,0 @@ |
346 |
-# Copyright 1999-2022 Gentoo Authors |
347 |
-# Distributed under the terms of the GNU General Public License v2 |
348 |
- |
349 |
-EAPI=7 |
350 |
- |
351 |
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/openssl.org.asc |
352 |
-inherit edo flag-o-matic linux-info toolchain-funcs multilib-minimal multiprocessing verify-sig |
353 |
- |
354 |
-DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" |
355 |
-HOMEPAGE="https://www.openssl.org/" |
356 |
- |
357 |
-MY_P=${P/_/-} |
358 |
- |
359 |
-if [[ ${PV} == 9999 ]] ; then |
360 |
- EGIT_REPO_URI="https://github.com/openssl/openssl.git" |
361 |
- |
362 |
- inherit git-r3 |
363 |
-else |
364 |
- SRC_URI="mirror://openssl/source/${MY_P}.tar.gz |
365 |
- https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-test-fixes-expiry.patch.xz |
366 |
- verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" |
367 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" |
368 |
-fi |
369 |
- |
370 |
-S="${WORKDIR}"/${MY_P} |
371 |
- |
372 |
-LICENSE="Apache-2.0" |
373 |
-SLOT="0/3" # .so version of libssl/libcrypto |
374 |
-IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" |
375 |
-RESTRICT="!test? ( test )" |
376 |
- |
377 |
-COMMON_DEPEND=" |
378 |
- >=app-misc/c_rehash-1.7-r1 |
379 |
- tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) |
380 |
-" |
381 |
-BDEPEND=" |
382 |
- >=dev-lang/perl-5 |
383 |
- sctp? ( >=net-misc/lksctp-tools-1.0.12 ) |
384 |
- test? ( |
385 |
- sys-apps/diffutils |
386 |
- sys-devel/bc |
387 |
- sys-process/procps |
388 |
- ) |
389 |
- verify-sig? ( sec-keys/openpgp-keys-openssl )" |
390 |
- |
391 |
-DEPEND="${COMMON_DEPEND}" |
392 |
-RDEPEND="${COMMON_DEPEND}" |
393 |
-PDEPEND="app-misc/ca-certificates" |
394 |
- |
395 |
-MULTILIB_WRAPPED_HEADERS=( |
396 |
- /usr/include/openssl/configuration.h |
397 |
-) |
398 |
- |
399 |
-PATCHES=( |
400 |
- # General patches which are suitable to always apply |
401 |
- # If they're Gentoo specific, add to USE=-vanilla logic in src_prepare! |
402 |
- "${WORKDIR}"/${P}-test-fixes-expiry.patch |
403 |
-) |
404 |
- |
405 |
-pkg_setup() { |
406 |
- if use ktls ; then |
407 |
- if kernel_is -lt 4 18 ; then |
408 |
- ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" |
409 |
- else |
410 |
- CONFIG_CHECK="~TLS ~TLS_DEVICE" |
411 |
- ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" |
412 |
- ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" |
413 |
- |
414 |
- linux-info_pkg_setup |
415 |
- fi |
416 |
- fi |
417 |
- |
418 |
- [[ ${MERGE_TYPE} == binary ]] && return |
419 |
- |
420 |
- # must check in pkg_setup; sysctl doesn't work with userpriv! |
421 |
- if use test && use sctp ; then |
422 |
- # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" |
423 |
- # if sctp.auth_enable is not enabled. |
424 |
- local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) |
425 |
- if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then |
426 |
- die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" |
427 |
- fi |
428 |
- fi |
429 |
-} |
430 |
- |
431 |
-src_unpack() { |
432 |
- # Can delete this once test fix patch is dropped |
433 |
- if use verify-sig ; then |
434 |
- # Needed for downloaded patch (which is unsigned, which is fine) |
435 |
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} |
436 |
- fi |
437 |
- |
438 |
- default |
439 |
-} |
440 |
- |
441 |
-src_prepare() { |
442 |
- # Allow openssl to be cross-compiled |
443 |
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die |
444 |
- chmod a+rx gentoo.config || die |
445 |
- |
446 |
- # Keep this in sync with app-misc/c_rehash |
447 |
- SSL_CNF_DIR="/etc/ssl" |
448 |
- |
449 |
- # Make sure we only ever touch Makefile.org and avoid patching a file |
450 |
- # that gets blown away anyways by the Configure script in src_configure |
451 |
- rm -f Makefile |
452 |
- |
453 |
- if ! use vanilla ; then |
454 |
- PATCHES+=( |
455 |
- # Add patches which are Gentoo-specific customisations here |
456 |
- ) |
457 |
- fi |
458 |
- |
459 |
- default |
460 |
- |
461 |
- if use test && use sctp && has network-sandbox ${FEATURES} ; then |
462 |
- einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." |
463 |
- rm test/recipes/80-test_ssl_new.t || die |
464 |
- fi |
465 |
- |
466 |
- # - Make sure the man pages are suffixed (bug #302165) |
467 |
- # - Don't bother building man pages if they're disabled |
468 |
- # - Make DOCDIR Gentoo compliant |
469 |
- sed -i \ |
470 |
- -e '/^MANSUFFIX/s:=.*:=ssl:' \ |
471 |
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ |
472 |
- -e $(has noman FEATURES \ |
473 |
- && echo '/^install:/s:install_docs::' \ |
474 |
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ |
475 |
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ |
476 |
- Configurations/unix-Makefile.tmpl \ |
477 |
- || die |
478 |
- |
479 |
- # Quiet out unknown driver argument warnings since openssl |
480 |
- # doesn't have well-split CFLAGS and we're making it even worse |
481 |
- # and 'make depend' uses -Werror for added fun (bug #417795 again) |
482 |
- tc-is-clang && append-flags -Qunused-arguments |
483 |
- |
484 |
- # We really, really need to build OpenSSL w/ strict aliasing disabled. |
485 |
- # It's filled with violations and it *will* result in miscompiled |
486 |
- # code. This has been in the ebuild for > 10 years but even in 2022, |
487 |
- # it's still relevant: |
488 |
- # - https://github.com/llvm/llvm-project/issues/55255 |
489 |
- # - https://github.com/openssl/openssl/issues/18225 |
490 |
- # Don't remove the no strict aliasing bits below! |
491 |
- filter-flags -fstrict-aliasing |
492 |
- append-flags -fno-strict-aliasing |
493 |
- |
494 |
- append-flags $(test-flags-CC -Wa,--noexecstack) |
495 |
- |
496 |
- # Prefixify Configure shebang (bug #141906) |
497 |
- sed \ |
498 |
- -e "1s,/usr/bin/env,${BROOT}&," \ |
499 |
- -i Configure || die |
500 |
- |
501 |
- # Remove test target when FEATURES=test isn't set |
502 |
- if ! use test ; then |
503 |
- sed \ |
504 |
- -e '/^$config{dirs}/s@ "test",@@' \ |
505 |
- -i Configure || die |
506 |
- fi |
507 |
- |
508 |
- # The config script does stupid stuff to prompt the user. Kill it. |
509 |
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
510 |
- ./config --test-sanity || die "I AM NOT SANE" |
511 |
- |
512 |
- multilib_copy_sources |
513 |
-} |
514 |
- |
515 |
-multilib_src_configure() { |
516 |
- # bug #197996 |
517 |
- unset APPS |
518 |
- # bug #312551 |
519 |
- unset SCRIPTS |
520 |
- # bug #311473 |
521 |
- unset CROSS_COMPILE |
522 |
- |
523 |
- tc-export AR CC CXX RANLIB RC |
524 |
- |
525 |
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } |
526 |
- |
527 |
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") |
528 |
- |
529 |
- local sslout=$(./gentoo.config) |
530 |
- einfo "Using configuration: ${sslout:-(openssl knows best)}" |
531 |
- local config="Configure" |
532 |
- [[ -z ${sslout} ]] && config="config" |
533 |
- |
534 |
- # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features |
535 |
- local myeconfargs=( |
536 |
- ${sslout} |
537 |
- |
538 |
- $(use cpu_flags_x86_sse2 || echo "no-sse2") |
539 |
- enable-camellia |
540 |
- enable-ec |
541 |
- enable-ec2m |
542 |
- enable-sm2 |
543 |
- enable-srp |
544 |
- $(use elibc_musl && echo "no-async") |
545 |
- enable-idea |
546 |
- enable-mdc2 |
547 |
- enable-rc5 |
548 |
- $(use fips && echo "enable-fips") |
549 |
- $(use_ssl asm) |
550 |
- $(use_ssl ktls) |
551 |
- $(use_ssl rfc3779) |
552 |
- $(use_ssl sctp) |
553 |
- $(use test || echo "no-tests") |
554 |
- $(use_ssl tls-compression zlib) |
555 |
- $(use_ssl weak-ssl-ciphers) |
556 |
- |
557 |
- --prefix="${EPREFIX}"/usr |
558 |
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} |
559 |
- --libdir=$(get_libdir) |
560 |
- |
561 |
- shared |
562 |
- threads |
563 |
- ) |
564 |
- |
565 |
- CFLAGS= LDFLAGS= edo ./${config} "${myeconfargs[@]}" |
566 |
- |
567 |
- # Clean out hardcoded flags that openssl uses |
568 |
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ |
569 |
- -e 's:^CFLAGS=::' \ |
570 |
- -e 's:\(^\| \)-fomit-frame-pointer::g' \ |
571 |
- -e 's:\(^\| \)-O[^ ]*::g' \ |
572 |
- -e 's:\(^\| \)-march=[^ ]*::g' \ |
573 |
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \ |
574 |
- -e 's:\(^\| \)-m[^ ]*::g' \ |
575 |
- -e 's:^ *::' \ |
576 |
- -e 's: *$::' \ |
577 |
- -e 's: \+: :g' \ |
578 |
- -e 's:\\:\\\\:g' |
579 |
- ) |
580 |
- |
581 |
- # Now insert clean default flags with user flags |
582 |
- sed -i \ |
583 |
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ |
584 |
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ |
585 |
- Makefile \ |
586 |
- || die |
587 |
-} |
588 |
- |
589 |
-multilib_src_compile() { |
590 |
- # depend is needed to use $confopts; it also doesn't matter |
591 |
- # that it's -j1 as the code itself serializes subdirs |
592 |
- emake -j1 depend |
593 |
- |
594 |
- emake all |
595 |
-} |
596 |
- |
597 |
-multilib_src_test() { |
598 |
- # VFP = show subtests verbosely and show failed tests verbosely |
599 |
- # Normal V=1 would show everything verbosely but this slows things down. |
600 |
- emake HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test |
601 |
-} |
602 |
- |
603 |
-multilib_src_install() { |
604 |
- # We need to create ${ED}/usr on our own to avoid a race condition (bug #665130) |
605 |
- dodir /usr |
606 |
- |
607 |
- emake DESTDIR="${D}" install |
608 |
- |
609 |
- # This is crappy in that the static archives are still built even |
610 |
- # when USE=static-libs. But this is due to a failing in the openssl |
611 |
- # build system: the static archives are built as PIC all the time. |
612 |
- # Only way around this would be to manually configure+compile openssl |
613 |
- # twice; once with shared lib support enabled and once without. |
614 |
- if ! use static-libs ; then |
615 |
- rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die |
616 |
- fi |
617 |
-} |
618 |
- |
619 |
-multilib_src_install_all() { |
620 |
- # openssl installs perl version of c_rehash by default, but |
621 |
- # we provide a shell version via app-misc/c_rehash |
622 |
- rm "${ED}"/usr/bin/c_rehash || die |
623 |
- |
624 |
- dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el |
625 |
- |
626 |
- # Create the certs directory |
627 |
- keepdir ${SSL_CNF_DIR}/certs |
628 |
- |
629 |
- # Namespace openssl programs to prevent conflicts with other man pages |
630 |
- cd "${ED}"/usr/share/man || die |
631 |
- local m d s |
632 |
- for m in $(find . -type f | xargs grep -L '#include') ; do |
633 |
- d=${m%/*} |
634 |
- d=${d#./} |
635 |
- m=${m##*/} |
636 |
- |
637 |
- [[ ${m} == openssl.1* ]] && continue |
638 |
- |
639 |
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" |
640 |
- |
641 |
- mv ${d}/{,ssl-}${m} || die |
642 |
- |
643 |
- # Fix up references to renamed man pages |
644 |
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} || die |
645 |
- ln -s ssl-${m} ${d}/openssl-${m} || die |
646 |
- |
647 |
- # Locate any symlinks that point to this man page |
648 |
- # We assume that any broken links are due to the above renaming |
649 |
- for s in $(find -L ${d} -type l) ; do |
650 |
- s=${s##*/} |
651 |
- |
652 |
- rm -f ${d}/${s} |
653 |
- |
654 |
- # We don't want to "|| die" here |
655 |
- ln -s ssl-${m} ${d}/ssl-${s} |
656 |
- ln -s ssl-${s} ${d}/openssl-${s} |
657 |
- done |
658 |
- done |
659 |
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" |
660 |
- |
661 |
- # bug #254521 |
662 |
- dodir /etc/sandbox.d |
663 |
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl |
664 |
- |
665 |
- diropts -m0700 |
666 |
- keepdir ${SSL_CNF_DIR}/private |
667 |
-} |
668 |
- |
669 |
-pkg_postinst() { |
670 |
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes (bug #333069)" |
671 |
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null |
672 |
- eend $? |
673 |
-} |
674 |
|
675 |
diff --git a/dev-libs/openssl/openssl-3.0.4-r1.ebuild b/dev-libs/openssl/openssl-3.0.4-r1.ebuild |
676 |
deleted file mode 100644 |
677 |
index f4951da01454..000000000000 |
678 |
--- a/dev-libs/openssl/openssl-3.0.4-r1.ebuild |
679 |
+++ /dev/null |
680 |
@@ -1,326 +0,0 @@ |
681 |
-# Copyright 1999-2022 Gentoo Authors |
682 |
-# Distributed under the terms of the GNU General Public License v2 |
683 |
- |
684 |
-EAPI=7 |
685 |
- |
686 |
-VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/openssl.org.asc |
687 |
-inherit edo flag-o-matic linux-info toolchain-funcs multilib-minimal multiprocessing verify-sig |
688 |
- |
689 |
-DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" |
690 |
-HOMEPAGE="https://www.openssl.org/" |
691 |
- |
692 |
-MY_P=${P/_/-} |
693 |
- |
694 |
-if [[ ${PV} == 9999 ]] ; then |
695 |
- EGIT_REPO_URI="https://github.com/openssl/openssl.git" |
696 |
- |
697 |
- inherit git-r3 |
698 |
-else |
699 |
- SRC_URI="mirror://openssl/source/${MY_P}.tar.gz |
700 |
- verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" |
701 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" |
702 |
-fi |
703 |
- |
704 |
-S="${WORKDIR}"/${MY_P} |
705 |
- |
706 |
-LICENSE="Apache-2.0" |
707 |
-SLOT="0/3" # .so version of libssl/libcrypto |
708 |
-IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" |
709 |
-RESTRICT="!test? ( test )" |
710 |
- |
711 |
-COMMON_DEPEND=" |
712 |
- >=app-misc/c_rehash-1.7-r1 |
713 |
- tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) |
714 |
-" |
715 |
-BDEPEND=" |
716 |
- >=dev-lang/perl-5 |
717 |
- sctp? ( >=net-misc/lksctp-tools-1.0.12 ) |
718 |
- test? ( |
719 |
- sys-apps/diffutils |
720 |
- sys-devel/bc |
721 |
- sys-process/procps |
722 |
- ) |
723 |
- verify-sig? ( sec-keys/openpgp-keys-openssl )" |
724 |
- |
725 |
-DEPEND="${COMMON_DEPEND}" |
726 |
-RDEPEND="${COMMON_DEPEND}" |
727 |
-PDEPEND="app-misc/ca-certificates" |
728 |
- |
729 |
-MULTILIB_WRAPPED_HEADERS=( |
730 |
- /usr/include/openssl/configuration.h |
731 |
-) |
732 |
- |
733 |
-PATCHES=( |
734 |
- "${FILESDIR}"/${P}-avx512-buffer-overflow.patch |
735 |
- "${FILESDIR}"/${P}-fix-test-build.patch |
736 |
-) |
737 |
- |
738 |
-pkg_setup() { |
739 |
- if use ktls ; then |
740 |
- if kernel_is -lt 4 18 ; then |
741 |
- ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" |
742 |
- else |
743 |
- CONFIG_CHECK="~TLS ~TLS_DEVICE" |
744 |
- ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" |
745 |
- ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" |
746 |
- |
747 |
- linux-info_pkg_setup |
748 |
- fi |
749 |
- fi |
750 |
- |
751 |
- [[ ${MERGE_TYPE} == binary ]] && return |
752 |
- |
753 |
- # must check in pkg_setup; sysctl doesn't work with userpriv! |
754 |
- if use test && use sctp ; then |
755 |
- # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" |
756 |
- # if sctp.auth_enable is not enabled. |
757 |
- local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) |
758 |
- if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then |
759 |
- die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" |
760 |
- fi |
761 |
- fi |
762 |
-} |
763 |
- |
764 |
-src_unpack() { |
765 |
- # Can delete this once test fix patch is dropped |
766 |
- if use verify-sig ; then |
767 |
- # Needed for downloaded patch (which is unsigned, which is fine) |
768 |
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} |
769 |
- fi |
770 |
- |
771 |
- default |
772 |
-} |
773 |
- |
774 |
-src_prepare() { |
775 |
- # Allow openssl to be cross-compiled |
776 |
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die |
777 |
- chmod a+rx gentoo.config || die |
778 |
- |
779 |
- # Keep this in sync with app-misc/c_rehash |
780 |
- SSL_CNF_DIR="/etc/ssl" |
781 |
- |
782 |
- # Make sure we only ever touch Makefile.org and avoid patching a file |
783 |
- # that gets blown away anyways by the Configure script in src_configure |
784 |
- rm -f Makefile |
785 |
- |
786 |
- if ! use vanilla ; then |
787 |
- PATCHES+=( |
788 |
- # Add patches which are Gentoo-specific customisations here |
789 |
- ) |
790 |
- fi |
791 |
- |
792 |
- default |
793 |
- |
794 |
- if use test && use sctp && has network-sandbox ${FEATURES} ; then |
795 |
- einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." |
796 |
- rm test/recipes/80-test_ssl_new.t || die |
797 |
- fi |
798 |
- |
799 |
- # - Make sure the man pages are suffixed (bug #302165) |
800 |
- # - Don't bother building man pages if they're disabled |
801 |
- # - Make DOCDIR Gentoo compliant |
802 |
- sed -i \ |
803 |
- -e '/^MANSUFFIX/s:=.*:=ssl:' \ |
804 |
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ |
805 |
- -e $(has noman FEATURES \ |
806 |
- && echo '/^install:/s:install_docs::' \ |
807 |
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ |
808 |
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ |
809 |
- Configurations/unix-Makefile.tmpl \ |
810 |
- || die |
811 |
- |
812 |
- # Quiet out unknown driver argument warnings since openssl |
813 |
- # doesn't have well-split CFLAGS and we're making it even worse |
814 |
- # and 'make depend' uses -Werror for added fun (bug #417795 again) |
815 |
- tc-is-clang && append-flags -Qunused-arguments |
816 |
- |
817 |
- # We really, really need to build OpenSSL w/ strict aliasing disabled. |
818 |
- # It's filled with violations and it *will* result in miscompiled |
819 |
- # code. This has been in the ebuild for > 10 years but even in 2022, |
820 |
- # it's still relevant: |
821 |
- # - https://github.com/llvm/llvm-project/issues/55255 |
822 |
- # - https://github.com/openssl/openssl/issues/18225 |
823 |
- # Don't remove the no strict aliasing bits below! |
824 |
- filter-flags -fstrict-aliasing |
825 |
- append-flags -fno-strict-aliasing |
826 |
- |
827 |
- append-flags $(test-flags-CC -Wa,--noexecstack) |
828 |
- |
829 |
- # Prefixify Configure shebang (bug #141906) |
830 |
- sed \ |
831 |
- -e "1s,/usr/bin/env,${BROOT}&," \ |
832 |
- -i Configure || die |
833 |
- |
834 |
- # Remove test target when FEATURES=test isn't set |
835 |
- if ! use test ; then |
836 |
- sed \ |
837 |
- -e '/^$config{dirs}/s@ "test",@@' \ |
838 |
- -i Configure || die |
839 |
- fi |
840 |
- |
841 |
- # The config script does stupid stuff to prompt the user. Kill it. |
842 |
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
843 |
- ./config --test-sanity || die "I AM NOT SANE" |
844 |
- |
845 |
- multilib_copy_sources |
846 |
-} |
847 |
- |
848 |
-multilib_src_configure() { |
849 |
- # bug #197996 |
850 |
- unset APPS |
851 |
- # bug #312551 |
852 |
- unset SCRIPTS |
853 |
- # bug #311473 |
854 |
- unset CROSS_COMPILE |
855 |
- |
856 |
- tc-export AR CC CXX RANLIB RC |
857 |
- |
858 |
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } |
859 |
- |
860 |
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") |
861 |
- |
862 |
- local sslout=$(./gentoo.config) |
863 |
- einfo "Using configuration: ${sslout:-(openssl knows best)}" |
864 |
- local config="Configure" |
865 |
- [[ -z ${sslout} ]] && config="config" |
866 |
- |
867 |
- # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features |
868 |
- local myeconfargs=( |
869 |
- ${sslout} |
870 |
- |
871 |
- $(use cpu_flags_x86_sse2 || echo "no-sse2") |
872 |
- enable-camellia |
873 |
- enable-ec |
874 |
- enable-ec2m |
875 |
- enable-sm2 |
876 |
- enable-srp |
877 |
- $(use elibc_musl && echo "no-async") |
878 |
- enable-idea |
879 |
- enable-mdc2 |
880 |
- enable-rc5 |
881 |
- $(use fips && echo "enable-fips") |
882 |
- $(use_ssl asm) |
883 |
- $(use_ssl ktls) |
884 |
- $(use_ssl rfc3779) |
885 |
- $(use_ssl sctp) |
886 |
- $(use test || echo "no-tests") |
887 |
- $(use_ssl tls-compression zlib) |
888 |
- $(use_ssl weak-ssl-ciphers) |
889 |
- |
890 |
- --prefix="${EPREFIX}"/usr |
891 |
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} |
892 |
- --libdir=$(get_libdir) |
893 |
- |
894 |
- shared |
895 |
- threads |
896 |
- ) |
897 |
- |
898 |
- CFLAGS= LDFLAGS= edo ./${config} "${myeconfargs[@]}" |
899 |
- |
900 |
- # Clean out hardcoded flags that openssl uses |
901 |
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ |
902 |
- -e 's:^CFLAGS=::' \ |
903 |
- -e 's:\(^\| \)-fomit-frame-pointer::g' \ |
904 |
- -e 's:\(^\| \)-O[^ ]*::g' \ |
905 |
- -e 's:\(^\| \)-march=[^ ]*::g' \ |
906 |
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \ |
907 |
- -e 's:\(^\| \)-m[^ ]*::g' \ |
908 |
- -e 's:^ *::' \ |
909 |
- -e 's: *$::' \ |
910 |
- -e 's: \+: :g' \ |
911 |
- -e 's:\\:\\\\:g' |
912 |
- ) |
913 |
- |
914 |
- # Now insert clean default flags with user flags |
915 |
- sed -i \ |
916 |
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ |
917 |
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ |
918 |
- Makefile \ |
919 |
- || die |
920 |
-} |
921 |
- |
922 |
-multilib_src_compile() { |
923 |
- # depend is needed to use $confopts; it also doesn't matter |
924 |
- # that it's -j1 as the code itself serializes subdirs |
925 |
- emake -j1 depend |
926 |
- |
927 |
- emake all |
928 |
-} |
929 |
- |
930 |
-multilib_src_test() { |
931 |
- # VFP = show subtests verbosely and show failed tests verbosely |
932 |
- # Normal V=1 would show everything verbosely but this slows things down. |
933 |
- emake HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test |
934 |
-} |
935 |
- |
936 |
-multilib_src_install() { |
937 |
- # We need to create ${ED}/usr on our own to avoid a race condition (bug #665130) |
938 |
- dodir /usr |
939 |
- |
940 |
- emake DESTDIR="${D}" install |
941 |
- |
942 |
- # This is crappy in that the static archives are still built even |
943 |
- # when USE=static-libs. But this is due to a failing in the openssl |
944 |
- # build system: the static archives are built as PIC all the time. |
945 |
- # Only way around this would be to manually configure+compile openssl |
946 |
- # twice; once with shared lib support enabled and once without. |
947 |
- if ! use static-libs ; then |
948 |
- rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die |
949 |
- fi |
950 |
-} |
951 |
- |
952 |
-multilib_src_install_all() { |
953 |
- # openssl installs perl version of c_rehash by default, but |
954 |
- # we provide a shell version via app-misc/c_rehash |
955 |
- rm "${ED}"/usr/bin/c_rehash || die |
956 |
- |
957 |
- dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el |
958 |
- |
959 |
- # Create the certs directory |
960 |
- keepdir ${SSL_CNF_DIR}/certs |
961 |
- |
962 |
- # Namespace openssl programs to prevent conflicts with other man pages |
963 |
- cd "${ED}"/usr/share/man || die |
964 |
- local m d s |
965 |
- for m in $(find . -type f | xargs grep -L '#include') ; do |
966 |
- d=${m%/*} |
967 |
- d=${d#./} |
968 |
- m=${m##*/} |
969 |
- |
970 |
- [[ ${m} == openssl.1* ]] && continue |
971 |
- |
972 |
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" |
973 |
- |
974 |
- mv ${d}/{,ssl-}${m} || die |
975 |
- |
976 |
- # Fix up references to renamed man pages |
977 |
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} || die |
978 |
- ln -s ssl-${m} ${d}/openssl-${m} || die |
979 |
- |
980 |
- # Locate any symlinks that point to this man page |
981 |
- # We assume that any broken links are due to the above renaming |
982 |
- for s in $(find -L ${d} -type l) ; do |
983 |
- s=${s##*/} |
984 |
- |
985 |
- rm -f ${d}/${s} |
986 |
- |
987 |
- # We don't want to "|| die" here |
988 |
- ln -s ssl-${m} ${d}/ssl-${s} |
989 |
- ln -s ssl-${s} ${d}/openssl-${s} |
990 |
- done |
991 |
- done |
992 |
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" |
993 |
- |
994 |
- # bug #254521 |
995 |
- dodir /etc/sandbox.d |
996 |
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl |
997 |
- |
998 |
- diropts -m0700 |
999 |
- keepdir ${SSL_CNF_DIR}/private |
1000 |
-} |
1001 |
- |
1002 |
-pkg_postinst() { |
1003 |
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes (bug #333069)" |
1004 |
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null |
1005 |
- eend $? |
1006 |
-} |