openssl: make this cross buildable with musl.

This commit is contained in:
Juan RP 2013-03-01 20:06:59 +01:00
parent 548dfaffa7
commit 56f44d2028

View file

@ -21,15 +21,27 @@ make_dirs="
do_configure() { do_configure() {
local _opts local _opts
if [ "${XBPS_MACHINE}" = "x86_64" ]; then case "$XBPS_TARGET_ARCH" in
_target="linux-x86_64" arm*) _target="linux-armv4";;
_opts="enable-ec_nistp_64_gcc_128" mips*) msg_error "$pkgver: unknow cross arch\n";;
elif [ "${XBPS_MACHINE}" = "i686" ]; then esac
_target="linux-elf"
elif [ "${XBPS_MACHINE}" = "armv6l" ]; then if [ -z "${_target}" ]; then
_target="linux-armv4" if [ "$XBPS_MACHINE" = "x86_64" ]; then
_target="linux-x86_64"
_opts="enable-ec_nistp_64_gcc_128"
elif [ "$XBPS_MACHINE" = "i686" ]; then
_target="linux-elf"
elif [ "$XBPS_MACHINE" = "armv6l" ]; then
_target="linux-armv4"
fi
fi fi
sed -i '/^"linux-armv4/s/-DTERMIO/-DTERMIOS/' Configure
sed -i '/^"linux-x86_64/s/-DTERMIO/-DTERMIOS/' Configure
sed -i '/^"linux-elf/s/-DTERMIO/-DTERMIOS/' Configure
sed -i 's/defined(linux)/0/' crypto/ui/ui_openssl.c
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \ ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
shared zlib enable-md2 threads ${_opts} \ shared zlib enable-md2 threads ${_opts} \
${_target} -Wa,--noexecstack "${CFLAGS}" ${_target} -Wa,--noexecstack "${CFLAGS}"