Permalink
Browse files

FL-396: add missing openssl-0.9.8 ebuilds

  • Loading branch information...
1 parent 76a479c commit 0d876f5a350a8fefc16bea5436a7b64652f58bbd @angryvincent angryvincent committed Feb 9, 2013
Showing with 282 additions and 0 deletions.
  1. +2 −0 dev-libs/openssl/Manifest
  2. +139 −0 dev-libs/openssl/openssl-0.9.8x.ebuild
  3. +141 −0 dev-libs/openssl/openssl-0.9.8y.ebuild
@@ -1,3 +1,5 @@
+DIST openssl-0.9.8x.tar.gz 3782486 SHA256 7ce0c7f2c451070b4497ea7ca6f23eba6cef1a56db2e86e433f65926a7bc7497 SHA512 195ba38e5a3ecb9ea65ed1c0dfd7a7c7c8d25683cb401a4c68880a58b0dc3f3002186381ab1ddac64cc441ecd86606aa14bb91ecfc0c56b31ba85015589afdb2 WHIRLPOOL c54f046600443e16dcb41ef1bbb8a803f701f3af4b2a2011419fb1528838f412dc003155a3fbf5e0d15c64c64c3368e628e145cfc90671a0c2b333ac3a4c2ff9
+DIST openssl-0.9.8y.tar.gz 3785001 SHA256 bbecf13495e612936e3a9860c29c0701413564b7a964bf771a3575eaa867cee3 SHA512 cdc05067343d6b06a0d0278e90abcea9bf58439c98279ce0ce22673bf6f4a6597babcb276635c3b15cf04ec76cf53320236f5b6bbc46544a61280825f5b7b3cc WHIRLPOOL c8c9cb00f303c2d95a1d2000c74bb146fb069da9471093bf7a2c00db2a5955c2d63908b3314eb9cd12ea1e80c3bac143d3774bc27515f2ab03c5ef4d88b61612
DIST openssl-1.0.0h.tar.gz 4048067 SHA256 7e3dfc21aa57ed33ea673170053d1921322803b8a6a624a4f0d2e4c308bd418d SHA512 6a1129fa4c90ed67cdeec5578f72ee74ceb983877bbbac41b6ace4abcf4154d6b8217d11951296a1fdfade82c7b9e59e7994fca94e7eb78026b2980fec7be9c5 WHIRLPOOL edec087ef7bf3b6300c2b5870471eca793a0cba217f1ae728d808757749bdc1bdc193c21d86ecf9ba47ca4d0e6bebd1d6407654637226b6dece68b75b8295bc5
DIST openssl-1.0.0i.tar.gz 4047721 SHA256 548262d15777c504be1ab9bb8fabef1e14a3de54837a6593c8f403dd843d5e57 SHA512 b35d64c038f913fcec8cdec5f8a801425dd4bafb1472548a8c13cbce2245aabfc0ca416e166ac6063d59375817f6560390079156db41b98a83db44307ac0cecb WHIRLPOOL a0854284830ec7e7e2c4418423d089f91a0f81bc7313dd1d1791b20d4b78bfc7543834baad2e8817a3809eb8db10079ee1e84f40ef5003ff9330ad49adf142b8
DIST openssl-1.0.0j.tar.gz 4047852 SHA256 626fb8fcb3eb7e966edbe71553ff993d137f6e8a87b05051a3695e621098b8af SHA512 9796c75b4d5de57928708f5f0a8ca01aff5b4974b60006454657ed54c34998bc54d747af03860d319db7e7a57b0cd3c267758ffaac31be2be045c977d5fc33d4 WHIRLPOOL 239f051930d9562e7266edd69cf3a1060d381a95228fd17813dd2dbf469c2cf066786b277c2fd56973b830a6b43f28934f5f15d3b6dfac8f37a6e6a65fcae455
@@ -0,0 +1,139 @@
+# 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="2"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
+HOMEPAGE="http://www.openssl.org/"
+SRC_URI="mirror://openssl/source/${P}.tar.gz"
+
+LICENSE="openssl"
+SLOT="0.9.8"
+KEYWORDS="*"
+IUSE="bindist gmp kerberos sse2 test zlib"
+
+RDEPEND="gmp? ( dev-libs/gmp )
+ zlib? ( sys-libs/zlib )
+ kerberos? ( app-crypt/mit-krb5 )
+ !=dev-libs/openssl-0.9.8*:0"
+DEPEND="${RDEPEND}
+ sys-apps/diffutils
+ >=dev-lang/perl-5
+ test? ( sys-devel/bc )"
+
+pkg_setup() {
+ # avoid collisions with openssl-1 (preserve lib)
+ if ! has_version dev-libs/openssl:${SLOT} ; then
+ ewarn "Removing lib{crypto,ssl}.so.0.9.8 to avoid collision with openssl-1"
+ rm -f "${ROOT}"/usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
+ epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
+ epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
+
+ # 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
+ # update the enginedir path
+ sed -i \
+ -e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
+ Configure || die
+
+ # 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
+
+ append-flags -fno-strict-aliasing
+ append-flags -Wa,--noexecstack
+
+ sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
+ sed -i '/^"debug-steve/d' Configure # 0.9.8k shipped broken
+ ./config --test-sanity || die "I AM NOT SANE"
+}
+
+src_configure() {
+ unset APPS #197996
+ unset SCRIPTS #312551
+
+ tc-export CC AR RANLIB
+
+ # Clean out patent-or-otherwise-encumbered code
+ # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
+ # IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
+ # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
+ # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
+ # RC5: 5,724,428 03/03/2015 http://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 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 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
+}
+
+src_compile() {
+ # depend is needed to use $confopts
+ emake -j1 depend || die "depend failed"
+ emake -j1 build_libs || die "make build_libs failed"
+}
+
+src_test() {
+ emake -j1 test || die "make test failed"
+}
+
+src_install() {
+ dolib.so lib{crypto,ssl}.so.0.9.8 || die
+}
@@ -0,0 +1,141 @@
+# 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="2"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
+HOMEPAGE="http://www.openssl.org/"
+SRC_URI="mirror://openssl/source/${P}.tar.gz"
+
+LICENSE="openssl"
+SLOT="0.9.8"
+KEYWORDS="~*"
+IUSE="bindist gmp kerberos sse2 test zlib"
+
+RDEPEND="gmp? ( dev-libs/gmp )
+ zlib? ( sys-libs/zlib )
+ kerberos? ( app-crypt/mit-krb5 )
+ !=dev-libs/openssl-0.9.8*:0"
+DEPEND="${RDEPEND}
+ sys-apps/diffutils
+ >=dev-lang/perl-5
+ test? ( sys-devel/bc )"
+
+pkg_setup() {
+ # avoid collisions with openssl-1 (preserve lib)
+ if ! has_version dev-libs/openssl:${SLOT} ; then
+ ewarn "Removing lib{crypto,ssl}.so.0.9.8 to avoid collision with openssl-1"
+ rm -f "${ROOT}"/usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
+ epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
+ epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
+
+ # 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
+ # update the enginedir path.
+ # punt broken config we don't care about as it fails sanity check.
+ sed -i \
+ -e '/^"debug-ben-debug-64"/d' \
+ -e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
+ Configure || die
+
+ # 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
+
+ append-flags -fno-strict-aliasing
+ append-flags -Wa,--noexecstack
+
+ sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
+ sed -i '/^"debug-steve/d' Configure # 0.9.8k shipped broken
+ ./config --test-sanity || die "I AM NOT SANE"
+}
+
+src_configure() {
+ unset APPS #197996
+ unset SCRIPTS #312551
+
+ tc-export CC AR RANLIB
+
+ # Clean out patent-or-otherwise-encumbered code
+ # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
+ # IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
+ # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
+ # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
+ # RC5: 5,724,428 03/03/2015 http://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 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 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
+}
+
+src_compile() {
+ # depend is needed to use $confopts
+ emake -j1 depend || die "depend failed"
+ emake -j1 build_libs || die "make build_libs failed"
+}
+
+src_test() {
+ emake -j1 test || die "make test failed"
+}
+
+src_install() {
+ dolib.so lib{crypto,ssl}.so.0.9.8 || die
+}

0 comments on commit 0d876f5

Please sign in to comment.