community/botan: fix

This commit is contained in:
Kevin Mihelich 2018-04-11 13:03:52 +00:00
parent ff19319d5f
commit 0b78223041

View file

@ -7,9 +7,8 @@
# Contributor: Jack Lloyd <jack@randombit.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - compiler flags adjustment to build correctly
# - --cpu in configure set to correct architectures, autodetect fails
# - AArch64 patch
# - disable neon on !AArch64
pkgname=botan
pkgver=2.5.0
@ -40,22 +39,10 @@ build() {
cd "$pkgname"
#cd "${pkgname^}-$pkgver"
if [[ $CARCH == 'aarch64' ]]; then
CPU='aarch64'
elif [[ $CARCH == 'armv7h' ]]; then
sed -i 's/lang_flags "/lang_flags "-mfpu=vfpv3-d16 -mfloat-abi=hard /' src/build-data/cc/gcc.txt
CPU='arm/armv7-a'
elif [[ $CARCH == 'armv6h' ]]; then
sed -i 's/lang_flags "/lang_flags "-mfpu=vfp -mfloat-abi=hard /' src/build-data/cc/gcc.txt
CPU='arm/armv6'
elif [[ $CARCH == 'arm' ]]; then
CPU='arm/armv5te'
fi
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-neon"
# botan benefits from -O3, and the developers runs tests with it
CXXFLAGS="$CXXFLAGS -O3" ./configure.py --prefix=/usr --with-bzip --with-zlib --with-lzma --cpu=$CPU $CONFIG
CXXFLAGS="$CXXFLAGS -O3" ./configure.py --prefix=/usr --with-bzip --with-zlib --with-lzma $CONFIG
make
}