diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-09-18 10:17:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-09-18 10:17:32 +0000 |
commit | a2337a386cd94feca961af7f196e6a07d64b8bb1 (patch) | |
tree | 85c7170d83a04080aee8743e02390ca8465e0d37 /dev-libs/openssl | |
parent | Change for bug #141182 (diff) | |
download | historical-a2337a386cd94feca961af7f196e6a07d64b8bb1.tar.gz historical-a2337a386cd94feca961af7f196e6a07d64b8bb1.tar.bz2 historical-a2337a386cd94feca961af7f196e6a07d64b8bb1.zip |
Force people to re-emerge openssl on i686 so that they get the optimized version. You will probably have to re-emerge openssh/etc... if you experience troubles. Openssl sucks sometimes.
Package-Manager: portage-2.1.1
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r-- | dev-libs/openssl/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/openssl/files/digest-openssl-0.9.8c-r2 | 3 | ||||
-rwxr-xr-x | dev-libs/openssl/files/gentoo.config-0.9.8 | 7 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-0.9.8c-r2.ebuild | 179 |
4 files changed, 194 insertions, 5 deletions
diff --git a/dev-libs/openssl/ChangeLog b/dev-libs/openssl/ChangeLog index a24709e65564..5fb044308ce8 100644 --- a/dev-libs/openssl/ChangeLog +++ b/dev-libs/openssl/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/openssl # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.193 2006/09/18 09:39:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.194 2006/09/18 10:17:32 vapier Exp $ + +*openssl-0.9.8c-r2 (18 Sep 2006) + + 18 Sep 2006; Mike Frysinger <vapier@gentoo.org> files/gentoo.config-0.9.8, + -openssl-0.9.8c-r1.ebuild, +openssl-0.9.8c-r2.ebuild: + Force people to re-emerge openssl on i686 so that they get the optimized + version. You will probably have to re-emerge openssh/etc... if you + experience troubles. Openssl sucks sometimes. *openssl-0.9.8c-r1 (16 Sep 2006) diff --git a/dev-libs/openssl/files/digest-openssl-0.9.8c-r2 b/dev-libs/openssl/files/digest-openssl-0.9.8c-r2 new file mode 100644 index 000000000000..95a35c845cc7 --- /dev/null +++ b/dev-libs/openssl/files/digest-openssl-0.9.8c-r2 @@ -0,0 +1,3 @@ +MD5 78454bec556bcb4c45129428a766c886 openssl-0.9.8c.tar.gz 3313857 +RMD160 718e487a7c874fbc79081cbbee4ec5fdc3387aa6 openssl-0.9.8c.tar.gz 3313857 +SHA256 896f7830c1921688f22c6fe4fb3d7b75189cefdd79acca5fb0cad2b599139048 openssl-0.9.8c.tar.gz 3313857 diff --git a/dev-libs/openssl/files/gentoo.config-0.9.8 b/dev-libs/openssl/files/gentoo.config-0.9.8 index d02e02ee740c..d98eb28e2b22 100755 --- a/dev-libs/openssl/files/gentoo.config-0.9.8 +++ b/dev-libs/openssl/files/gentoo.config-0.9.8 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/files/gentoo.config-0.9.8,v 1.12 2006/09/18 09:48:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/files/gentoo.config-0.9.8,v 1.13 2006/09/18 10:17:32 vapier Exp $ # # Openssl doesn't play along nicely with cross-compiling # like autotools based projects, so let's teach it new tricks. @@ -17,7 +17,7 @@ if [[ $1 == "test" ]] ; then "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-generic32" \ + "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" \ @@ -72,8 +72,7 @@ linux) arm*) machine="generic32 -DL_ENDIAN";; # hppa64*) machine=parisc64;; hppa*) machine=parisc;; - i[0-5]86*) machine=elf;; - i[6-9]86*) machine=generic32;; + i[0-9]86*) machine=elf;; ia64*) machine=ia64;; m68*) machine="generic32 -DB_ENDIAN";; mips*el*) machine="generic32 -DL_ENDIAN";; diff --git a/dev-libs/openssl/openssl-0.9.8c-r2.ebuild b/dev-libs/openssl/openssl-0.9.8c-r2.ebuild new file mode 100644 index 000000000000..27fad13eaa4d --- /dev/null +++ b/dev-libs/openssl/openssl-0.9.8c-r2.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8c-r2.ebuild,v 1.1 2006/09/18 10:17:32 vapier Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +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" +KEYWORDS="-* alpha amd64 ~arm ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc x86" +IUSE="bindist emacs sse2 test zlib" + +RDEPEND="" +DEPEND="${RDEPEND} + sys-apps/diffutils + >=dev-lang/perl-5 + test? ( sys-devel/bc )" +PDEPEND="app-misc/ca-certificates" + +src_unpack() { + unpack ${A} + + cd "${S}" + + epatch "${FILESDIR}"/${PN}-0.9.8-ppc64.patch + epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch + epatch "${FILESDIR}"/${PN}-0.9.8-hppa-fix-detection.patch + epatch "${FILESDIR}"/${PN}-0.9.7-alpha-default-gcc.patch + epatch "${FILESDIR}"/${PN}-0.9.8b-parallel-build.patch + epatch "${FILESDIR}"/${PN}-0.9.8-make-engines-dir.patch + epatch "${FILESDIR}"/${PN}-0.9.8-toolchain.patch + epatch "${FILESDIR}"/${PN}-0.9.8b-doc-updates.patch + + # 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 + + # Don't build manpages if we don't want them + has noman FEATURES \ + && sed -i '/^install:/s:install_docs::' Makefile.org \ + || sed -i '/^MANDIR=/s:=.*:=/usr/share/man:' Makefile.org + + # Try to derice users + [[ $(gcc-major-version) == "3" ]] \ + && filter-flags -fprefetch-loop-arrays -freduce-all-givs -funroll-loops + [[ $(tc-arch) == ppc* ]] && append-flags -fno-strict-aliasing + append-flags -Wa,--noexecstack + + # using a library directory other than lib requires some magic + sed -i \ + -e "s+\(\$(INSTALL_PREFIX)\$(INSTALLTOP)\)/lib+\1/$(get_libdir)+g" \ + -e "s+libdir=\$\${exec_prefix}/lib+libdir=\$\${exec_prefix}/$(get_libdir)+g" \ + Makefile.org engines/Makefile \ + || die "sed failed" + ./config --test-sanity || die "I AM NOT SANE" +} + +src_compile() { + tc-export CC AR RANLIB + + # Clean out patent-or-otherwise-encumbered code + # MDC-2: 4,908,861 13/03/2007 + # IDEA: 5,214,703 25/05/2010 + # RC5: 5,724,428 03/03/2015 + # EC: ????????? ??/??/2015 + local confopts="" + if use bindist ; then + confopts="no-idea no-rc5 no-mdc2 no-ec" + else + confopts="enable-idea enable-rc5 enable-mdc2 enable-ec" + fi + use zlib && confopts="${confopts} zlib-dynamic" + use sse2 || confopts="${confopts} no-sse2" + + local sslout=$(./gentoo.config) + einfo "Use configuration ${sslout:-(openssl knows best)}" + local config="Configure" + [[ -z ${sslout} ]] && config="config" + ./${config} \ + ${sslout} \ + ${confopts} \ + --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 "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" Makefile || die + + # depend is needed to use $confopts + # rehash is needed to prep the certs/ dir + emake -j1 depend || die "depend failed" + emake all rehash || die "make all failed" + + # force until we get all the gentoo.config kinks worked out + if has test ${FEATURES} && ! tc-is-cross-compiler ; then + src_test + fi +} + +src_test() { + # make sure sandbox doesnt die on *BSD + addpredict /dev/crypto + + make test || die "make test failed" +} + +src_install() { + make INSTALL_PREFIX="${D}" install || die + dodoc CHANGES* FAQ NEWS README doc/*.txt + dohtml doc/* + + if use emacs ; then + insinto /usr/share/emacs/site-lisp + doins doc/c-indentation.el + fi + + # create the certs directory + dodir /etc/ssl/certs + cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs" + rm -r "${D}"/etc/ssl/certs/{demo,expired} + + # Namespace openssl programs to prevent conflicts with other man pages + cd "${D}"/usr/share/man + local m d s + for m in $(find . -type f -printf '%P ' | xargs grep -L '#include') ; do + d=${m%/*} ; m=${m##*/} + mv ${d}/{,ssl-}${m} + ln -s ssl-${m} ${d}/openssl-${m} + # locate any symlinks that point to this man page + for s in $(find ${d} -lname ${m}) ; do + s=${s##*/} + rm -f ${d}/${s} + ln -s ssl-${m} ${d}/ssl-${s} + ln -s ssl-${s} ${d}/openssl-${s} + done + done + + diropts -m0700 + keepdir /etc/ssl/private +} + +pkg_preinst() { + if [[ -e ${ROOT}/usr/$(get_libdir)/libcrypto.so.0.9.7 ]] ; then + cp -pPR "${ROOT}"/usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.7 "${IMAGE}"/usr/$(get_libdir)/ + fi +} + +pkg_postinst() { + if [[ -e ${ROOT}/usr/$(get_libdir)/libcrypto.so.0.9.7 ]] ; then + ewarn "You must re-compile all packages that are linked against" + ewarn "OpenSSL 0.9.7 by using revdep-rebuild from gentoolkit:" + ewarn "# revdep-rebuild --library libssl.so.0.9.7" + ewarn "# revdep-rebuild --library libcrypto.so.0.9.7" + ewarn "After this, you can delete /usr/$(get_libdir)/libssl.so.0.9.7" + ewarn "and /usr/$(get_libdir)/libcrypto.so.0.9.7" + fi + + if [[ ${CHOST} == i686* ]] ; then + ewarn "Due to the way openssl is architected, you cannot" + ewarn "switch between optimized versions without breaking" + ewarn "ABI. The default i686 0.9.8 ABI was an unoptimized" + ewarn "version with horrible performance. This version uses" + ewarn "the optimized ABI. If you experience segfaults when" + ewarn "using ssl apps (like openssh), just re-emerge the" + ewarn "offending package." + fi +} |