diff options
author | Fantix King | 2012-09-24 13:16:17 +0800 |
---|---|---|
committer | Fantix King | 2015-11-07 16:08:34 +0800 |
commit | 787c35e7f613bda2c18372edc700bc39d94a0912 (patch) | |
tree | fd991611cf1045d45336875f1b5894ffe5618f68 | |
download | aur-787c35e7f613bda2c18372edc700bc39d94a0912.tar.gz |
1.0.1.c-1.1
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 74 | ||||
-rw-r--r-- | ca-dir.patch | 33 | ||||
-rw-r--r-- | no-rpath.patch | 11 | ||||
-rw-r--r-- | openssl-1.0.1-x32.patch | 79 |
5 files changed, 222 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4ce84fcf7e65 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = libx32-openssl + pkgdesc = The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (x32 ABI) + pkgver = 1.0.1.c + pkgrel = 1.1 + url = https://www.openssl.org + arch = x86_64 + license = custom:BSD + makedepends = gcc-multilib-x32 + depends = libx32-zlib + depends = openssl + optdepends = ca-certificates + options = !makeflags + source = https://www.openssl.org/source/openssl-1.0.1c.tar.gz + source = https://www.openssl.org/source/openssl-1.0.1c.tar.gz.asc + source = no-rpath.patch + source = ca-dir.patch + source = openssl-1.0.1-x32.patch + md5sums = ae412727c8c15b67880aef7bd2999b2e + md5sums = a3d90bc42253def61cd1c4237f1ce5f7 + md5sums = dc78d3d06baffc16217519242ce92478 + md5sums = 3bf51be3a1bbd262be46dc619f92aa90 + md5sums = 10d0cebf2d9c0f64c307e82542f519e3 + +pkgname = libx32-openssl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9dae951fc100 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,74 @@ +# $Id: PKGBUILD 70628 2012-05-13 11:42:39Z bluewind $ +# Maintainer: Pierre Schmitz <pierre@archlinux.de> + +_pkgbasename=openssl +pkgname=libx32-$_pkgbasename +_ver=1.0.1c +# use a pacman compatible version scheme +pkgver=1.0.1.c +true && pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} +#pkgver=$_ver +pkgrel=1.1 +pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (x32 ABI)' +arch=('x86_64') +url='https://www.openssl.org' +license=('custom:BSD') +depends=('libx32-zlib' "${_pkgbasename}") +optdepends=('ca-certificates') +makedepends=('gcc-multilib-x32') +options=('!makeflags') +source=("https://www.openssl.org/source/${_pkgbasename}-${_ver}.tar.gz" + "https://www.openssl.org/source/${_pkgbasename}-${_ver}.tar.gz.asc" + 'no-rpath.patch' + 'ca-dir.patch' + 'openssl-1.0.1-x32.patch' +) +md5sums=('ae412727c8c15b67880aef7bd2999b2e' + 'a3d90bc42253def61cd1c4237f1ce5f7' + 'dc78d3d06baffc16217519242ce92478' + '3bf51be3a1bbd262be46dc619f92aa90' + '10d0cebf2d9c0f64c307e82542f519e3') + +build() { + export CC="gcc -mx32" + export CXX="g++ -mx32" + export PKG_CONFIG_PATH="/usr/libx32/pkgconfig" + + cd $srcdir/$_pkgbasename-$_ver + + # x32 patch + patch -p1 -i $srcdir/openssl-1.0.1-x32.patch + + # remove rpath: http://bugs.archlinux.org/task/14367 + patch -p0 -i $srcdir/no-rpath.patch + # set ca dir to /etc/ssl by default + patch -p0 -i $srcdir/ca-dir.patch + # mark stack as non-executable: http://bugs.archlinux.org/task/12434 + # workaround for PR#2771: OPENSSL_NO_TLS1_2_CLIENT + ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=libx32 \ + shared zlib enable-md2 \ + linux-x32 \ + -Wa,--noexecstack "${CFLAGS}" "${LDFLAGS}" \ + -DOPENSSL_NO_TLS1_2_CLIENT + + make MAKEDEPPROG="${CC}" depend + make +} + +check() { + cd $srcdir/$_pkgbasename-$_ver + # the test fails due to missing write permissions in /etc/ssl + # revert this patch for make test + patch -p0 -R -i $srcdir/ca-dir.patch + make test + patch -p0 -i $srcdir/ca-dir.patch +} + +package() { + cd $srcdir/$_pkgbasename-$_ver + make INSTALL_PREFIX=$pkgdir install + + rm -rf ${pkgdir}/{usr/{include,share,bin},etc} + mkdir -p $pkgdir/usr/share/licenses + ln -s $_pkgbasename $pkgdir/usr/share/licenses/$pkgname +} diff --git a/ca-dir.patch b/ca-dir.patch new file mode 100644 index 000000000000..41d1386d3d06 --- /dev/null +++ b/ca-dir.patch @@ -0,0 +1,33 @@ +--- apps/CA.pl.in 2006-04-28 02:30:49.000000000 +0200 ++++ apps/CA.pl.in 2010-04-01 00:35:02.600553509 +0200 +@@ -53,7 +53,7 @@ + $X509="$openssl x509"; + $PKCS12="$openssl pkcs12"; + +-$CATOP="./demoCA"; ++$CATOP="/etc/ssl"; + $CAKEY="cakey.pem"; + $CAREQ="careq.pem"; + $CACERT="cacert.pem"; +--- apps/CA.sh 2009-10-15 19:27:47.000000000 +0200 ++++ apps/CA.sh 2010-04-01 00:35:02.600553509 +0200 +@@ -68,7 +68,7 @@ + X509="$OPENSSL x509" + PKCS12="openssl pkcs12" + +-if [ -z "$CATOP" ] ; then CATOP=./demoCA ; fi ++if [ -z "$CATOP" ] ; then CATOP=/etc/ssl ; fi + CAKEY=./cakey.pem + CAREQ=./careq.pem + CACERT=./cacert.pem +--- apps/openssl.cnf 2009-04-04 20:09:43.000000000 +0200 ++++ apps/openssl.cnf 2010-04-01 00:35:02.607220681 +0200 +@@ -39,7 +39,7 @@ + #################################################################### + [ CA_default ] + +-dir = ./demoCA # Where everything is kept ++dir = /etc/ssl # Where everything is kept + certs = $dir/certs # Where the issued certs are kept + crl_dir = $dir/crl # Where the issued crl are kept + database = $dir/index.txt # database index file. diff --git a/no-rpath.patch b/no-rpath.patch new file mode 100644 index 000000000000..ebd95e23d397 --- /dev/null +++ b/no-rpath.patch @@ -0,0 +1,11 @@ +--- Makefile.shared.no-rpath 2005-06-23 22:47:54.000000000 +0200 ++++ Makefile.shared 2005-11-16 22:35:37.000000000 +0100 +@@ -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="$(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 diff --git a/openssl-1.0.1-x32.patch b/openssl-1.0.1-x32.patch new file mode 100644 index 000000000000..5106cb6e82a3 --- /dev/null +++ b/openssl-1.0.1-x32.patch @@ -0,0 +1,79 @@ +http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=51bfed2e26fc13a66e8b5710aa2ce1d7a04af721 + +UpstreamStatus: Pending + +Received from H J Liu @ Intel +Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors. +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13 + +ported the patch to the 1.0.0e version +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01 +Index: openssl-1.0.0e/Configure +=================================================================== +--- openssl-1.0.0e.orig/Configure ++++ openssl-1.0.0e/Configure +@@ -393,6 +393,7 @@ my %table=( + "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", ++"linux-x32", "gcc:-DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "dist", "cc:-O::(unknown)::::::", + + # Basic configs that should work on any (32 and less bit) box +Index: openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c +=================================================================== +--- openssl-1.0.0e.orig/crypto/bn/asm/x86_64-gcc.c ++++ openssl-1.0.0e/crypto/bn/asm/x86_64-gcc.c +@@ -55,7 +55,7 @@ + * machine. + */ + +-#ifdef _WIN64 ++#if defined _WIN64 || !defined __LP64__ + #define BN_ULONG unsigned long long + #else + #define BN_ULONG unsigned long +@@ -192,9 +192,9 @@ BN_ULONG bn_add_words (BN_ULONG *rp, con + asm ( + " subq %2,%2 \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " adcq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " adcq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " leaq 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n" +@@ -215,9 +215,9 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, con + asm ( + " subq %2,%2 \n" + ".p2align 4 \n" +- "1: movq (%4,%2,8),%0 \n" +- " sbbq (%5,%2,8),%0 \n" +- " movq %0,(%3,%2,8) \n" ++ "1: movq (%q4,%2,8),%0 \n" ++ " sbbq (%q5,%2,8),%0 \n" ++ " movq %0,(%q3,%2,8) \n" + " leaq 1(%2),%2 \n" + " loop 1b \n" + " sbbq %0,%0 \n" +Index: openssl-1.0.0e/crypto/bn/bn.h +=================================================================== +--- openssl-1.0.0e.orig/crypto/bn/bn.h ++++ openssl-1.0.0e/crypto/bn/bn.h +@@ -172,6 +172,13 @@ extern "C" { + # endif + #endif + ++/* Address type. */ ++#ifdef _WIN64 ++#define BN_ADDR unsigned long long ++#else ++#define BN_ADDR unsigned long ++#endif ++ + /* assuming long is 64bit - this is the DEC Alpha + * unsigned long long is only 64 bits :-(, don't define + * BN_LLONG for the DEC Alpha */ |