community/botan to 1.11.18-1

This commit is contained in:
Kevin Mihelich 2015-08-02 18:23:14 +00:00
parent 04c80903db
commit 4e8f2ed88c
2 changed files with 43 additions and 15 deletions

View file

@ -0,0 +1,25 @@
From a5b940718d8a0c87ae92a5e8961fd50b6ddc5532 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sun, 2 Aug 2015 12:12:21 -0600
Subject: [PATCH] aarch64 support
---
src/build-data/arch/aarch64.txt | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 src/build-data/arch/aarch64.txt
diff --git a/src/build-data/arch/aarch64.txt b/src/build-data/arch/aarch64.txt
new file mode 100644
index 0000000..863b000
--- /dev/null
+++ b/src/build-data/arch/aarch64.txt
@@ -0,0 +1,6 @@
+endian little
+
+<aliases>
+arm64 # For Debian
+</aliases>
+
--
2.4.6

View file

@ -8,34 +8,38 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - compiler flags adjustment to build correctly
# - --cpu in configure set to correct architectures, autodetect fails
# - AArch64 patch
pkgname=botan
pkgver=1.11.16
pkgver=1.11.18
pkgrel=1
pkgdesc='Crypto library written in C++'
license=('BSD')
arch=('x86_64' 'i686')
url='http://botan.randombit.net/'
depends=('gcc-libs' 'sh' 'asio')
makedepends=('python2' 'asio')
source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc})
sha256sums=('a31a4e5e874aee6d1a5242b153b4ad7d2b2dda575d30f857bd317110ae3c6a7c'
'SKIP')
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC') # Botan Distribution Key
# To import the key: gpg --import botan.key
makedepends=('python2' 'asio' 'git')
#source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc})
source=("git://github.com/randombit/botan.git#commit=8e19ecf11c"
'0001-aarch64-support.patch')
md5sums=('SKIP'
'37165d2a365dd2e9d779b89fa55ba77b')
# Botan Distribution Key. To import: gpg --import botan.key
#validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')
prepare() {
cd "Botan-$pkgver/src"
patch -p1 -d botan -i ../0001-aarch64-support.patch
# Use python2 for the installation scripts
find scripts -name '*.py' -exec sed -i -e '1s,python$,python2,' {} +
find botan/src/scripts -name '*.py' -exec sed -i -e '1s,python$,python2,' {} +
}
build() {
cd "Botan-$pkgver"
cd botan
if [[ $CARCH == 'armv7h' ]]; then
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
@ -46,12 +50,11 @@ build() {
fi
python2 configure.py --prefix=/usr --enable-modules=cvc --destdir="$pkgdir/usr" --cpu=$CPU
make
make
}
package() {
cd "Botan-$pkgver"
cd botan
make DESTDIR="$pkgdir/usr" install
find "$pkgdir/usr/share/doc" -type f -exec chmod 0644 {} \;
install -Dm644 doc/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"