Bump and add fixed ebuilds

This commit is contained in:
Mario Fetka
2026-02-24 02:00:28 +01:00
parent 47b636e042
commit d29272711e
95 changed files with 3475 additions and 288 deletions

View File

@@ -0,0 +1,10 @@
AUX gentoo.config-0.9.8 4125 BLAKE2B f1fbef2b61df1ac9d0ea5d36e5ced1c40ed098a221db6b975edd22585f787dd22e708b2b89bbb4bfab81be3b0234d4daceda1726ee27195a7aac1ba461f4dff2 SHA512 83259e0e3689bfb80de403379ff942b488a8d716e841ca22dfe47aeefeaf8dfab8e06a32af3c5e392def723acf50ea659f62ee16ba7dd81ca54ea79b9e474f07
AUX openssl-0.9.7d-mit_krb5.patch 710 BLAKE2B f7bbfe6f0401c376473b156ea96c9fd1aa7953da20cee03c46fe1145eab6174191f311971481371e763b0e9e549b13986e1bfeda456ea74875f20f091be1423c SHA512 4dfe5b9464913deb94ea2381ec0b7ca9556e08e60e559867b3eb3ea08955848311c82efc8fad7a9f62d0c4131ead13da3dbe17cb056ff1481fce99ac52de838b
AUX openssl-0.9.8e-bsd-sparc64.patch 1484 BLAKE2B 6cfba6ee4fa849e6d7799fbe749abf3763f22df3d5698b9120e89f0a74912462e7b14e457040071c2b46432210e9827ccc4e399eda54a5375b0f045d7e0b67ef SHA512 dbbfae5ce19a4247a6b1ca4a45ca6c15904e13e6bf603447cb5d9820292ceb411792e29db0001c5869e3c4cb0a8afe7fb64d35f007052efc68098301c2e81def
AUX openssl-0.9.8h-ldflags.patch 1151 BLAKE2B b215e46c380e571f153445f902803cf5d03d44f6f8b95a677c08bdf542e6d199c58f1f4699eb7dbd9de8bdc02b697a7971a9a06157d96c3dbd4295090a778723 SHA512 7f98c5ad310710aeceefd6fac440682bf2baaf41ce17de535add54af88c45fa0689e6e6c26bafb4fe2290fd3b6d80c51d85ffda1e276a73a3d66a319585aab11
AUX openssl-0.9.8m-binutils.patch 684 BLAKE2B 35650e98595910d2e6b6fc846b49fecbb2a8e4a8b647bbec009a829ae4af8afdc7e7edac7a1eec8f13af1ad69b7036ca6af28bfd9509e6bba58f2b3906d6bdd5 SHA512 5e8a20111bd4809e7375c7323dab2c2edd6a131d1ec2377ee99c5e06ceb7b4b000e9606ba6d0e68cd67d8e001cc8194e11e301eace0feb066d5f3c5b331b5f04
AUX openssl-0.9.8z_p8-perl-5.26.patch 310 BLAKE2B 29c46391d127cd2b1cb3943f1bb162a8b931e455f35f9e045372102d1461e3e3fd4cf4e4f544ec06a0b46a573d2009c8decf22678df03707c2487bade64f27b5 SHA512 b8e745ff90e447b000ace9cfd5f746c1bc8f3bb8249064d1d2f1072a1a628f5a89c405c7f384c73f0310f2a2f7af672950a9b7adbc583b1ee94b41d911b8a708
AUX openssl-0.9.8z_p8-termios.patch 256 BLAKE2B 3bb6e5c17e3d730a57b66c605ab9b25d5dc20e1b5d4edb1c5fda6427435e49823557340c529983c9b1946a988e30d710c8aa8b438d61ad0cbe4d9d7114f76f7b SHA512 03466045b95e498de0980582298b0dc6c077f62ea44f19a75fc4ace6e196fc6eed636a5717ef5f7c5e431bdaca496fd206e92fee5ca467e8f5e5e300a8957d14
DIST openssl-0.9.8zh.tar.gz 3818524 BLAKE2B 610bb4858900983cf4519fa8b63f1e03b3845e39e68884fd8bebd738cd5cd6c2c75513643af49bf9e2294adc446a6516480fe9b62de55d9b6379bf9e7c5cd364 SHA512 b97fa2468211f86c0719c68ad1781eff84f772c479ed5193d6da14bac086b4ca706e7d851209d9df3f0962943b5e5333ab0def00110fb2e517caa73c0c6674c6
EBUILD openssl-compat-0.9.8z_p8-r4.ebuild 5057 BLAKE2B 4b7fdd9457eea94f1d2dface9c05ea238f0902b03cc88d28a18ae1088a3b0041ba4cf8444f38922987e687e98f7fa2abfe93d849300fb5b6fa619ab060c79eda SHA512 edb5c1894a74122017fa4fcdb1cab251b44fcda17fed35ae6adfb2814f3175c6ffab41430bd0b6675a754441a27c4301bb439747ccc9e487ba8d5abbe9f956bd
MISC metadata.xml 603 BLAKE2B f1c25e5f210e667f8358785732efac28723175621ffba74868537dc603685a7be2d809ffe7c5e04af304905845e27b7f2301168d199e61a449ff3c1b813bd744 SHA512 08d3b791543f2e5db3f066ce29875436367e8d413cbdb277bccf9ee609c5ebb58dcb2958d140446ffb3eca507ae3dc73531f028ce30233e0399d82611b3a89db

View File

@@ -0,0 +1,144 @@
#!/usr/bin/env bash
# Copyright 1999-2019 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-generic32 -DB_ENDIAN" \
"x86_64-pc-linux-gnu |linux-x86_64" \
"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" \
"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" \
;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";;
*) 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} in
alphaev56*) machine=alpha+bwx-${compiler};;
alphaev[678]*)machine=alpha+bwx-${compiler};;
alpha*) machine=alpha-${compiler};;
arm*b*) machine="generic32 -DB_ENDIAN";;
arm*) machine="generic32 -DL_ENDIAN";;
# hppa64*) machine=parisc64;;
hppa*) machine="generic32 -DB_ENDIAN";;
i[0-9]86*) machine=elf;;
ia64*) machine=ia64;;
m68*) machine="generic32 -DB_ENDIAN";;
mips*el*) machine="generic32 -DL_ENDIAN";;
mips*) machine="generic32 -DB_ENDIAN";;
powerpc64*) machine=ppc64;;
powerpc*) machine=ppc;;
# sh64*) machine=elf;;
sh*b*) machine="generic32 -DB_ENDIAN";;
sh*) machine="generic32 -DL_ENDIAN";;
sparc*v7*) machine="generic32 -DB_ENDIAN";;
sparc64*) machine=sparcv9;;
sparc*) machine=sparcv8;;
s390x*) machine="generic64 -DB_ENDIAN";;
s390*) machine="generic32 -DB_ENDIAN";;
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
;;
esac
# If we have something, show it
[[ -n ${machine} ]] && echo ${system}-${machine}

View File

@@ -0,0 +1,25 @@
--- a/Configure
+++ b/Configure
@@ -365,7 +365,7 @@
# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
# simply *happens* to work around a compiler bug in gcc 3.3.3,
# triggered by RIPEMD160 code.
-"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"BSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:ULTRASPARC::SIXTY_FOUR_BIT_LONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
the -B flag is a no-op nowadays
--- a/crypto/des/Makefile
+++ b/crypto/des/Makefile
@@ -62,7 +62,7 @@
$(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
des_enc-sparc.S: asm/des_enc.m4
- m4 -B 8192 asm/des_enc.m4 > des_enc-sparc.S
+ m4 asm/des_enc.m4 > des_enc-sparc.S
# ELF
dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl

View File

@@ -0,0 +1,29 @@
http://bugs.gentoo.org/181438
http://bugs.gentoo.org/327421
https://rt.openssl.org/Ticket/Display.html?id=3332&user=guest&pass=guest
make sure we respect LDFLAGS
also make sure we don't add useless -rpath flags to the system libdir
--- openssl-0.9.8h/Makefile.org
+++ openssl-0.9.8h/Makefile.org
@@ -180,6 +181,7 @@
MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
MAKEDEPPROG='${MAKEDEPPROG}' \
+ LDFLAGS='${LDFLAGS}' \
SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' \
EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' \
--- openssl-0.9.8h/Makefile.shared
+++ openssl-0.9.8h/Makefile.shared
@@ -153,7 +153,7 @@
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
+DO_GNU_APP=LDFLAGS="$(LDFLAGS) $(CFLAGS)"
#This is rather special. It's a special target with which one can link
#applications without bothering with any features that have anything to

View File

@@ -0,0 +1,24 @@
http://bugs.gentoo.org/289130
Ripped from Fedora
--- openssl-1.0.0-beta4/crypto/sha/asm/sha1-x86_64.pl.binutils 2009-11-12 15:17:29.000000000 +0100
+++ openssl-1.0.0-beta4/crypto/sha/asm/sha1-x86_64.pl 2009-11-12 17:24:18.000000000 +0100
@@ -150,7 +150,7 @@ ___
sub BODY_20_39 {
my ($i,$a,$b,$c,$d,$e,$f)=@_;
my $j=$i+1;
-my $K=($i<40)?0x6ed9eba1:0xca62c1d6;
+my $K=($i<40)?0x6ed9eba1:-0x359d3e2a;
$code.=<<___ if ($i<79);
lea $K($xi,$e),$f
mov `4*($j%16)`(%rsp),$xi
@@ -187,7 +187,7 @@ sub BODY_40_59 {
my ($i,$a,$b,$c,$d,$e,$f)=@_;
my $j=$i+1;
$code.=<<___;
- lea 0x8f1bbcdc($xi,$e),$f
+ lea -0x70e44324($xi,$e),$f
mov `4*($j%16)`(%rsp),$xi
mov $b,$t0
mov $b,$t1

View File

@@ -0,0 +1,13 @@
https://bugs.gentoo.org/639876
--- a/crypto/des/asm/des-586.pl
+++ b/crypto/des/asm/des-586.pl
@@ -4,7 +4,7 @@
# Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
#
-push(@INC,"perlasm","../../perlasm");
+push(@INC,".","perlasm","../../perlasm");
require "x86asm.pl";
require "cbc.pl";
require "desboth.pl";

View File

@@ -0,0 +1,11 @@
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -186,7 +186,7 @@
# undef SGTTY
#endif
-#if defined(linux) && !defined(TERMIO)
+#if defined(linux) && !defined(TERMIO) && !defined(TERMIOS)
# undef TERMIOS
# define TERMIO
# undef SGTTY

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>chewi@gentoo.org</email>
<name>James Le Cuirot</name>
</maintainer>
<use>
<flag name="bindist">Disable/Restrict EC algorithms (as they seem to be patented) -- note: changes the ABI</flag>
<flag name="tls-compression">Enable support for discouraged TLS compression</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:openssl:openssl</remote-id>
<remote-id type="github">openssl/openssl</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,172 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# this ebuild is only for the libcrypto.so.0.9.8 and libssl.so.0.9.8 SONAME for ABI compat
EAPI="8"
inherit flag-o-matic toolchain-funcs multilib-minimal
#PLEVEL=$(printf "\\$(printf '%03o' $((${PV##*_p} + 96)))")
PLEVEL='h' # _p8 -> tr '[1-9]' '[a-i]' -> 'h'
MY_PV=${PV/_p*/${PLEVEL}}
MY_P=openssl-${MY_PV}
DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
HOMEPAGE="https://www.openssl.org/"
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="openssl"
SLOT="0.9.8"
KEYWORDS="~amd64 ~x86"
IUSE="bindist gmp kerberos cpu_flags_x86_sse2 test tls-compression"
RESTRICT="!bindist? ( bindist )
test"
RDEPEND="
gmp? ( >=dev-libs/gmp-5.1.3-r1[${MULTILIB_USEDEP}] )
tls-compression? ( virtual/zlib:=[${MULTILIB_USEDEP}] )
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
"
DEPEND="
${RDEPEND}
"
BDEPEND="
>=dev-lang/perl-5
test? (
sys-apps/diffutils
sys-devel/bc
)
"
# Do not install any docs
DOCS=()
PATCHES=(
"${FILESDIR}"/openssl-0.9.8e-bsd-sparc64.patch
"${FILESDIR}"/openssl-0.9.8h-ldflags.patch #181438
"${FILESDIR}"/openssl-0.9.8m-binutils.patch #289130
"${FILESDIR}"/openssl-0.9.8z_p8-perl-5.26.patch
"${FILESDIR}"/openssl-0.9.8z_p8-termios.patch
)
src_prepare() {
default
# disable fips in the build
# make sure the man pages are suffixed #302165
# don't bother building man pages if they're disabled
sed -i \
-e '/DIRS/s: fips : :g' \
-e '/^MANSUFFIX/s:=.*:=ssl:' \
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
-e $(has noman FEATURES \
&& echo '/^install:/s:install_docs::' \
|| echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
Makefile{,.org} \
|| die
# show the actual commands in the log
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared || die
# update the enginedir path.
# punt broken config we don't care about as it fails sanity check.
# force TERMIOS because glibc no longer has TERMIO.
sed -i \
-e '/^"debug-ben-debug-64"/d' \
-e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
-e 's/-DTERMIO\b/-DTERMIOS/g' \
Configure || die
# since we're forcing $(CC) as makedep anyway, just fix
# the conditional as always-on
# helps clang (#417795), and versioned gcc (#499818)
sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || 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 (#417795 again)
[[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
# allow openssl to be cross-compiled
cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
chmod a+rx gentoo.config || die
append-flags -fno-strict-aliasing
append-flags -Wa,--noexecstack
sed -i '1s,^:$,#!/usr/bin/perl,' Configure || die #141906
sed -i '/^"debug-bodo/d' Configure || die # 0.9.8za shipped broken
./config --test-sanity || die "I AM NOT SANE"
multilib_copy_sources
}
multilib_src_configure() {
unset APPS #197996
unset SCRIPTS #312551
tc-export CC AR RANLIB
# Clean out patent-or-otherwise-encumbered code
# Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher)
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
# RC5: 5,724,428 03/03/2015 https://en.wikipedia.org/wiki/RC5
use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
echoit() { echo "$@" ; "$@" ; }
local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
local sslout=$(./gentoo.config)
einfo "Use configuration ${sslout:-(openssl knows best)}"
local config="Configure"
[[ -z ${sslout} ]] && config="config"
echoit \
./${config} \
${sslout} \
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
enable-camellia \
$(use_ssl !bindist ec) \
enable-idea \
enable-mdc2 \
$(use_ssl !bindist rc5) \
enable-tlsext \
$(use_ssl gmp gmp -lgmp) \
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
$(use_ssl tls-compression zlib) \
--prefix=/usr \
--openssldir=/etc/ssl \
shared threads \
|| die "Configure failed"
# Clean out hardcoded flags that openssl uses
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
-e 's:^CFLAG=::' \
-e 's:-fomit-frame-pointer ::g' \
-e 's:-O[0-9] ::g' \
-e 's:-march=[-a-z0-9]* ::g' \
-e 's:-mcpu=[-a-z0-9]* ::g' \
-e 's:-m[a-z0-9]* ::g' \
)
sed -i \
-e "/^LIBDIR=/s|=.*|=$(get_libdir)|" \
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
Makefile || die
}
multilib_src_compile() {
# depend is needed to use $confopts
emake -j1 depend
emake -j1 build_libs
}
multilib_src_test() {
emake -j1 test
}
multilib_src_install() {
dolib.so lib{crypto,ssl}.so.0.9.8
}