Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/
Date: Tue, 11 Sep 2018 15:41:55
Message-Id: 1536680504.3cd910c8b632da402f548f6d21d196cc3daa1320.polynomial-c@gentoo
1 commit: 3cd910c8b632da402f548f6d21d196cc3daa1320
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 11 15:41:26 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 11 15:41:44 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cd910c8
7
8 dev-libs/openssl: Removed old.
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 dev-libs/openssl/Manifest | 2 -
13 dev-libs/openssl/openssl-1.1.1_pre8.ebuild | 244 ----------------------------
14 dev-libs/openssl/openssl-1.1.1_pre9.ebuild | 248 -----------------------------
15 3 files changed, 494 deletions(-)
16
17 diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest
18 index 523a6779775..a942f505233 100644
19 --- a/dev-libs/openssl/Manifest
20 +++ b/dev-libs/openssl/Manifest
21 @@ -10,6 +10,4 @@ DIST openssl-1.1.0i.tar.gz 5453234 BLAKE2B ae6bec9c116769d98a77165b96fb7d201fe2e
22 DIST openssl-1.1.0i_ec_curve.c 18393 BLAKE2B 49dca7ddbc23270e5927454925df7bb18c8d9eb58f79e3a4fbcd8b7fc22fad36e2cb54ff9b63c2beeeea15c0c075a96e4ce8d03991355419af41fa9dc2aed3ad SHA512 ee3e576825bccdf02cede4205ab92c42ae9dd3a8e75ce58617a3a5980a61d144eb3c5197d9dcd378a5d49bf34c4b2f591aa6a619fee92b7a22825d72681ab879
23 DIST openssl-1.1.0i_ectest.c 29908 BLAKE2B b398bafd5d5aea71daa9c3e2749dece9e515950e35547a6191d83987907aae73e090a4b552636af4d1ab2b39f7e3b1ea3fde2012c99f068f9c99d247996c1212 SHA512 e4445f8959b040caca6a7494da2026b840f84348df5d4eab47a68570d274333f62fa0c381955093edd86c857dad98595ffa2980c54afdcf2a8d32f32d0c70450
24 DIST openssl-1.1.0i_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826
25 -DIST openssl-1.1.1-pre8.tar.gz 8334954 BLAKE2B 97cd018908925abd5a4eb660b3488b23efb582dd49dd87504e5522b2e9c5c6500417ef4893590a60ce35cfa316de51bfbf3e448e9cb2a5858ecd8ae72722922d SHA512 33b20f8589e0ba67500993635e1ba7f7f7ce2b6fa1eb8d4d7c44711ff047045dde57ad7e0605377c2b030fc954a3fb9b1f1d68feac2080991ef2b1b72a761041
26 -DIST openssl-1.1.1-pre9.tar.gz 8411103 BLAKE2B 93ac540afdf734c67aabbaf0682b43f044e8c05f80c0b1e7af926dd4179b215f68d569de24e45ae78a6915923ab5f77a8aa5690873e01c16478bf61d1f1c2a9b SHA512 cf23c11d7591cfa6dfd8b1086c2cdd33bd56f9eb44721cd60b228ef4d3c0c5de650dca53ae7becf7c8f0a9dd4bdae287f48116a3ac11d106b36919deb3214aa2
27 DIST openssl-1.1.1.tar.gz 8337920 BLAKE2B 266fb97bad4e1e7c0694c67a065d6669560695c92ad8fa10824169288a3fdfb9798faf408274a1e0c4e10a83a12b57367611bf4037dd2ab7ee74d7edab580a7b SHA512 c0284a4fe84bdf765ca5bc5148da4441ffc36392cfecaf9d372af00cf93b6de5681cab1248b6f8246474532155dc205da5ad49549ad7c61c07c917145e7c9c71
28
29 diff --git a/dev-libs/openssl/openssl-1.1.1_pre8.ebuild b/dev-libs/openssl/openssl-1.1.1_pre8.ebuild
30 deleted file mode 100644
31 index 746a28e3de3..00000000000
32 --- a/dev-libs/openssl/openssl-1.1.1_pre8.ebuild
33 +++ /dev/null
34 @@ -1,244 +0,0 @@
35 -# Copyright 1999-2018 Gentoo Foundation
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI="6"
39 -
40 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal
41 -
42 -MY_P=${P/_/-}
43 -DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
44 -HOMEPAGE="https://www.openssl.org/"
45 -SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
46 -
47 -LICENSE="openssl"
48 -SLOT="0/1.1" # .so version of libssl/libcrypto
49 -[[ "${PV}" = *_pre* ]] || \
50 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
51 -IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib"
52 -RESTRICT="!bindist? ( bindist )"
53 -
54 -RDEPEND=">=app-misc/c_rehash-1.7-r1
55 - zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
56 -DEPEND="${RDEPEND}
57 - >=dev-lang/perl-5
58 - sctp? ( >=net-misc/lksctp-tools-1.0.12 )
59 - test? (
60 - sys-apps/diffutils
61 - sys-devel/bc
62 - )"
63 -PDEPEND="app-misc/ca-certificates"
64 -
65 -S="${WORKDIR}/${MY_P}"
66 -
67 -MULTILIB_WRAPPED_HEADERS=(
68 - usr/include/openssl/opensslconf.h
69 -)
70 -
71 -PATCHES=(
72 - "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618
73 -)
74 -
75 -src_prepare() {
76 - # keep this in sync with app-misc/c_rehash
77 - SSL_CNF_DIR="/etc/ssl"
78 -
79 - # Make sure we only ever touch Makefile.org and avoid patching a file
80 - # that gets blown away anyways by the Configure script in src_configure
81 - rm -f Makefile
82 -
83 - if ! use vanilla ; then
84 - eapply "${PATCHES[@]}"
85 - fi
86 -
87 - eapply_user #332661
88 -
89 - # make sure the man pages are suffixed #302165
90 - # don't bother building man pages if they're disabled
91 - # Make DOCDIR Gentoo compliant
92 - sed -i \
93 - -e '/^MANSUFFIX/s:=.*:=ssl:' \
94 - -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
95 - -e $(has noman FEATURES \
96 - && echo '/^install:/s:install_docs::' \
97 - || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
98 - -e "/^DOCDIR/s@\$(BASENAME)@&-${PF}@" \
99 - Configurations/unix-Makefile.tmpl \
100 - || die
101 -
102 - # quiet out unknown driver argument warnings since openssl
103 - # doesn't have well-split CFLAGS and we're making it even worse
104 - # and 'make depend' uses -Werror for added fun (#417795 again)
105 - [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
106 -
107 - # allow openssl to be cross-compiled
108 - cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
109 - chmod a+rx gentoo.config || die
110 -
111 - append-flags -fno-strict-aliasing
112 - append-flags $(test-flags-CC -Wa,--noexecstack)
113 - append-cppflags -DOPENSSL_NO_BUF_FREELISTS
114 -
115 - # Prefixify Configure shebang (#141906)
116 - sed \
117 - -e "1s,/usr/bin/env,${EPREFIX}&," \
118 - -i Configure || die
119 - # Remove test target when FEATURES=test isn't set
120 - if ! use test ; then
121 - sed \
122 - -e '/^$config{dirs}/s@ "test",@@' \
123 - -i Configure || die
124 - fi
125 - # The config script does stupid stuff to prompt the user. Kill it.
126 - sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
127 - ./config --test-sanity || die "I AM NOT SANE"
128 -
129 - multilib_copy_sources
130 -}
131 -
132 -multilib_src_configure() {
133 - unset APPS #197996
134 - unset SCRIPTS #312551
135 - unset CROSS_COMPILE #311473
136 -
137 - tc-export CC AR RANLIB RC
138 -
139 - # Clean out patent-or-otherwise-encumbered code
140 - # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
141 - # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
142 - # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
143 - # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
144 - # RC5: Expired https://en.wikipedia.org/wiki/RC5
145 -
146 - use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
147 - echoit() { echo "$@" ; "$@" ; }
148 -
149 - local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
150 -
151 - # See if our toolchain supports __uint128_t. If so, it's 64bit
152 - # friendly and can use the nicely optimized code paths. #460790
153 - local ec_nistp_64_gcc_128
154 - # Disable it for now though #469976
155 - #if ! use bindist ; then
156 - # echo "__uint128_t i;" > "${T}"/128.c
157 - # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
158 - # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
159 - # fi
160 - #fi
161 -
162 - local sslout=$(./gentoo.config)
163 - einfo "Use configuration ${sslout:-(openssl knows best)}"
164 - local config="Configure"
165 - [[ -z ${sslout} ]] && config="config"
166 -
167 - # 'srp' was restricted until early 2017 as well.
168 - # "disable-deprecated" option breaks too many consumers.
169 - # Don't set it without thorough revdeps testing.
170 - echoit \
171 - ./${config} \
172 - ${sslout} \
173 - $(use cpu_flags_x86_sse2 || echo "no-sse2") \
174 - enable-camellia \
175 - $(use_ssl !bindist ec) \
176 - $(use_ssl !bindist srp) \
177 - $(use elibc_musl && echo "no-async") \
178 - ${ec_nistp_64_gcc_128} \
179 - enable-idea \
180 - enable-mdc2 \
181 - enable-rc5 \
182 - $(use_ssl sslv3 ssl3) \
183 - $(use_ssl sslv3 ssl3-method) \
184 - $(use_ssl asm) \
185 - $(use_ssl rfc3779) \
186 - $(use_ssl sctp) \
187 - $(use_ssl tls-heartbeat heartbeats) \
188 - $(use_ssl zlib) \
189 - --prefix="${EPREFIX}"/usr \
190 - --openssldir="${EPREFIX}"${SSL_CNF_DIR} \
191 - --libdir=$(get_libdir) \
192 - shared threads \
193 - || die
194 -
195 - # Clean out hardcoded flags that openssl uses
196 - # Fix quoting for sed
197 - local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
198 - -e 's:^CFLAGS=::' \
199 - -e 's:-fomit-frame-pointer ::g' \
200 - -e 's:-O[0-9] ::g' \
201 - -e 's:-march=[-a-z0-9]* ::g' \
202 - -e 's:-mcpu=[-a-z0-9]* ::g' \
203 - -e 's:-m[a-z0-9]* ::g' \
204 - -e 's:\\:\\\\:g' \
205 - )
206 - sed -i \
207 - -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
208 - -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
209 - Makefile || die
210 -}
211 -
212 -multilib_src_compile() {
213 - # depend is needed to use $confopts; it also doesn't matter
214 - # that it's -j1 as the code itself serializes subdirs
215 - emake -j1 depend
216 - emake all
217 -}
218 -
219 -multilib_src_test() {
220 - emake -j1 test
221 -}
222 -
223 -multilib_src_install() {
224 - emake DESTDIR="${D}" install
225 -}
226 -
227 -multilib_src_install_all() {
228 - # openssl installs perl version of c_rehash by default, but
229 - # we provide a shell version via app-misc/c_rehash
230 - rm "${ED%/}"/usr/bin/c_rehash || die
231 -
232 - dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
233 -
234 - # This is crappy in that the static archives are still built even
235 - # when USE=static-libs. But this is due to a failing in the openssl
236 - # build system: the static archives are built as PIC all the time.
237 - # Only way around this would be to manually configure+compile openssl
238 - # twice; once with shared lib support enabled and once without.
239 - use static-libs || rm -f "${ED%/}"/usr/lib*/lib*.a
240 -
241 - # create the certs directory
242 - keepdir ${SSL_CNF_DIR}/certs
243 -
244 - # Namespace openssl programs to prevent conflicts with other man pages
245 - cd "${ED%/}"/usr/share/man || die
246 - local m d s
247 - for m in $(find . -type f | xargs grep -L '#include') ; do
248 - d=${m%/*} ; d=${d#./} ; m=${m##*/}
249 - [[ ${m} == openssl.1* ]] && continue
250 - [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
251 - mv ${d}/{,ssl-}${m}
252 - # fix up references to renamed man pages
253 - sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
254 - ln -s ssl-${m} ${d}/openssl-${m}
255 - # locate any symlinks that point to this man page ... we assume
256 - # that any broken links are due to the above renaming
257 - for s in $(find -L ${d} -type l) ; do
258 - s=${s##*/}
259 - rm -f ${d}/${s}
260 - # We don't want to "|| die" here
261 - ln -s ssl-${m} ${d}/ssl-${s}
262 - ln -s ssl-${s} ${d}/openssl-${s}
263 - done
264 - done
265 - [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
266 -
267 - dodir /etc/sandbox.d #254521
268 - echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED%/}"/etc/sandbox.d/10openssl
269 -
270 - diropts -m0700
271 - keepdir ${SSL_CNF_DIR}/private
272 -}
273 -
274 -pkg_postinst() {
275 - ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
276 - c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null
277 - eend $?
278 -}
279
280 diff --git a/dev-libs/openssl/openssl-1.1.1_pre9.ebuild b/dev-libs/openssl/openssl-1.1.1_pre9.ebuild
281 deleted file mode 100644
282 index 4c92eedb393..00000000000
283 --- a/dev-libs/openssl/openssl-1.1.1_pre9.ebuild
284 +++ /dev/null
285 @@ -1,248 +0,0 @@
286 -# Copyright 1999-2018 Gentoo Foundation
287 -# Distributed under the terms of the GNU General Public License v2
288 -
289 -EAPI="6"
290 -
291 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal
292 -
293 -MY_P=${P/_/-}
294 -DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
295 -HOMEPAGE="https://www.openssl.org/"
296 -SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
297 -
298 -LICENSE="openssl"
299 -SLOT="0/1.1" # .so version of libssl/libcrypto
300 -[[ "${PV}" = *_pre* ]] || \
301 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
302 -IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib"
303 -RESTRICT="!bindist? ( bindist )"
304 -
305 -RDEPEND=">=app-misc/c_rehash-1.7-r1
306 - zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
307 -DEPEND="${RDEPEND}
308 - >=dev-lang/perl-5
309 - sctp? ( >=net-misc/lksctp-tools-1.0.12 )
310 - test? (
311 - sys-apps/diffutils
312 - sys-devel/bc
313 - )"
314 -PDEPEND="app-misc/ca-certificates"
315 -
316 -S="${WORKDIR}/${MY_P}"
317 -
318 -MULTILIB_WRAPPED_HEADERS=(
319 - usr/include/openssl/opensslconf.h
320 -)
321 -
322 -src_prepare() {
323 - # keep this in sync with app-misc/c_rehash
324 - SSL_CNF_DIR="/etc/ssl"
325 -
326 - # Make sure we only ever touch Makefile.org and avoid patching a file
327 - # that gets blown away anyways by the Configure script in src_configure
328 - rm -f Makefile
329 -
330 - if ! use vanilla ; then
331 - if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then
332 - [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
333 - fi
334 - fi
335 -
336 - eapply_user #332661
337 -
338 - # make sure the man pages are suffixed #302165
339 - # don't bother building man pages if they're disabled
340 - # Make DOCDIR Gentoo compliant
341 - sed -i \
342 - -e '/^MANSUFFIX/s:=.*:=ssl:' \
343 - -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
344 - -e $(has noman FEATURES \
345 - && echo '/^install:/s:install_docs::' \
346 - || echo '/^MANDIR=/s:=.*:='${EPREFIX%/}'/usr/share/man:') \
347 - -e "/^DOCDIR/s@\$(BASENAME)@&-${PF}@" \
348 - Configurations/unix-Makefile.tmpl \
349 - || die
350 -
351 - # quiet out unknown driver argument warnings since openssl
352 - # doesn't have well-split CFLAGS and we're making it even worse
353 - # and 'make depend' uses -Werror for added fun (#417795 again)
354 - [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
355 -
356 - # allow openssl to be cross-compiled
357 - cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
358 - chmod a+rx gentoo.config || die
359 -
360 - append-flags -fno-strict-aliasing
361 - append-flags $(test-flags-CC -Wa,--noexecstack)
362 - append-cppflags -DOPENSSL_NO_BUF_FREELISTS
363 -
364 - # Prefixify Configure shebang (#141906)
365 - sed \
366 - -e "1s,/usr/bin/env,${EPREFIX%/}&," \
367 - -i Configure || die
368 - # Remove test target when FEATURES=test isn't set
369 - if ! use test ; then
370 - sed \
371 - -e '/^$config{dirs}/s@ "test",@@' \
372 - -i Configure || die
373 - fi
374 - # The config script does stupid stuff to prompt the user. Kill it.
375 - sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
376 - ./config --test-sanity || die "I AM NOT SANE"
377 -
378 - multilib_copy_sources
379 -}
380 -
381 -multilib_src_configure() {
382 - unset APPS #197996
383 - unset SCRIPTS #312551
384 - unset CROSS_COMPILE #311473
385 -
386 - tc-export CC AR RANLIB RC
387 -
388 - # Clean out patent-or-otherwise-encumbered code
389 - # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
390 - # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
391 - # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
392 - # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
393 - # RC5: Expired https://en.wikipedia.org/wiki/RC5
394 -
395 - use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
396 - echoit() { echo "$@" ; "$@" ; }
397 -
398 - local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
399 -
400 - # See if our toolchain supports __uint128_t. If so, it's 64bit
401 - # friendly and can use the nicely optimized code paths. #460790
402 - local ec_nistp_64_gcc_128
403 - # Disable it for now though #469976
404 - #if ! use bindist ; then
405 - # echo "__uint128_t i;" > "${T}"/128.c
406 - # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
407 - # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
408 - # fi
409 - #fi
410 -
411 - local sslout=$(./gentoo.config)
412 - einfo "Use configuration ${sslout:-(openssl knows best)}"
413 - local config="Configure"
414 - [[ -z ${sslout} ]] && config="config"
415 -
416 - # 'srp' was restricted until early 2017 as well.
417 - # "disable-deprecated" option breaks too many consumers.
418 - # Don't set it without thorough revdeps testing.
419 - echoit \
420 - ./${config} \
421 - ${sslout} \
422 - $(use cpu_flags_x86_sse2 || echo "no-sse2") \
423 - enable-camellia \
424 - $(use_ssl !bindist ec) \
425 - $(use_ssl !bindist srp) \
426 - $(use elibc_musl && echo "no-async") \
427 - ${ec_nistp_64_gcc_128} \
428 - enable-idea \
429 - enable-mdc2 \
430 - enable-rc5 \
431 - $(use_ssl sslv3 ssl3) \
432 - $(use_ssl sslv3 ssl3-method) \
433 - $(use_ssl asm) \
434 - $(use_ssl rfc3779) \
435 - $(use_ssl sctp) \
436 - $(use_ssl tls-heartbeat heartbeats) \
437 - $(use_ssl zlib) \
438 - --prefix="${EPREFIX%/}"/usr \
439 - --openssldir="${EPREFIX%/}"${SSL_CNF_DIR} \
440 - --libdir=$(get_libdir) \
441 - shared threads \
442 - || die
443 -
444 - # Clean out hardcoded flags that openssl uses
445 - # Fix quoting for sed
446 - local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
447 - -e 's:^CFLAGS=::' \
448 - -e 's:-fomit-frame-pointer ::g' \
449 - -e 's:-O[0-9] ::g' \
450 - -e 's:-march=[-a-z0-9]* ::g' \
451 - -e 's:-mcpu=[-a-z0-9]* ::g' \
452 - -e 's:-m[a-z0-9]* ::g' \
453 - -e 's:\\:\\\\:g' \
454 - )
455 - sed -i \
456 - -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
457 - -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
458 - Makefile || die
459 -}
460 -
461 -multilib_src_compile() {
462 - # depend is needed to use $confopts; it also doesn't matter
463 - # that it's -j1 as the code itself serializes subdirs
464 - emake -j1 depend
465 - emake all
466 -}
467 -
468 -multilib_src_test() {
469 - emake -j1 test
470 -}
471 -
472 -multilib_src_install() {
473 - # We need to create $ED/usr on our own to avoid a race condition #665130
474 - if [[ ! -d "${ED%/}/usr" ]]; then
475 - # We can only create this directory once
476 - mkdir "${ED%/}"/usr || die
477 - fi
478 -
479 - emake DESTDIR="${D%/}" install
480 -}
481 -
482 -multilib_src_install_all() {
483 - # openssl installs perl version of c_rehash by default, but
484 - # we provide a shell version via app-misc/c_rehash
485 - rm "${ED%/}"/usr/bin/c_rehash || die
486 -
487 - dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
488 -
489 - # This is crappy in that the static archives are still built even
490 - # when USE=static-libs. But this is due to a failing in the openssl
491 - # build system: the static archives are built as PIC all the time.
492 - # Only way around this would be to manually configure+compile openssl
493 - # twice; once with shared lib support enabled and once without.
494 - use static-libs || rm -f "${ED%/}"/usr/lib*/lib*.a
495 -
496 - # create the certs directory
497 - keepdir ${SSL_CNF_DIR}/certs
498 -
499 - # Namespace openssl programs to prevent conflicts with other man pages
500 - cd "${ED%/}"/usr/share/man || die
501 - local m d s
502 - for m in $(find . -type f | xargs grep -L '#include') ; do
503 - d=${m%/*} ; d=${d#./} ; m=${m##*/}
504 - [[ ${m} == openssl.1* ]] && continue
505 - [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
506 - mv ${d}/{,ssl-}${m}
507 - # fix up references to renamed man pages
508 - sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
509 - ln -s ssl-${m} ${d}/openssl-${m}
510 - # locate any symlinks that point to this man page ... we assume
511 - # that any broken links are due to the above renaming
512 - for s in $(find -L ${d} -type l) ; do
513 - s=${s##*/}
514 - rm -f ${d}/${s}
515 - # We don't want to "|| die" here
516 - ln -s ssl-${m} ${d}/ssl-${s}
517 - ln -s ssl-${s} ${d}/openssl-${s}
518 - done
519 - done
520 - [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
521 -
522 - dodir /etc/sandbox.d #254521
523 - echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED%/}"/etc/sandbox.d/10openssl
524 -
525 - diropts -m0700
526 - keepdir ${SSL_CNF_DIR}/private
527 -}
528 -
529 -pkg_postinst() {
530 - ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
531 - c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null
532 - eend $?
533 -}