2018-04-11 12:40:19 +00:00
|
|
|
# $Id$
|
2015-10-18 15:30:41 +00:00
|
|
|
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
|
2013-04-11 02:45:12 +00:00
|
|
|
# Contributor: Angel Velasquez <angvp@archlinux.org>
|
|
|
|
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
|
|
|
|
# Contributor: d'Ronin <daronin@2600.com>
|
2015-01-09 13:01:53 +00:00
|
|
|
# Contributor: Hexchain Tong <richard0053@gmail.com>
|
2018-04-11 12:40:19 +00:00
|
|
|
# Contributor: Jack Lloyd <jack@randombit.net>
|
2013-04-11 02:45:12 +00:00
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - compiler flags adjustment to build correctly
|
|
|
|
# - --cpu in configure set to correct architectures, autodetect fails
|
2015-08-02 18:23:14 +00:00
|
|
|
# - AArch64 patch
|
2013-04-11 02:45:12 +00:00
|
|
|
|
|
|
|
pkgname=botan
|
2018-04-11 12:40:19 +00:00
|
|
|
pkgver=2.5.0
|
|
|
|
pkgrel=4
|
2013-04-11 02:45:12 +00:00
|
|
|
pkgdesc='Crypto library written in C++'
|
2018-01-10 13:34:17 +00:00
|
|
|
arch=('x86_64')
|
2016-11-15 19:06:00 +00:00
|
|
|
url='https://botan.randombit.net/'
|
2017-08-15 12:35:24 +00:00
|
|
|
license=('BSD')
|
2018-04-11 12:40:19 +00:00
|
|
|
makedepends=('git' 'python')
|
|
|
|
# Using a specific commit instead of the .tgz because botan issue #1524
|
|
|
|
source=('git+https://github.com/randombit/botan#commit=6c5d9ef3c49658cbf4096e04905e3c0debb9d096'
|
2015-08-02 18:23:14 +00:00
|
|
|
'0001-aarch64-support.patch')
|
2018-04-11 12:40:19 +00:00
|
|
|
md5sums=('SKIP'
|
|
|
|
'37165d2a365dd2e9d779b89fa55ba77b')
|
|
|
|
#validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')
|
|
|
|
#source=("https://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc})
|
|
|
|
#sha256sums=('b8a31fe03e7f048a5bd3967ecd04b6a48966215e78792df06e333b0eede4fb1b'
|
|
|
|
# 'SKIP')
|
2015-04-28 12:28:26 +00:00
|
|
|
|
2015-01-05 15:58:50 +00:00
|
|
|
prepare() {
|
2018-04-11 12:40:19 +00:00
|
|
|
cd "$pkgname"
|
|
|
|
#cd "${pkgname^}-$pkgver"
|
2015-09-27 13:24:16 +00:00
|
|
|
|
|
|
|
patch -p1 -i ../0001-aarch64-support.patch
|
2015-01-05 15:58:50 +00:00
|
|
|
}
|
2013-04-11 02:45:12 +00:00
|
|
|
|
|
|
|
build() {
|
2018-04-11 12:40:19 +00:00
|
|
|
cd "$pkgname"
|
|
|
|
#cd "${pkgname^}-$pkgver"
|
2013-04-11 02:45:12 +00:00
|
|
|
|
2015-08-02 18:23:14 +00:00
|
|
|
if [[ $CARCH == 'aarch64' ]]; then
|
|
|
|
CPU='aarch64'
|
|
|
|
elif [[ $CARCH == 'armv7h' ]]; then
|
2013-04-11 02:45:12 +00:00
|
|
|
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
|
|
|
|
|
2017-04-21 18:07:52 +00:00
|
|
|
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-neon"
|
|
|
|
|
2018-04-11 12:40:19 +00:00
|
|
|
# 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
|
2015-08-02 18:23:14 +00:00
|
|
|
make
|
2013-04-11 02:45:12 +00:00
|
|
|
}
|
|
|
|
|
2015-10-18 15:30:41 +00:00
|
|
|
check() {
|
2018-04-11 12:40:19 +00:00
|
|
|
cd "$pkgname"
|
2015-10-18 15:30:41 +00:00
|
|
|
|
|
|
|
./botan-test
|
|
|
|
}
|
|
|
|
|
2013-04-11 02:45:12 +00:00
|
|
|
package() {
|
2018-04-11 12:40:19 +00:00
|
|
|
cd "$pkgname"
|
2017-08-15 12:35:24 +00:00
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" install
|
2017-01-09 19:27:01 +00:00
|
|
|
install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
2013-04-11 02:45:12 +00:00
|
|
|
}
|
|
|
|
|
2016-11-15 19:06:00 +00:00
|
|
|
# getver: github.com/randombit/botan
|
2017-08-15 12:35:24 +00:00
|
|
|
# vim: ts=2 sw=2 et:
|