From a2e01bb811085fcd8c5229e9580e64c4960ce1a2 Mon Sep 17 00:00:00 2001 From: geos_one Date: Fri, 20 Aug 2010 01:05:36 +0000 Subject: [PATCH] add dev libs git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/vmware@2307 6952d904-891a-0410-993b-d76249ca496b --- dev-libs/expat/Manifest | 2 + dev-libs/expat/expat-1.95.8.ebuild | 41 +++++ dev-libs/openssl/Manifest | 11 ++ dev-libs/openssl/files/alphacpuid.s | 125 +++++++++++++++ dev-libs/openssl/files/gentoo.config-0.9.7 | 145 ++++++++++++++++++ .../openssl/files/openssl-0.9.7e-gentoo.patch | 16 ++ .../files/openssl-0.9.8e-bsd-sparc64.patch | 25 +++ .../files/openssl-0.9.8h-ldflags.patch | 25 +++ .../files/openssl-0.9.8l-binutils.patch | 67 ++++++++ .../files/openssl-0.9.8m-binutils.patch | 24 +++ .../openssl-1.0.0a-fix-double-free.patch | 12 ++ .../files/openssl-1.0.0a-ldflags.patch | 23 +++ dev-libs/openssl/openssl-0.9.7m.ebuild | 138 +++++++++++++++++ 13 files changed, 654 insertions(+) create mode 100644 dev-libs/expat/Manifest create mode 100644 dev-libs/expat/expat-1.95.8.ebuild create mode 100644 dev-libs/openssl/Manifest create mode 100644 dev-libs/openssl/files/alphacpuid.s create mode 100755 dev-libs/openssl/files/gentoo.config-0.9.7 create mode 100644 dev-libs/openssl/files/openssl-0.9.7e-gentoo.patch create mode 100644 dev-libs/openssl/files/openssl-0.9.8e-bsd-sparc64.patch create mode 100644 dev-libs/openssl/files/openssl-0.9.8h-ldflags.patch create mode 100644 dev-libs/openssl/files/openssl-0.9.8l-binutils.patch create mode 100644 dev-libs/openssl/files/openssl-0.9.8m-binutils.patch create mode 100644 dev-libs/openssl/files/openssl-1.0.0a-fix-double-free.patch create mode 100644 dev-libs/openssl/files/openssl-1.0.0a-ldflags.patch create mode 100644 dev-libs/openssl/openssl-0.9.7m.ebuild diff --git a/dev-libs/expat/Manifest b/dev-libs/expat/Manifest new file mode 100644 index 0000000..206126f --- /dev/null +++ b/dev-libs/expat/Manifest @@ -0,0 +1,2 @@ +DIST expat-1.95.8.tar.gz 318349 RMD160 1b3e5a50a28e2c8efb79188d4c3071318fe1d0dd SHA1 73cb8fc326d04c44ae0e3b3f797f0e6ba9c4121f SHA256 c6aaa0b427e775a0fd5a956a75ae41e5110f22760723d9bda316100010e891ca +EBUILD expat-1.95.8.ebuild 1049 RMD160 397cbba1b95eb164634364e142b83646ed8ccefa SHA1 f1fae3c2cdf5f6be248e94f0e07ca322161c740c SHA256 9a8ef3fb474ec4c4de68266a9cd3dc6f6222a0917acf6cfc3380e63424479bcc diff --git a/dev-libs/expat/expat-1.95.8.ebuild b/dev-libs/expat/expat-1.95.8.ebuild new file mode 100644 index 0000000..a3433d1 --- /dev/null +++ b/dev-libs/expat/expat-1.95.8.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/expat/Attic/expat-1.95.8.ebuild,v 1.23 2009/03/21 22:48:49 eva dead $ + +inherit libtool multilib + +DESCRIPTION="XML parsing libraries" +HOMEPAGE="http://expat.sourceforge.net/" +SRC_URI="mirror://sourceforge/expat/${P}.tar.gz" + +LICENSE="as-is" +SLOT="1.95" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" +IUSE="test" + +DEPEND="test? ( >=dev-libs/check-0.8 )" +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + elibtoolize +} + +src_test() { + if ! use test && [[ -z $(best_version dev-libs/check) ]] ; then + ewarn "You dont have USE=test and dev-libs/check is not installed." + ewarn "src_test will be skipped." + return 0 + fi + make check || die "make check failed" +} + +src_install() { + dolib.so .libs/libexpat.so.0* || die +# einstall man1dir="${D}/usr/share/man/man1" || die "einstall failed" +# dosed /usr/$(get_libdir)/libexpat.la #81568 + dodoc Changes README + dohtml doc/* +} + diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest new file mode 100644 index 0000000..44f2f81 --- /dev/null +++ b/dev-libs/openssl/Manifest @@ -0,0 +1,11 @@ +AUX alphacpuid.s 1641 RMD160 d17ba2ec61e0a380e74f554ba58b9cf9c31805c8 SHA1 5fab001dbd6af763a809eff5f68e5e2430059b46 SHA256 f754956f7de5ffa07762ac4b574b29a5de016c181382c233d17ac8009b770be9 +AUX gentoo.config-0.9.8 4249 RMD160 a63c08a30dd294429c562b8e24bf2b13ba220f63 SHA1 737dbd27e39726c49e44f5e92e46bdf8a8ff9b4d SHA256 c14ff861759f4ebaeb57f37ae7df63af4dea1767eae07ef0eb42abd43cebc4a1 +AUX openssl-0.9.7e-gentoo.patch 460 RMD160 60969fd05a15fe00d0d1c27b9098acfde28ba65e SHA1 73ff3c336dfdbeed903ac7b82486674ab4ec66a2 SHA256 ddb8d47429f3aadf3f5142293a2c38cbb9eb3927edfd1b497771337c48a11641 +AUX openssl-0.9.8e-bsd-sparc64.patch 1484 RMD160 dd3d18caccd8167673a438cc83fa44f2e993949b SHA1 d07542663f934d5dc2f8f8b8985bde9b033aafdb SHA256 8a79f022a17a7fadb4eb708538b41a7a034e21ad84162beb1f7fa7cff5eb487e +AUX openssl-0.9.8h-ldflags.patch 1000 RMD160 1e87b16d841360d790f06d714ea5f0111e83ca97 SHA1 72e7ccca848425d7cfc3f58f4476fb8fda4ec2d1 SHA256 00179ad3dc3fecc9193658202d7bb5c81169bbb2be59e8a90201ed43eacec805 +AUX openssl-0.9.8l-binutils.patch 2655 RMD160 d801d719b4fc4a6818313c27def8e7a184f40b99 SHA1 f7aaae0d3a0163105d495661c3a48673655a3b82 SHA256 c81d8b70e7ccbe3e7ee2fc81a4658d058301d0129adcc380c24066aa42cb390c +AUX openssl-0.9.8m-binutils.patch 684 RMD160 78ee10d906423a77aff91aac2166bb5f58c386e6 SHA1 b7514556196a730541b0c99754b4ef79484e27fe SHA256 1e4475f7183ec237d129b686d4ca5265bf7eb34642e7d9e77cbe8ad9a97b4876 +AUX openssl-1.0.0a-fix-double-free.patch 252 RMD160 4cf11701c503eb28ce2cea834523b9ec3e38bd4a SHA1 4006be947a41f77c471504d4770dbf8b36b315b8 SHA256 a179daada4021897dc2759e9555b22f5dcb511c1d011bbab8106b35fd2332b96 +AUX openssl-1.0.0a-ldflags.patch 914 RMD160 1e057330b3fc84d7f799976c0ba5cce02f505f57 SHA1 9bada0fb576b4f78b046b77b77248b352e1953a6 SHA256 33f5d39e2b6464ed33654214a0148a6f6546fe319793ae04f54d2106422ddba1 +DIST openssl-0.9.7m.tar.gz 3303943 RMD160 fed13325d90ae4749d7ee858931d6925c3955614 SHA1 546f6bcebdf72a633bad087469d3741a42f7b383 SHA256 c98b9703887e2dda6217b91405d0d94883f7c67e205fc4d7a81bb690d2e10572 +EBUILD openssl-0.9.7m.ebuild 4482 RMD160 7971abd903936394207801b5a1401452792adce7 SHA1 0daddcd3faac4537efd0b600feb98ec5fb0f5213 SHA256 5a9d0ea0b5a419d38199aeac39c6d86cbee526b7cc291ac4b488cc47cfc909ba diff --git a/dev-libs/openssl/files/alphacpuid.s b/dev-libs/openssl/files/alphacpuid.s new file mode 100644 index 0000000..3fa77a0 --- /dev/null +++ b/dev-libs/openssl/files/alphacpuid.s @@ -0,0 +1,125 @@ +.text + +.set noat + +.globl OPENSSL_cpuid_setup +.ent OPENSSL_cpuid_setup +OPENSSL_cpuid_setup: + .frame $30,0,$26 + .prologue 0 + ret ($26) +.end OPENSSL_cpuid_setup + +.globl OPENSSL_wipe_cpu +.ent OPENSSL_wipe_cpu +OPENSSL_wipe_cpu: + .frame $30,0,$26 + .prologue 0 + clr $1 + clr $2 + clr $3 + clr $4 + clr $5 + clr $6 + clr $7 + clr $8 + clr $16 + clr $17 + clr $18 + clr $19 + clr $20 + clr $21 + clr $22 + clr $23 + clr $24 + clr $25 + clr $27 + clr $at + clr $29 + fclr $f0 + fclr $f1 + fclr $f10 + fclr $f11 + fclr $f12 + fclr $f13 + fclr $f14 + fclr $f15 + fclr $f16 + fclr $f17 + fclr $f18 + fclr $f19 + fclr $f20 + fclr $f21 + fclr $f22 + fclr $f23 + fclr $f24 + fclr $f25 + fclr $f26 + fclr $f27 + fclr $f28 + fclr $f29 + fclr $f30 + mov $sp,$0 + ret ($26) +.end OPENSSL_wipe_cpu + +.globl OPENSSL_atomic_add +.ent OPENSSL_atomic_add +OPENSSL_atomic_add: + .frame $30,0,$26 + .prologue 0 +1: ldl_l $0,($16) + addl $0,$17,$1 + stl_c $1,($16) + beq $1,1b + addl $0,$17,$0 + ret ($26) +.end OPENSSL_atomic_add + +.globl OPENSSL_rdtsc +.ent OPENSSL_rdtsc +OPENSSL_rdtsc: + .frame $30,0,$26 + .prologue 0 + rpcc $0 + ret ($26) +.end OPENSSL_rdtsc + +.globl OPENSSL_cleanse +.ent OPENSSL_cleanse +OPENSSL_cleanse: + .frame $30,0,$26 + .prologue 0 + beq $17,.Ldone + and $16,7,$0 + bic $17,7,$at + beq $at,.Little + beq $0,.Laligned + +.Little: + ldq_u $1,0($16) + mov $16,$2 +.Lalign: + mskbl $1,$16,$1 + lda $16,1($16) + subq $17,1,$17 + subq $0,1,$0 + beq $17,.Lout + bne $0,.Lalign +.Lout: stq_u $1,0($2) + beq $17,.Ldone + bic $17,7,$at + mov $17,$0 + beq $at,.Little + +.Laligned: + stq $31,0($16) + subq $17,8,$17 + lda $16,8($16) + bic $17,7,$at + bne $at,.Laligned + beq $17,.Ldone + mov $17,$0 + br .Little +.Ldone: ret ($26) +.end OPENSSL_cleanse diff --git a/dev-libs/openssl/files/gentoo.config-0.9.7 b/dev-libs/openssl/files/gentoo.config-0.9.7 new file mode 100755 index 0000000..b096d34 --- /dev/null +++ b/dev-libs/openssl/files/gentoo.config-0.9.7 @@ -0,0 +1,145 @@ +#!/usr/bin/env bash +# Copyright 1999-2009 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.17 2009/06/21 11:40:34 grobian Exp $ +# +# 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} diff --git a/dev-libs/openssl/files/openssl-0.9.7e-gentoo.patch b/dev-libs/openssl/files/openssl-0.9.7e-gentoo.patch new file mode 100644 index 0000000..b3753d2 --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.7e-gentoo.patch @@ -0,0 +1,16 @@ +diff -r -c -C 2 openssl-0.9.6g-orig/test/Makefile openssl-0.9.6g/test/Makefile +*** openssl-0.9.6g-orig/test/Makefile Thu Sep 26 15:20:47 2002 +--- openssl-0.9.6g/test/Makefile Thu Sep 26 15:23:26 2002 +*************** +*** 28,32 **** + DLIBCRYPTO= ../libcrypto.a + DLIBSSL= ../libssl.a +! LIBCRYPTO= -L.. -lcrypto + LIBSSL= -L.. -lssl + +--- 28,32 ---- + DLIBCRYPTO= ../libcrypto.a + DLIBSSL= ../libssl.a +! LIBCRYPTO= -L.. -lcrypto -lcrypt + LIBSSL= -L.. -lssl + diff --git a/dev-libs/openssl/files/openssl-0.9.8e-bsd-sparc64.patch b/dev-libs/openssl/files/openssl-0.9.8e-bsd-sparc64.patch new file mode 100644 index 0000000..a798164 --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.8e-bsd-sparc64.patch @@ -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 diff --git a/dev-libs/openssl/files/openssl-0.9.8h-ldflags.patch b/dev-libs/openssl/files/openssl-0.9.8h-ldflags.patch new file mode 100644 index 0000000..462af70 --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.8h-ldflags.patch @@ -0,0 +1,25 @@ +http://bugs.gentoo.org/181438 + +make sure we respect LDFLAGS + +--- 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) -Wl,-rpath,$(LIBRPATH)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to diff --git a/dev-libs/openssl/files/openssl-0.9.8l-binutils.patch b/dev-libs/openssl/files/openssl-0.9.8l-binutils.patch new file mode 100644 index 0000000..d1bb775 --- /dev/null +++ b/dev-libs/openssl/files/openssl-0.9.8l-binutils.patch @@ -0,0 +1,67 @@ +fix from upstream for building with newer binutils + +http://bugs.gentoo.org/289130 + +Index: crypto/md5/asm/md5-x86_64.pl +=================================================================== +RCS file: /usr/local/src/openssl/CVSROOT/openssl/crypto/md5/asm/md5-x86_64.pl,v +retrieving revision 1.2.2.1 +retrieving revision 1.2.2.2 +diff -u -p -r1.2.2.1 -r1.2.2.2 +--- openssl/crypto/md5/asm/md5-x86_64.pl 11 Nov 2007 13:34:06 -0000 1.2.2.1 ++++ openssl/crypto/md5/asm/md5-x86_64.pl 13 Nov 2009 14:14:46 -0000 1.2.2.2 +@@ -19,6 +19,7 @@ my $code; + sub round1_step + { + my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; ++ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal + $code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1); + $code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1); + $code .= <session->sess_cert->peer_ecdh_tmp=ecdh; + ecdh=NULL; + BN_CTX_free(bn_ctx); ++ bn_ctx = NULL; + EC_POINT_free(srvr_ecpoint); + srvr_ecpoint = NULL; + } diff --git a/dev-libs/openssl/files/openssl-1.0.0a-ldflags.patch b/dev-libs/openssl/files/openssl-1.0.0a-ldflags.patch new file mode 100644 index 0000000..290cdf9 --- /dev/null +++ b/dev-libs/openssl/files/openssl-1.0.0a-ldflags.patch @@ -0,0 +1,23 @@ +http://bugs.gentoo.org/327421 + +--- Makefile.org ++++ Makefile.org +@@ -189,6 +189,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)' \ + ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \ +--- Makefile.shared ++++ 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) -Wl,-rpath,$(LIBRPATH)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to diff --git a/dev-libs/openssl/openssl-0.9.7m.ebuild b/dev-libs/openssl/openssl-0.9.7m.ebuild new file mode 100644 index 0000000..130c799 --- /dev/null +++ b/dev-libs/openssl/openssl-0.9.7m.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.7o-r2.ebuild,v 1.1 2010/08/14 05:53:33 vapier Exp $ + +# this ebuild is only for the libcrypto.so.0.9.7 and libssl.so.0.9.7 SONAME for ABI compat + +EAPI=1 +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.9.7" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +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.7*:0" +DEPEND="${RDEPEND} + sys-apps/diffutils + >=dev-lang/perl-5 + test? ( sys-devel/bc )" + +pkg_setup() { + [[ -e ${ROOT}/usr/$(get_libdir)/libcrypto.so.0.9.7 ]] && \ + rm -f "${ROOT}"/usr/$(get_libdir)/libcrypto.so.0.9.7 + [[ -e ${ROOT}/usr/$(get_libdir)/libssl.so.0.9.7 ]] && \ + rm -f "${ROOT}"/usr/$(get_libdir)/libssl.so.0.9.7 +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch + 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 + epatch "${FILESDIR}"/${PN}-1.0.0a-fix-double-free.patch #332027 + + # 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 + + # allow openssl to be cross-compiled + cp "${FILESDIR}"/gentoo.config-0.9.7 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.7k shipped broken + ./config --test-sanity || die "I AM NOT SANE" +} + +src_compile() { + 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: 5,214,703 25/05/2010 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) \ + $(use_ssl !bindist 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 + + # 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.7 || die +}