commit: 0ee60b97e7f653fc0cb54ac03809c07ba6c092aa Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Mon Jun 7 19:31:13 2021 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Mon Jun 7 19:31:13 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ee60b97
dev-libs/openssl: be more careful when removing static libs Avoids removing .dll.a files necessary for linking on mingw. Closes: https://bugs.gentoo.org/792318 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> dev-libs/openssl/openssl-1.0.2u.ebuild | 16 +++++++++------- dev-libs/openssl/openssl-1.1.1k.ebuild | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dev-libs/openssl/openssl-1.0.2u.ebuild b/dev-libs/openssl/openssl-1.0.2u.ebuild index b7b3fba6c2e..65c29788382 100644 --- a/dev-libs/openssl/openssl-1.0.2u.ebuild +++ b/dev-libs/openssl/openssl-1.0.2u.ebuild @@ -248,6 +248,15 @@ multilib_src_install() { fi emake INSTALL_PREFIX="${D}" install + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi } multilib_src_install_all() { @@ -260,13 +269,6 @@ multilib_src_install_all() { use rfc3779 && dodoc engines/ccgost/README.gost - # This is crappy in that the static archives are still built even - # when USE=static-libs. But this is due to a failing in the openssl - # build system: the static archives are built as PIC all the time. - # Only way around this would be to manually configure+compile openssl - # twice; once with shared lib support enabled and once without. - use static-libs || rm -f "${ED}"/usr/lib*/lib*.a - # create the certs directory dodir ${SSL_CNF_DIR}/certs cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die diff --git a/dev-libs/openssl/openssl-1.1.1k.ebuild b/dev-libs/openssl/openssl-1.1.1k.ebuild index 9b4eaf0e7a6..1e98af8f703 100644 --- a/dev-libs/openssl/openssl-1.1.1k.ebuild +++ b/dev-libs/openssl/openssl-1.1.1k.ebuild @@ -270,6 +270,15 @@ multilib_src_install() { fi emake DESTDIR="${D}" install + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi } multilib_src_install_all() { @@ -279,13 +288,6 @@ multilib_src_install_all() { dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el - # This is crappy in that the static archives are still built even - # when USE=static-libs. But this is due to a failing in the openssl - # build system: the static archives are built as PIC all the time. - # Only way around this would be to manually configure+compile openssl - # twice; once with shared lib support enabled and once without. - use static-libs || rm -f "${ED}"/usr/lib*/lib*.a - # create the certs directory keepdir ${SSL_CNF_DIR}/certs
