[dev-libs/openssl-compat] remove 1.1 version - in tree
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659
|
DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659
|
||||||
DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6
|
DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6
|
||||||
DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32
|
DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32
|
||||||
DIST openssl-1.1.1w.tar.gz 9893384 BLAKE2B 2fdba6ca0188928ab2f74e606136afca66cfa0467170fa6298ef160b64ac6fdcad1e81e5dd14013ce0e9921d0f7417edec531cd0beaf1196fec704c2c6d48395 SHA512 b4c625fe56a4e690b57b6a011a225ad0cb3af54bd8fb67af77b5eceac55cc7191291d96a660c5b568a08a2fbf62b4612818e7cca1bb95b2b6b4fc649b0552b6d
|
|
||||||
DIST openssl-compat-1.0.2u-versioned-symbols.patch.gz 24633 BLAKE2B 6bfad4ad27dbca0bd85bfd9521ffc844c3e93e6a1cca7c814edd49affc60ece1c706dd3aa7be2ce80857532531eac6f0f03f43c0be22a769d00d9241686eff71 SHA512 3d85aa34f2491e0e36eedc45829709e0fb552f6d558c2726b59dafa98c3e679b88497f3f7399d7565d88e727591e7d9b12f5b1e27116ba19b9a661d7f75b07a9
|
DIST openssl-compat-1.0.2u-versioned-symbols.patch.gz 24633 BLAKE2B 6bfad4ad27dbca0bd85bfd9521ffc844c3e93e6a1cca7c814edd49affc60ece1c706dd3aa7be2ce80857532531eac6f0f03f43c0be22a769d00d9241686eff71 SHA512 3d85aa34f2491e0e36eedc45829709e0fb552f6d558c2726b59dafa98c3e679b88497f3f7399d7565d88e727591e7d9b12f5b1e27116ba19b9a661d7f75b07a9
|
||||||
|
|||||||
@@ -1,184 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
#
|
|
||||||
# Openssl doesn't play along nicely with cross-compiling
|
|
||||||
# like autotools based projects, so let's teach it new tricks.
|
|
||||||
#
|
|
||||||
# Review the bundled 'config' script to see why kind of targets
|
|
||||||
# we can pass to the 'Configure' script.
|
|
||||||
|
|
||||||
|
|
||||||
# Testing routines
|
|
||||||
if [[ $1 == "test" ]] ; then
|
|
||||||
for c in \
|
|
||||||
"arm-gentoo-linux-uclibc |linux-generic32 -DL_ENDIAN" \
|
|
||||||
"armv5b-linux-gnu |linux-armv4 -DB_ENDIAN" \
|
|
||||||
"x86_64-pc-linux-gnu |linux-x86_64" \
|
|
||||||
"alpha-linux-gnu |linux-alpha-gcc" \
|
|
||||||
"alphaev56-unknown-linux-gnu |linux-alpha+bwx-gcc" \
|
|
||||||
"i686-pc-linux-gnu |linux-elf" \
|
|
||||||
"whatever-gentoo-freebsdX.Y |BSD-generic32" \
|
|
||||||
"i686-gentoo-freebsdX.Y |BSD-x86-elf" \
|
|
||||||
"sparc64-alpha-freebsdX.Y |BSD-sparc64" \
|
|
||||||
"ia64-gentoo-freebsd5.99234 |BSD-ia64" \
|
|
||||||
"x86_64-gentoo-freebsdX.Y |BSD-x86_64" \
|
|
||||||
"hppa64-aldsF-linux-gnu5.3 |linux-generic32 -DB_ENDIAN" \
|
|
||||||
"powerpc-gentOO-linux-uclibc |linux-ppc" \
|
|
||||||
"powerpc64-unk-linux-gnu |linux-ppc64" \
|
|
||||||
"powerpc64le-linux-gnu |linux-ppc64le" \
|
|
||||||
"x86_64-apple-darwinX |darwin64-x86_64-cc" \
|
|
||||||
"powerpc64-apple-darwinX |darwin64-ppc-cc" \
|
|
||||||
"i686-apple-darwinX |darwin-i386-cc" \
|
|
||||||
"i386-apple-darwinX |darwin-i386-cc" \
|
|
||||||
"powerpc-apple-darwinX |darwin-ppc-cc" \
|
|
||||||
"i586-pc-winnt |winnt-parity" \
|
|
||||||
"s390-ibm-linux-gnu |linux-generic32 -DB_ENDIAN" \
|
|
||||||
"s390x-linux-gnu |linux64-s390x" \
|
|
||||||
;do
|
|
||||||
CHOST=${c/|*}
|
|
||||||
ret_want=${c/*|}
|
|
||||||
ret_got=$(CHOST=${CHOST} "$0")
|
|
||||||
|
|
||||||
if [[ ${ret_want} == "${ret_got}" ]] ; then
|
|
||||||
echo "PASS: ${CHOST}"
|
|
||||||
else
|
|
||||||
echo "FAIL: ${CHOST}"
|
|
||||||
echo -e "\twanted: ${ret_want}"
|
|
||||||
echo -e "\twe got: ${ret_got}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
[[ -z ${CHOST} && -n $1 ]] && CHOST=$1
|
|
||||||
|
|
||||||
|
|
||||||
# Detect the operating system
|
|
||||||
case ${CHOST} in
|
|
||||||
*-aix*) system="aix";;
|
|
||||||
*-darwin*) system="darwin";;
|
|
||||||
*-freebsd*) system="BSD";;
|
|
||||||
*-hpux*) system="hpux";;
|
|
||||||
*-linux*) system="linux";;
|
|
||||||
*-solaris*) system="solaris";;
|
|
||||||
*-winnt*) system="winnt";;
|
|
||||||
x86_64-*-mingw*) system="mingw64";;
|
|
||||||
*mingw*) system="mingw";;
|
|
||||||
*-gnu*) system="hurd";;
|
|
||||||
*) exit 0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler munging
|
|
||||||
compiler="gcc"
|
|
||||||
if [[ ${CC} == "ccc" ]] ; then
|
|
||||||
compiler=${CC}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Detect target arch
|
|
||||||
machine=""
|
|
||||||
chost_machine=${CHOST%%-*}
|
|
||||||
case ${system} in
|
|
||||||
linux)
|
|
||||||
case ${chost_machine}:${ABI} in
|
|
||||||
aarch64*be*) machine="aarch64 -DB_ENDIAN";;
|
|
||||||
aarch64*) machine="aarch64 -DL_ENDIAN";;
|
|
||||||
alphaev56*|\
|
|
||||||
alphaev[678]*)machine=alpha+bwx-${compiler};;
|
|
||||||
alpha*) machine=alpha-${compiler};;
|
|
||||||
armv[4-9]*b*) machine="armv4 -DB_ENDIAN";;
|
|
||||||
armv[4-9]*) machine="armv4 -DL_ENDIAN";;
|
|
||||||
arm*b*) machine="generic32 -DB_ENDIAN";;
|
|
||||||
arm*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
avr*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
bfin*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
# hppa64*) machine=parisc64;;
|
|
||||||
hppa*) machine="generic32 -DB_ENDIAN";;
|
|
||||||
i[0-9]86*|\
|
|
||||||
x86_64*:x86) machine=x86;;
|
|
||||||
ia64*) machine=ia64;;
|
|
||||||
loongarch64*) machine="loongarch64 -DL_ENDIAN" system=linux64;;
|
|
||||||
m68*) machine="latomic -DB_ENDIAN";;
|
|
||||||
mips*el*:o32) machine="mips32 -DL_ENDIAN";;
|
|
||||||
mips*:o32) machine="mips32 -DB_ENDIAN";;
|
|
||||||
mips*el*:n32) machine="mips64 -DL_ENDIAN";;
|
|
||||||
mips*:n32) machine="mips64 -DB_ENDIAN";;
|
|
||||||
mips*el*:n64) machine="mips64 -DL_ENDIAN" system=linux64;;
|
|
||||||
mips*:n64) machine="mips64 -DB_ENDIAN" system=linux64;;
|
|
||||||
powerpc64*le*)machine=ppc64le;;
|
|
||||||
powerpc64*) machine=ppc64;;
|
|
||||||
powerpc*le*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
powerpc*) machine=ppc;;
|
|
||||||
riscv32*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
riscv64*) machine="riscv64 -DL_ENDIAN" system=linux64;;
|
|
||||||
# sh64*) machine=elf;;
|
|
||||||
sh*b*) machine="generic32 -DB_ENDIAN";;
|
|
||||||
sh*) machine="generic32 -DL_ENDIAN";;
|
|
||||||
# TODO: Might want to do -mcpu probing like glibc to determine a
|
|
||||||
# better default for sparc-linux-gnu targets. This logic will
|
|
||||||
# break v7 and older systems when they use it.
|
|
||||||
sparc*v7*) machine="generic32 -DB_ENDIAN";;
|
|
||||||
sparc64*) machine=sparcv9 system=linux64;;
|
|
||||||
sparc*v9*) machine=sparcv9;;
|
|
||||||
sparc*v8*) machine=sparcv8;;
|
|
||||||
sparc*) machine=sparcv8;;
|
|
||||||
s390x*) machine=s390x system=linux64;;
|
|
||||||
s390*) machine="generic32 -DB_ENDIAN";;
|
|
||||||
x86_64*:x32) machine=x32;;
|
|
||||||
x86_64*) machine=x86_64;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
BSD)
|
|
||||||
case ${chost_machine} in
|
|
||||||
alpha*) machine=generic64;;
|
|
||||||
i[6-9]86*) machine=x86-elf;;
|
|
||||||
ia64*) machine=ia64;;
|
|
||||||
sparc64*) machine=sparc64;;
|
|
||||||
x86_64*) machine=x86_64;;
|
|
||||||
*) machine=generic32;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
aix)
|
|
||||||
machine=${compiler}
|
|
||||||
;;
|
|
||||||
darwin)
|
|
||||||
case ${chost_machine} in
|
|
||||||
powerpc64) machine=ppc-cc; system=${system}64;;
|
|
||||||
powerpc) machine=ppc-cc;;
|
|
||||||
i?86*) machine=i386-cc;;
|
|
||||||
x86_64) machine=x86_64-cc; system=${system}64;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
hpux)
|
|
||||||
case ${chost_machine} in
|
|
||||||
ia64) machine=ia64-${compiler} ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
solaris)
|
|
||||||
case ${chost_machine} in
|
|
||||||
i386) machine=x86-${compiler} ;;
|
|
||||||
x86_64*) machine=x86_64-${compiler}; system=${system}64;;
|
|
||||||
sparcv9*) machine=sparcv9-${compiler}; system=${system}64;;
|
|
||||||
sparc*) machine=sparcv8-${compiler};;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
winnt)
|
|
||||||
machine=parity
|
|
||||||
;;
|
|
||||||
mingw*)
|
|
||||||
# special case ... no xxx-yyy style name
|
|
||||||
echo ${system}
|
|
||||||
;;
|
|
||||||
hurd)
|
|
||||||
case ${chost_machine} in
|
|
||||||
i[0-9]86*) machine=x86;;
|
|
||||||
x86_64*) machine=x86_64;;
|
|
||||||
*) machine=generic32;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# If we have something, show it
|
|
||||||
[[ -n ${machine} ]] && echo ${system}-${machine}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
https://github.com/openssl/openssl/issues/7679
|
|
||||||
|
|
||||||
--- a/Configurations/unix-Makefile.tmpl
|
|
||||||
+++ b/Configurations/unix-Makefile.tmpl
|
|
||||||
@@ -77,8 +77,14 @@
|
|
||||||
# to. You're welcome.
|
|
||||||
sub dependmagic {
|
|
||||||
my $target = shift;
|
|
||||||
-
|
|
||||||
- return "$target: build_generated\n\t\$(MAKE) depend && \$(MAKE) _$target\n_$target";
|
|
||||||
+ my $magic = <<"_____";
|
|
||||||
+$target: build_generated depend
|
|
||||||
+ \$(MAKE) _$target
|
|
||||||
+_$target
|
|
||||||
+_____
|
|
||||||
+ # Remove line ending
|
|
||||||
+ $magic =~ s|\R$||;
|
|
||||||
+ return $magic;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
-}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alistair Francis <alistair.francis@wdc.com>
|
|
||||||
Date: Thu, 29 Aug 2019 13:56:21 -0700
|
|
||||||
Subject: [PATCH] Add support for io_pgetevents_time64 syscall
|
|
||||||
|
|
||||||
32-bit architectures that are y2038 safe don't include syscalls that use
|
|
||||||
32-bit time_t. Instead these architectures have suffixed syscalls that
|
|
||||||
always use a 64-bit time_t. In the case of the io_getevents syscall the
|
|
||||||
syscall has been replaced with the io_pgetevents_time64 syscall instead.
|
|
||||||
|
|
||||||
This patch changes the io_getevents() function to use the correct
|
|
||||||
syscall based on the avaliable syscalls and the time_t size. We will
|
|
||||||
only use the new 64-bit time_t syscall if the architecture is using a
|
|
||||||
64-bit time_t. This is to avoid having to deal with 32/64-bit
|
|
||||||
conversions and relying on a 64-bit timespec struct on 32-bit time_t
|
|
||||||
platforms. As of Linux 5.3 there are no 32-bit time_t architectures
|
|
||||||
without __NR_io_getevents. In the future if a 32-bit time_t architecture
|
|
||||||
wants to use the 64-bit syscalls we can handle the conversion.
|
|
||||||
|
|
||||||
This fixes build failures on 32-bit RISC-V.
|
|
||||||
|
|
||||||
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
|
||||||
|
|
||||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
|
||||||
Reviewed-by: Paul Dale <paul.dale@oracle.com>
|
|
||||||
(Merged from https://github.com/openssl/openssl/pull/9819)
|
|
||||||
---
|
|
||||||
engines/e_afalg.c | 16 ++++++++++++++++
|
|
||||||
1 file changed, 16 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/engines/e_afalg.c b/engines/e_afalg.c
|
|
||||||
index dacbe358cb..99516cb1bb 100644
|
|
||||||
--- a/engines/e_afalg.c
|
|
||||||
+++ b/engines/e_afalg.c
|
|
||||||
@@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max,
|
|
||||||
struct io_event *events,
|
|
||||||
struct timespec *timeout)
|
|
||||||
{
|
|
||||||
+#if defined(__NR_io_getevents)
|
|
||||||
return syscall(__NR_io_getevents, ctx, min, max, events, timeout);
|
|
||||||
+#elif defined(__NR_io_pgetevents_time64)
|
|
||||||
+ /* Let's only support the 64 suffix syscalls for 64-bit time_t.
|
|
||||||
+ * This simplifies the code for us as we don't need to use a 64-bit
|
|
||||||
+ * version of timespec with a 32-bit time_t and handle converting
|
|
||||||
+ * between 64-bit and 32-bit times and check for overflows.
|
|
||||||
+ */
|
|
||||||
+ if (sizeof(timeout->tv_sec) == 8)
|
|
||||||
+ return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL);
|
|
||||||
+ else {
|
|
||||||
+ errno = ENOSYS;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
+# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64."
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key,
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2025 Gentoo Authors
|
# Copyright 1999-2026 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI="7"
|
EAPI="7"
|
||||||
@@ -22,7 +22,7 @@ MY_P=openssl-${PV/_/-}
|
|||||||
BINDIST_PATCH_SET="openssl-1.0.2t-bindist-1.0.tar.xz"
|
BINDIST_PATCH_SET="openssl-1.0.2t-bindist-1.0.tar.xz"
|
||||||
|
|
||||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||||
HOMEPAGE="https://openssl-library.org/"
|
HOMEPAGE="https://www.openssl.org/"
|
||||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
||||||
bindist? (
|
bindist? (
|
||||||
mirror://gentoo/bb/${BINDIST_PATCH_SET}
|
mirror://gentoo/bb/${BINDIST_PATCH_SET}
|
||||||
@@ -128,6 +128,8 @@ src_prepare() {
|
|||||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||||
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
||||||
|
|
||||||
|
filter-lto
|
||||||
|
|
||||||
sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
|
sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
|
||||||
# The config script does stupid stuff to prompt the user. Kill it.
|
# 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
|
sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
|
||||||
|
|||||||
@@ -1,219 +0,0 @@
|
|||||||
# Copyright 1999-2026 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=8
|
|
||||||
|
|
||||||
inherit edo flag-o-matic toolchain-funcs multilib-minimal
|
|
||||||
|
|
||||||
MY_P=openssl-${PV/_/-}
|
|
||||||
DESCRIPTION="Full-strength general purpose cryptography library (including SSL and TLS)"
|
|
||||||
HOMEPAGE="https://openssl-library.org/"
|
|
||||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
|
||||||
S="${WORKDIR}/${MY_P}"
|
|
||||||
|
|
||||||
LICENSE="openssl"
|
|
||||||
SLOT="$(ver_cut 1-3)"
|
|
||||||
if [[ ${PV} != *_pre* ]] ; then
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
|
||||||
fi
|
|
||||||
IUSE="+asm rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-compression tls-heartbeat vanilla weak-ssl-ciphers"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
!=dev-libs/openssl-1.1.1*:0
|
|
||||||
tls-compression? ( >=virtual/zlib-1.2.8-r1:=[static-libs(+)?,${MULTILIB_USEDEP}] )
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
BDEPEND="
|
|
||||||
>=dev-lang/perl-5
|
|
||||||
sctp? ( >=net-misc/lksctp-tools-1.0.12 )
|
|
||||||
test? (
|
|
||||||
sys-apps/diffutils
|
|
||||||
app-alternatives/bc
|
|
||||||
kernel_linux? ( sys-process/procps )
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
# Do not install any docs
|
|
||||||
DOCS=()
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
# General patches which are suitable to always apply
|
|
||||||
# If they're Gentoo specific, add to USE=-vanilla logic in src_prepare!
|
|
||||||
"${FILESDIR}"/${PN/-compat}-1.1.0j-parallel_install_fix.patch # bug #671602
|
|
||||||
"${FILESDIR}"/${PN/-compat}-1.1.1i-riscv32.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
[[ ${MERGE_TYPE} == binary ]] && return
|
|
||||||
|
|
||||||
# must check in pkg_setup; sysctl doesn't work with userpriv!
|
|
||||||
if use test && use sctp; then
|
|
||||||
# test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
|
|
||||||
# if sctp.auth_enable is not enabled.
|
|
||||||
local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
|
|
||||||
if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]]; then
|
|
||||||
die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# Allow openssl to be cross-compiled
|
|
||||||
cp "${FILESDIR}"/gentoo.config-1.0.4 gentoo.config || die
|
|
||||||
chmod a+rx gentoo.config || die
|
|
||||||
|
|
||||||
# Keep this in sync with app-misc/c_rehash
|
|
||||||
SSL_CNF_DIR="/etc/ssl"
|
|
||||||
|
|
||||||
# Make sure we only ever touch Makefile.org and avoid patching a file
|
|
||||||
# that gets blown away anyways by the Configure script in src_configure
|
|
||||||
rm -f Makefile
|
|
||||||
|
|
||||||
if ! use vanilla ; then
|
|
||||||
PATCHES+=(
|
|
||||||
# Add patches which are Gentoo-specific customisations here
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
default
|
|
||||||
|
|
||||||
if use test && use sctp && has network-sandbox ${FEATURES}; then
|
|
||||||
einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..."
|
|
||||||
rm test/recipes/80-test_ssl_new.t || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 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)
|
|
||||||
tc-is-clang && append-flags -Qunused-arguments
|
|
||||||
|
|
||||||
# We really, really need to build OpenSSL w/ strict aliasing disabled.
|
|
||||||
# It's filled with violations and it *will* result in miscompiled
|
|
||||||
# code. This has been in the ebuild for > 10 years but even in 2022,
|
|
||||||
# it's still relevant:
|
|
||||||
# - https://github.com/llvm/llvm-project/issues/55255
|
|
||||||
# - https://github.com/openssl/openssl/issues/18225
|
|
||||||
# - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057
|
|
||||||
# Don't remove the no strict aliasing bits below!
|
|
||||||
filter-flags -fstrict-aliasing
|
|
||||||
append-flags -fno-strict-aliasing
|
|
||||||
|
|
||||||
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
|
||||||
|
|
||||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
|
||||||
|
|
||||||
# Remove test target when FEATURES=test isn't set
|
|
||||||
if ! use test ; then
|
|
||||||
sed \
|
|
||||||
-e '/^$config{dirs}/s@ "test",@@' \
|
|
||||||
-i Configure || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use prefix && [[ ${CHOST} == *-solaris* ]] ; then
|
|
||||||
# use GNU ld full option, not to confuse it on Solaris
|
|
||||||
sed -i \
|
|
||||||
-e 's/-Wl,-M,/-Wl,--version-script=/' \
|
|
||||||
-e 's/-Wl,-h,/-Wl,--soname=/' \
|
|
||||||
Configurations/10-main.conf || die
|
|
||||||
|
|
||||||
# fix building on Solaris 10
|
|
||||||
# https://github.com/openssl/openssl/issues/6333
|
|
||||||
sed -i \
|
|
||||||
-e 's/-lsocket -lnsl -ldl/-lsocket -lnsl -ldl -lrt/' \
|
|
||||||
Configurations/10-main.conf || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
local sslout=$(./gentoo.config)
|
|
||||||
einfo "Using configuration: ${sslout:-(openssl knows best)}"
|
|
||||||
local config="perl Configure"
|
|
||||||
[[ -z ${sslout} ]] && config="sh config -v"
|
|
||||||
|
|
||||||
# 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
|
|
||||||
edo ${config} ${sslout} --test-sanity
|
|
||||||
|
|
||||||
multilib_copy_sources
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_configure() {
|
|
||||||
# bug #197996
|
|
||||||
unset APPS
|
|
||||||
# bug #312551
|
|
||||||
unset SCRIPTS
|
|
||||||
# bug #311473
|
|
||||||
unset CROSS_COMPILE
|
|
||||||
|
|
||||||
tc-export AR CC CXX RANLIB RC
|
|
||||||
|
|
||||||
use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
|
|
||||||
|
|
||||||
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
|
|
||||||
|
|
||||||
# See if our toolchain supports __uint128_t. If so, it's 64bit
|
|
||||||
# friendly and can use the nicely optimized code paths, bug #460790.
|
|
||||||
#local ec_nistp_64_gcc_128
|
|
||||||
#
|
|
||||||
# Disable it for now though (bug #469976)
|
|
||||||
# Do NOT re-enable without substantial discussion first!
|
|
||||||
#
|
|
||||||
#echo "__uint128_t i;" > "${T}"/128.c
|
|
||||||
#if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
|
|
||||||
# ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
local sslout=$(./gentoo.config)
|
|
||||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
|
||||||
local config="perl Configure"
|
|
||||||
[[ -z ${sslout} ]] && config="sh config -v"
|
|
||||||
|
|
||||||
# "disable-deprecated" option breaks too many consumers.
|
|
||||||
# Don't set it without thorough revdeps testing.
|
|
||||||
# Make sure user flags don't get added *yet* to avoid duplicated
|
|
||||||
# flags.
|
|
||||||
local myeconfargs=(
|
|
||||||
${sslout}
|
|
||||||
|
|
||||||
$(use cpu_flags_x86_sse2 || echo "no-sse2")
|
|
||||||
enable-camellia
|
|
||||||
enable-ec
|
|
||||||
enable-ec2m
|
|
||||||
enable-sm2
|
|
||||||
enable-srp
|
|
||||||
$(use elibc_musl && echo "no-async")
|
|
||||||
${ec_nistp_64_gcc_128}
|
|
||||||
enable-idea
|
|
||||||
enable-mdc2
|
|
||||||
enable-rc5
|
|
||||||
$(use_ssl sslv3 ssl3)
|
|
||||||
$(use_ssl sslv3 ssl3-method)
|
|
||||||
$(use_ssl asm)
|
|
||||||
$(use_ssl rfc3779)
|
|
||||||
$(use_ssl sctp)
|
|
||||||
$(use test || echo "no-tests")
|
|
||||||
$(use_ssl tls-compression zlib)
|
|
||||||
$(use_ssl tls-heartbeat heartbeats)
|
|
||||||
$(use_ssl weak-ssl-ciphers)
|
|
||||||
|
|
||||||
--prefix="${EPREFIX}"/usr
|
|
||||||
--openssldir="${EPREFIX}"${SSL_CNF_DIR}
|
|
||||||
--libdir=$(get_libdir)
|
|
||||||
|
|
||||||
shared
|
|
||||||
threads
|
|
||||||
)
|
|
||||||
|
|
||||||
edo ${config} "${myeconfargs[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_compile() {
|
|
||||||
emake all
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_test() {
|
|
||||||
emake -j1 test
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install() {
|
|
||||||
dolib.so lib{crypto,ssl}.so.$(ver_cut 1-2 "${SLOT}")
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user