summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2023-02-04 09:08:56 -0500
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2023-02-04 09:08:56 -0500
commitb3959135803a7f4b199b347a250d2f61195a5600 (patch)
treea3fdd4edeedb106c2e9ad227bca633beb14ed17e /dev-libs
parent6662b77dc20ae66060c1852ec51af011bc2654b1 (diff)
downloadgentoo-overlay-b3959135803a7f4b199b347a250d2f61195a5600.tar.xz
gentoo-overlay-b3959135803a7f4b199b347a250d2f61195a5600.zip
dev-libs/openssl: sync
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/openssl/openssl-3.0.7-r5.ebuild (renamed from dev-libs/openssl/openssl-3.0.7-r3.ebuild)111
1 files changed, 16 insertions, 95 deletions
diff --git a/dev-libs/openssl/openssl-3.0.7-r3.ebuild b/dev-libs/openssl/openssl-3.0.7-r5.ebuild
index fd6e3fc..65274cd 100644
--- a/dev-libs/openssl/openssl-3.0.7-r3.ebuild
+++ b/dev-libs/openssl/openssl-3.0.7-r5.ebuild
@@ -30,7 +30,6 @@ IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compre
RESTRICT="!test? ( test )"
COMMON_DEPEND="
- >=app-misc/c_rehash-1.7-r1
tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
"
BDEPEND="
@@ -117,19 +116,6 @@ src_prepare() {
rm test/recipes/80-test_ssl_new.t || die
fi
- # - Make sure the man pages are suffixed (bug #302165)
- # - Don't bother building man pages if they're disabled
- # - Make DOCDIR Gentoo compliant
- sed -i \
- -e '/^MANSUFFIX/s:=.*:=ssl:' \
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
- -e $(has noman FEATURES \
- && echo '/^install:/s:install_docs::' \
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \
- Configurations/unix-Makefile.tmpl \
- || die
-
# Quiet out unknown driver argument warnings since openssl
# doesn't have well-split CFLAGS and we're making it even worse
# and 'make depend' uses -Werror for added fun (bug #417795 again)
@@ -148,24 +134,9 @@ src_prepare() {
append-flags $(test-flags-CC -Wa,--noexecstack)
- # Prefixify Configure shebang (bug #141906)
- sed \
- -e "1s,/usr/bin/env,${BROOT}&," \
- -i Configure || die
-
- # Remove test target when FEATURES=test isn't set
- if ! use test ; then
- sed \
- -e '/^$config{dirs}/s@ "test",@@' \
- -i Configure || die
- fi
-
local sslout=$(./gentoo.config)
einfo "Using configuration: ${sslout:-(openssl knows best)}"
-
- # The config script does stupid stuff to prompt the user. Kill it.
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
- ./config ${sslout} --test-sanity || die "I AM NOT SANE"
+ edo perl Configure ${sslout} --test-sanity
multilib_copy_sources
}
@@ -186,8 +157,6 @@ multilib_src_configure() {
local sslout=$(./gentoo.config)
einfo "Using configuration: ${sslout:-(openssl knows best)}"
- local config="Configure"
- [[ -z ${sslout} ]] && config="config"
# https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features
local myeconfargs=(
@@ -220,36 +189,15 @@ multilib_src_configure() {
threads
)
- CFLAGS= LDFLAGS= edo ./${config} "${myeconfargs[@]}"
-
- # Clean out hardcoded flags that openssl uses
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
- -e 's:^CFLAGS=::' \
- -e 's:\(^\| \)-fomit-frame-pointer::g' \
- -e 's:\(^\| \)-O[^ ]*::g' \
- -e 's:\(^\| \)-march=[^ ]*::g' \
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \
- -e 's:\(^\| \)-m[^ ]*::g' \
- -e 's:^ *::' \
- -e 's: *$::' \
- -e 's: \+: :g' \
- -e 's:\\:\\\\:g'
- )
-
- # Now insert clean default flags with user flags
- sed -i \
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
- Makefile \
- || die
+ edo perl Configure "${myeconfargs[@]}"
}
multilib_src_compile() {
- # depend is needed to use $confopts; it also doesn't matter
- # that it's -j1 as the code itself serializes subdirs
- emake -j1 depend
+ emake build_sw
- emake all
+ if multilib_is_native_abi; then
+ emake build_docs
+ fi
}
multilib_src_test() {
@@ -259,10 +207,15 @@ multilib_src_test() {
}
multilib_src_install() {
- # We need to create ${ED}/usr on our own to avoid a race condition (bug #665130)
- dodir /usr
+ emake DESTDIR="${D}" install_sw
+ if use fips; then
+ emake DESTDIR="${D}" install_fips
+ fi
- emake DESTDIR="${D}" install
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install_ssldirs
+ emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} install_docs
+ fi
# 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
@@ -284,38 +237,6 @@ multilib_src_install_all() {
# Create the certs directory
keepdir ${SSL_CNF_DIR}/certs
- # Namespace openssl programs to prevent conflicts with other man pages
- cd "${ED}"/usr/share/man || die
- local m d s
- for m in $(find . -type f | xargs grep -L '#include') ; do
- d=${m%/*}
- d=${d#./}
- m=${m##*/}
-
- [[ ${m} == openssl.1* ]] && continue
-
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
-
- mv ${d}/{,ssl-}${m} || die
-
- # Fix up references to renamed man pages
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} || die
- ln -s ssl-${m} ${d}/openssl-${m} || die
-
- # Locate any symlinks that point to this man page
- # We assume that any broken links are due to the above renaming
- for s in $(find -L ${d} -type l) ; do
- s=${s##*/}
-
- rm -f ${d}/${s}
-
- # We don't want to "|| die" here
- ln -s ssl-${m} ${d}/ssl-${s}
- ln -s ssl-${s} ${d}/openssl-${s}
- done
- done
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
-
# bug #254521
dodir /etc/sandbox.d
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
@@ -325,7 +246,7 @@ multilib_src_install_all() {
}
pkg_postinst() {
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes (bug #333069)"
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null
+ ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)"
+ openssl rehash "${EROOT}${SSL_CNF_DIR}/certs"
eend $?
}