2012-11-21 11:12:43 -06:00
|
|
|
# Description: Secure Sockets Layer and Transport Layer Security tools
|
2014-10-18 23:09:54 +11:00
|
|
|
# URL: http://www.openssl.org/
|
2013-02-02 01:54:23 +11:00
|
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
2012-11-21 11:12:43 -06:00
|
|
|
|
|
|
|
name=openssl-32
|
2016-09-27 08:38:16 +10:00
|
|
|
version=1.0.2j
|
2014-04-13 16:42:12 -05:00
|
|
|
release=1
|
2014-10-18 23:09:54 +11:00
|
|
|
source=(http://www.openssl.org/source/openssl-$version.tar.gz
|
2015-07-10 19:05:25 +10:00
|
|
|
openssl-1.0.2a-32bit_x86_64.patch
|
|
|
|
openssl-1.0.2d-parallel-build.patch)
|
2012-11-21 11:12:43 -06:00
|
|
|
|
|
|
|
build() {
|
2014-01-13 10:24:16 +11:00
|
|
|
cd openssl-$version
|
2014-10-18 23:09:54 +11:00
|
|
|
|
|
|
|
# Make sure we only ever touch Makefile.org and avoid patching a file
|
|
|
|
# that gets blown away anyways by the Configure script
|
|
|
|
rm Makefile
|
|
|
|
|
2015-03-20 13:05:22 -05:00
|
|
|
patch -p1 -i $SRC/openssl-1.0.2a-32bit_x86_64.patch
|
2015-07-10 19:05:25 +10:00
|
|
|
patch -p1 -i $SRC/openssl-1.0.2d-parallel-build.patch
|
2014-10-18 23:09:54 +11:00
|
|
|
|
|
|
|
# Disable fips and man pages
|
|
|
|
sed \
|
|
|
|
-e '/DIRS/s| fips | |g' \
|
|
|
|
-e '/^install:/s|install_docs||' \
|
|
|
|
-i Makefile.org
|
|
|
|
|
|
|
|
./Configure \
|
|
|
|
linux-x86_64-32 \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib32 \
|
|
|
|
--openssldir=/etc/ssl shared
|
|
|
|
|
|
|
|
# Clean out hardcoded flags
|
|
|
|
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 \
|
|
|
|
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
|
|
|
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
|
|
|
|
-i Makefile
|
|
|
|
|
|
|
|
make
|
|
|
|
make \
|
|
|
|
INSTALL_PREFIX=$PKG \
|
|
|
|
LIBDIR=lib32 \
|
|
|
|
MANDIR=/usr/man \
|
|
|
|
MANSUFFIX=ssl \
|
|
|
|
install
|
|
|
|
|
|
|
|
chmod -R +w $PKG
|
2015-07-09 09:22:52 -05:00
|
|
|
rm -r $PKG/usr/{bin,include} $PKG/etc
|
2012-11-21 11:12:43 -06:00
|
|
|
}
|