diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-09 06:38:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-09 06:38:59 +0000 |
commit | 461c90feaec7cf41d6584e5e5e79c4063fe0ef67 (patch) | |
tree | 343202035ac12cb8ebc5b06fb6334bbc4c26623b /dev-libs/openssl | |
parent | Stable on PPC (diff) | |
download | historical-461c90feaec7cf41d6584e5e5e79c4063fe0ef67.tar.gz historical-461c90feaec7cf41d6584e5e5e79c4063fe0ef67.tar.bz2 historical-461c90feaec7cf41d6584e5e5e79c4063fe0ef67.zip |
Add cross-compiling support #85344.
Package-Manager: portage-2.0.51.21-r1
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r-- | dev-libs/openssl/ChangeLog | 6 | ||||
-rw-r--r-- | dev-libs/openssl/Manifest | 35 | ||||
-rw-r--r-- | dev-libs/openssl/files/digest-openssl-0.9.7g | 1 | ||||
-rwxr-xr-x | dev-libs/openssl/files/gentoo.config-0.9.7g | 48 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-0.9.7g.ebuild | 192 |
5 files changed, 108 insertions, 174 deletions
diff --git a/dev-libs/openssl/ChangeLog b/dev-libs/openssl/ChangeLog index a6db9bd03973..df9d8665b454 100644 --- a/dev-libs/openssl/ChangeLog +++ b/dev-libs/openssl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/openssl # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.112 2005/05/02 17:54:37 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.113 2005/05/09 06:38:59 vapier Exp $ + + 09 May 2005; Mike Frysinger <vapier@gentoo.org> + +files/gentoo.config-0.9.7g, openssl-0.9.7g.ebuild: + Add cross-compiling support #85344. 02 May 2005; Gustavo Zacarias <gustavoz@gentoo.org> openssl-0.9.7e-r1.ebuild: diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest index 20534b5b1d61..012f0b3457b7 100644 --- a/dev-libs/openssl/Manifest +++ b/dev-libs/openssl/Manifest @@ -1,37 +1,28 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 76098aaca77428e0d43a1f02c530b8c9 ChangeLog 17935 +MD5 50049b34a65204f5ad2f2a18e85386a5 ChangeLog 18076 MD5 37236013e0d26d43c6bff35a8a48e8ec metadata.xml 220 -MD5 2d5363922c0d09819338042c472ec25f openssl-0.9.6m.ebuild 3084 -MD5 e98d01c1e168506fb7f46cb15996ad93 openssl-0.9.7c-r1.ebuild 7017 -MD5 5858d35d3afdeed5a59da6023f826361 openssl-0.9.7g.ebuild 8002 -MD5 936dd2c6494a872a9c74b5403ef2f9a7 openssl-0.9.7d-r2.ebuild 8957 +MD5 685c33f8a3f1980105944ab3c23a346c openssl-0.9.6m.ebuild 3074 +MD5 e59c3cc3221269d3ae08609d821b6b21 openssl-0.9.7c-r1.ebuild 7019 MD5 e66229368631edc108b736b76936b550 openssl-0.9.7e-r1.ebuild 8336 -MD5 b8c2066bf10c5b9dd4d6e1f7d107dcc6 openssl-0.9.7e.ebuild 7842 +MD5 9f3507124b9baf7639163fc5f7fffeff openssl-0.9.7g.ebuild 4885 +MD5 9cb8d8cba8c65d3b422a780141041867 openssl-0.9.7d-r2.ebuild 8960 +MD5 8a6bfea1784fd62ac3a143586b24fd59 openssl-0.9.7e.ebuild 7844 MD5 744b358cd3b68b2ca6561c214c541fc0 files/addppc64support.diff 1327 MD5 2e6ed24d513a8f2b1b6f03709ab5ba18 files/digest-openssl-0.9.6m 67 -MD5 0aa01ae58a76e073bf077ef364c37938 files/digest-openssl-0.9.7g 134 +MD5 1a7aabb860415c7be612863579d67b4d files/digest-openssl-0.9.7g 67 MD5 f8b9ae9e3ed08f964620aa832aec4d0c files/digest-openssl-0.9.7c-r1 134 -MD5 90fac5947e771433132723442dc90ab0 files/openssl-0.9.7g-no-fips.patch 333 +MD5 4e6c2cbbc1ff9e36ff6d83b6c5356b7c files/openssl-0.9.7-hppa-fix-detection.patch 1718 MD5 897d293325315cdeeb390745ed5cdd1b files/digest-openssl-0.9.7d-r2 134 +MD5 acab4ad88a6c249a7cde0511a0961a2c files/digest-openssl-0.9.7e 134 MD5 b901850df9952252974316e78775673b files/openssl-0.9.6-mips.diff 1487 MD5 cebd09d1819c07b0fab14ad90b0da884 files/openssl-0.9.6m-gentoo.diff 1591 +MD5 f8ff492f66404c732e4661cc4443a2e8 files/openssl-0.9.7-alpha-default-gcc.patch 533 +MD5 bef2724dccc11edf27916526d9c08576 files/openssl-0.9.7-arm-big-endian.patch 1074 MD5 7483d6f0412e857e9063dce4aecf2991 files/openssl-0.9.7c-gentoo.diff 936 MD5 f804ea4df3b388d22451cde6e9458f2b files/openssl-0.9.7c-tempfile.patch 2178 MD5 7483d6f0412e857e9063dce4aecf2991 files/openssl-0.9.7d-gentoo.diff 936 MD5 91854bcd6c83f040927d490b104bb5a0 files/openssl-0.9.7d-smime.patch 641 -MD5 acab4ad88a6c249a7cde0511a0961a2c files/digest-openssl-0.9.7e 134 -MD5 f8ff492f66404c732e4661cc4443a2e8 files/openssl-0.9.7-alpha-default-gcc.patch 533 -MD5 bef2724dccc11edf27916526d9c08576 files/openssl-0.9.7-arm-big-endian.patch 1074 -MD5 4e6c2cbbc1ff9e36ff6d83b6c5356b7c files/openssl-0.9.7-hppa-fix-detection.patch 1718 MD5 f886f4a6a62eb4ec7bc718952d76900d files/openssl-0.9.7e-gentoo.patch 460 MD5 acab4ad88a6c249a7cde0511a0961a2c files/digest-openssl-0.9.7e-r1 134 MD5 53599279769faf50e5247b68d2907b10 files/openssl-0.9.7e-no-fips.patch 1344 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux) - -iD8DBQFCdmlyKRy60XGEcJIRAk2KAJ9R+rS4HiI3XPj8XaprcN8zqzkAnACeIzNZ -HNqXtFrMTqRQqPb2da+B2tk= -=/fcm ------END PGP SIGNATURE----- +MD5 90fac5947e771433132723442dc90ab0 files/openssl-0.9.7g-no-fips.patch 333 +MD5 cccc21f217f5222053228e88605a1869 files/gentoo.config-0.9.7g 1415 diff --git a/dev-libs/openssl/files/digest-openssl-0.9.7g b/dev-libs/openssl/files/digest-openssl-0.9.7g index e0a96520a0b0..d232b1fa0076 100644 --- a/dev-libs/openssl/files/digest-openssl-0.9.7g +++ b/dev-libs/openssl/files/digest-openssl-0.9.7g @@ -1,2 +1 @@ MD5 991615f73338a571b6a1be7d74906934 openssl-0.9.7g.tar.gz 3132217 -MD5 1b63bfdca1c37837dddde9f1623498f9 openssl-0.9.6m.tar.gz 2184918 diff --git a/dev-libs/openssl/files/gentoo.config-0.9.7g b/dev-libs/openssl/files/gentoo.config-0.9.7g new file mode 100755 index 000000000000..3d6f75bc1e30 --- /dev/null +++ b/dev-libs/openssl/files/gentoo.config-0.9.7g @@ -0,0 +1,48 @@ +#!/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.7g,v 1.1 2005/05/09 06:38:59 vapier 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. + + +system="linux" +#case ${CHOST##*-} +# uclibc*) system="linux" +# gnu*) system="linux" +#esac + +machine="" +case ${CHOST%%-*} in + alphaev56*) machine=alpha+bwx;; + alphaev[67]*) machine=alpha+bwx;; + alpha*) machine=alpha;; + arm*eb*) machine="elf-arm -DB_ENDIAN";; + arm*) machine="elf-arm -DL_ENDIAN";; +# hppa64*) machine=parisc64;; + hppa*) machine=parisc;; + i[0-5]86*) machine=elf;; + i[6-9]86*) machine=pentium;; + ia64*) machine=ia64;; + m68*) machine=m68k;; + mips*el*) machine=mipsel;; + mips*) machine=mips;; + powerpc64*) machine=ppc64;; + powerpc*) machine=ppc;; + sh64*) machine=elf;; + sh*) machine=elf;; + sparc*v7*) machine=sparcv7;; + sparc64*) machine=sparcv9;; + sparc*) machine=sparcv8;; + s390x*) machine=s390x;; + s390*) machine=s390;; + x86_64*) machine=x86_64;; +esac + +if [ -n "${machine}" ] ; then + echo ${system}-${machine} +fi diff --git a/dev-libs/openssl/openssl-0.9.7g.ebuild b/dev-libs/openssl/openssl-0.9.7g.ebuild index 3456b38db815..a5e6edad9e99 100644 --- a/dev-libs/openssl/openssl-0.9.7g.ebuild +++ b/dev-libs/openssl/openssl-0.9.7g.ebuild @@ -1,17 +1,14 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.7g.ebuild,v 1.1 2005/05/01 06:35:23 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.7g.ebuild,v 1.2 2005/05/09 06:38:59 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs -OLD_096_P="${PN}-0.9.6m" - DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1" HOMEPAGE="http://www.openssl.org/" -SRC_URI="mirror://openssl/source/${P}.tar.gz - mirror://openssl/source/${OLD_096_P}.tar.gz" +SRC_URI="mirror://openssl/source/${P}.tar.gz" -LICENSE="as-is" +LICENSE="openssl" SLOT="0" KEYWORDS="-*" # seems to cause segfaults with openssh ... IUSE="emacs test bindist" @@ -20,20 +17,21 @@ RDEPEND="" DEPEND="${RDEPEND} sys-apps/diffutils >=dev-lang/perl-5 - !test? ( sys-devel/bc )" - -S=${WORKDIR} + test? ( sys-devel/bc )" src_unpack() { unpack ${A} - # openssl-0.9.7 - cd ${WORKDIR}/${P} + cd "${S}" - epatch ${FILESDIR}/${PN}-0.9.7e-gentoo.patch - epatch ${FILESDIR}/${PN}-0.9.7-hppa-fix-detection.patch - epatch ${FILESDIR}/${PN}-0.9.7-alpha-default-gcc.patch - epatch ${FILESDIR}/${PN}-0.9.7g-no-fips.patch + epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch + epatch "${FILESDIR}"/${PN}-0.9.7-hppa-fix-detection.patch + epatch "${FILESDIR}"/${PN}-0.9.7-alpha-default-gcc.patch + epatch "${FILESDIR}"/${PN}-0.9.7g-no-fips.patch + + # allow openssl to be cross-compiled + cp "${FILESDIR}"/gentoo.config-0.9.7g gentoo.config || die "cp cross-compile failed" + chmod a+rx gentoo.config case $(gcc-version) in 3.2) @@ -76,141 +74,41 @@ src_unpack() { || die "sed failed" ./config --test-sanity || die "sanity failed" fi - - # openssl-0.9.6 - test -f ${ROOT}/usr/lib/libssl.so.0.9.6 && { - cd ${WORKDIR}/${OLD_096_P} - - epatch ${FILESDIR}/${OLD_096_P}-gentoo.diff - - case ${ARCH} in - mips) - epatch ${FILESDIR}/openssl-0.9.6-mips.diff - ;; - arm) - # patch linker to add -ldl or things linking aginst libcrypto fail - sed -i -e \ - 's!^"linux-elf-arm"\(.*\)::BN\(.*\)!"linux-elf-arm"\1:-ldl:BN\2!' \ - Configure \ - || die "sed failed" - ;; - hppa) - # Tells to compile a static version of openssl - sed -i -e \ - 's!^"linux-parisc"\(.*\)::BN\(.*\)::!"linux-parisc"\1:-ldl:BN\2::::::::::dlfcn:linux-shared:-fPIC::.so.\\$(SHLIB_MAJOR).\\$(SHLIB_MINOR)!' \ - Configure \ - || die "sed failed" - # Fix detection of parisc running 64 bit kernel - sed -i -e 's/parisc-\*-linux2/parisc\*-\*-linux2/' config \ - || die "sed failed" - esac - - # replace CFLAGS - OLDIFS=$IFS - IFS=$'\n' - for a in $( grep -n -e "^\"linux-" Configure ); do - LINE=$( echo $a | awk -F: '{print $1}' ) - CUR_CFLAGS=$( echo $a | awk -F: '{print $3}' ) - NEW_CFLAGS="$( echo $CUR_CFLAGS | sed -r -e "s|-O[23]||" -e "s/-fomit-frame-pointer//" -e "s/-mcpu=[-a-z0-9]+//" -e "s/-m486//" ) $CFLAGS" - sed -i "${LINE}s/$CUR_CFLAGS/$NEW_CFLAGS/" Configure \ - || die "sed failed" - done - IFS=$OLDIFS - } } src_compile() { - # openssl-0.9.7 - cd ${WORKDIR}/${P} - # 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 - use bindist && conf_options="no-idea no-rc5 no-mdc2 -no-ec" - - # Build correctly for mips, mips64, & mipsel - if use mips; then - if [[ ${CHOST/mipsel} != ${CHOST} ]] ; then - mipsarch="linux-mipsel" - else - mipsarch="linux-mips" - fi - - ./Configure ${mipsarch} ${conf_options} --prefix=/usr --openssldir=/etc/ssl \ - shared threads || die - elif use ppc64; then - ./Configure linux-ppc64 ${conf_options} --prefix=/usr --openssldir=/etc/ssl \ - shared threads || die - # force sparcv8 on sparc32 profile - elif [ "$PROFILE_ARCH" = "sparc" ]; then - ./Configure linux-sparcv8 ${conf_options} --prefix=/usr --openssldir=/etc/ssl \ - shared threads || die - elif [ "${ABI}" = "sparc64" ]; then - ./Configure linux64-sparcv9 ${conf_options} --prefix=/usr --openssldir=/etc/ssl \ - shared threads || die - else - ./config ${conf_options} --prefix=/usr --openssldir=/etc/ssl shared threads \ - || die "config failed" - fi - - einfo "Compiling ${P}" - make CC="$(tc-getCC)" all || die "make all failed" - - # openssl-0.9.6 - test -f ${ROOT}/usr/lib/libssl.so.0.9.6 && { - cd ${WORKDIR}/${OLD_096_P} - - # force sparcv8 on sparc32 profile - if [ "$PROFILE_ARCH" = "sparc" ]; then - SSH_TARGET="linux-sparcv8" - elif [ "`uname -m`" = "parisc" -o "`uname -m`" = "parisc64" ]; then - SSH_TARGET="linux-parisc" - elif use mips; then - if [ "`echo ${CHOST} | grep "mipsel"`" ]; then - SSH_TARGET="linux-mipsel" - else - SSH_TARGET="linux-mips" - fi - fi - - case ${CHOST} in - alphaev56*|alphaev6*) - SSH_TARGET="linux-alpha+bwx-${CC:-gcc}" - ;; - alpha*) - SSH_TARGET="linux-alpha-${CC:-gcc}" ;; - esac - - if [ ${SSH_TARGET} ]; then - einfo "Forcing ${SSH_TARGET} compile" - ./Configure ${SSH_TARGET} --prefix=/usr \ - --openssldir=/etc/ssl shared threads || die - else - ./config --prefix=/usr --openssldir=/etc/ssl shared threads || die - fi - - einfo "Compiling ${OLD_096_P}" - make CC="$(tc-getCC)" all || die - } + local confopts="" + use bindist && confopts="no-idea no-rc5 no-mdc2 -no-ec" + + local sslout=$(./gentoo.config) + local config="Configure" + [[ -z ${sslout} ]] && config="config" + ./${config} \ + ${sslout} \ + ${confopts} \ + --prefix=/usr \ + --openssldir=/etc/ssl \ + shared threads \ + || die "Configure failed" + + make \ + CC="$(tc-getCC)" MAKEDEPPROG="$(tc-getCC)" \ + AR="$(tc-getAR) r" \ + RANLIB="$(tc-getRANLIB)" \ + all || die "make all failed" } src_test() { - cd ${WORKDIR}/${P} make test || die "make test failed" - - # openssl-0.9.6 - test -f ${ROOT}/usr/lib/libssl.so.0.9.6 && { - cd ${WORKDIR}/${OLD_096_P} - make all || die - } } src_install() { - # openssl-0.9.7 - cd ${WORKDIR}/${P} - make INSTALL_PREFIX=${D} MANDIR=/usr/share/man install || die + make INSTALL_PREFIX="${D}" MANDIR=/usr/share/man install || die dodoc CHANGES* FAQ NEWS README dodoc doc/*.txt dohtml doc/* @@ -225,7 +123,7 @@ src_install() { # to be the more FHS compliant setup... -raker insinto /etc/ssl/certs doins certs/*.pem - OPENSSL=${D}/usr/bin/openssl /usr/bin/perl tools/c_rehash ${D}/etc/ssl/certs + OPENSSL="${D}"/usr/bin/openssl /usr/bin/perl tools/c_rehash "${D}"/etc/ssl/certs # These man pages with other packages so rename them cd "${D}"/usr/share/man @@ -235,13 +133,6 @@ src_install() { ln -s ssl-${m} ${d}/openssl-${m} done - # openssl-0.9.6 - test -f ${ROOT}/usr/lib/libssl.so.0.9.6 && { - cd ${WORKDIR}/${OLD_096_P} - make || die - dolib.so ${WORKDIR}/${OLD_096_P}/libcrypto.so.0.9.6||die "libcrypto.so.0.9.6 not found" - dolib.so ${WORKDIR}/${OLD_096_P}/libssl.so.0.9.6|| die "libssl.so.0.9.6 not found" - } fperms a+x /usr/$(get_libdir)/pkgconfig #34088 } @@ -256,11 +147,12 @@ pkg_postinst() { rm -f "${BN_H}" fi - test -f ${ROOT}/usr/lib/libssl.so.0.9.6 && { - einfo "You can now re-compile all packages that are linked against" - einfo "OpenSSL 0.9.6 by using revdep-rebuild from gentoolkit:" - einfo "# revdep-rebuild --soname libssl.so.0.9.6" - einfo "# revdep-rebuild --soname libcrypto.so.0.9.6" - einfo "After this, you can delete /usr/lib/libssl.so.0.9.6 and /usr/lib/libcrypto.so.0.9.6" - } + if [[ -e ${ROOT}/usr/lib/libcrypto.so.0.9.6 ]] ; then + ewarn "You must re-compile all packages that are linked against" + ewarn "OpenSSL 0.9.6 by using revdep-rebuild from gentoolkit:" + ewarn "# revdep-rebuild --soname libssl.so.0.9.6" + ewarn "# revdep-rebuild --soname libcrypto.so.0.9.6" + ewarn "After this, you can delete /usr/lib/libssl.so.0.9.6 and /usr/lib/libcrypto.so.0.9.6" + touch -c "${ROOT}"/usr/lib/lib{crypto,ssl}.so.0.9.6 + fi } |