2016-10-25 17:08:37 +02:00
|
|
|
# Template file for 'botan'
|
|
|
|
pkgname=botan
|
2017-08-14 20:04:08 +02:00
|
|
|
version=2.2.0
|
|
|
|
revision=1
|
2016-12-16 01:19:36 +01:00
|
|
|
wrksrc="${pkgname^}-${version}"
|
2016-10-25 17:08:37 +02:00
|
|
|
build_style=gnu-makefile
|
|
|
|
hostmakedepends="doxygen epstopdf python"
|
2016-12-16 02:29:11 +01:00
|
|
|
makedepends="libressl-devel bzip2-devel liblzma-devel sqlite-devel zlib-devel"
|
2016-10-25 17:08:37 +02:00
|
|
|
short_desc="Crypto library written in C++"
|
|
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
|
|
license="3-clause-BSD"
|
|
|
|
homepage="http://botan.randombit.net/"
|
|
|
|
distfiles="http://botan.randombit.net/releases/Botan-${version}.tgz"
|
2017-08-14 20:04:08 +02:00
|
|
|
checksum=c794db2ec46f6ff88f37ae76825f0c258f07880b865b6707b26acfcc4567b824
|
2016-12-16 02:29:11 +01:00
|
|
|
|
|
|
|
LDFLAGS="-pthread"
|
2016-10-25 17:08:37 +02:00
|
|
|
|
|
|
|
do_configure() {
|
2016-12-16 02:29:11 +01:00
|
|
|
local _arch _cpu _march _tune
|
2016-12-16 01:19:36 +01:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
i686*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="i686"; _arch="x86"; _march="i686"; _tune="i686" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
x86_64*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="x86_64"; _arch="x86"; _march="x86_64"; _tune="generic" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
armv5*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="armv5"; _arch="armv5te"; _march="armv5te" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
armv6*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="armv6"; _arch="armv6"; _march="armv6" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
armv7*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="armv7-a"; _arch="armv7"; _march="armv7-a" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
aarch64*)
|
2016-12-16 02:29:11 +01:00
|
|
|
_cpu="armv8-a"; _arch="arm64"; _march="armv8-a" ;;
|
|
|
|
mipselhf*)
|
|
|
|
_cpu="mips32"; _arch="mips"; _march="mips32"; _mtune="mips32r2 --hard-float" ;;
|
|
|
|
mips*)
|
|
|
|
_cpu="mips32"; _arch="mips"; _march="mips32"; _mtune="mips32r2 --soft-float" ;;
|
2016-12-16 01:19:36 +01:00
|
|
|
esac
|
2016-12-16 02:29:11 +01:00
|
|
|
python configure.py \
|
|
|
|
--prefix=/usr \
|
|
|
|
--os=linux \
|
|
|
|
--cc=gcc \
|
|
|
|
--cc-bin=$CXX \
|
|
|
|
--cc-abi-flags="-arch ${_arch} -stdlib=libc++" \
|
|
|
|
--cpu=$_cpu \
|
|
|
|
--with-doxygen \
|
|
|
|
--with-openssl \
|
|
|
|
--with-bzip2 \
|
|
|
|
--with-lzma \
|
|
|
|
--with-zlib \
|
|
|
|
--with-sqlite3 \
|
|
|
|
--enable-shared
|
2016-10-25 17:08:37 +02:00
|
|
|
|
|
|
|
sed -i Makefile \
|
|
|
|
-e"s;^\(CXX.*\)=.*;\1= $CXXFLAGS;" \
|
|
|
|
-e"s;^\(LIB_OPT.*\)=.*;\1= $LDFLAGS;" \
|
|
|
|
-e"s;^\(AR.*\)=.*;\1= $AR;" \
|
|
|
|
-e"s;^\(DESTDIR.*\)=.*;\1= $DESTDIR;" \
|
2016-12-16 02:29:11 +01:00
|
|
|
-e"s;\(--destdir\)=/usr;\1=$DESTDIR/usr;" \
|
2016-10-25 17:08:37 +02:00
|
|
|
-e's;$(DESTDIR)/bin;$(DESTDIR)/usr/bin;' \
|
|
|
|
-e's;$(DESTDIR)/lib;$(DESTDIR)/usr/lib;' \
|
|
|
|
-e's;$(DESTDIR)/include;$(DESTDIR)/usr/include;' \
|
|
|
|
-e's;$(DESTDIR)/share;$(DESTDIR)/usr/share;' \
|
|
|
|
-e's;$(AR) $(STATIC_LIB);$(AR) crus $(STATIC_LIB);'
|
2016-12-16 02:29:11 +01:00
|
|
|
|
|
|
|
# configure.py sometimes(?) creates invalid "-march= " and "-mtune= " without parameter
|
|
|
|
sed -i Makefile \
|
|
|
|
-e"s;-std= ;-std=c++11 ;" \
|
|
|
|
-e"s;-march= ;-march=${_march} ;" \
|
|
|
|
-e"s;-mtune= ;-mtune=${_tune} ;"
|
2016-10-25 17:08:37 +02:00
|
|
|
}
|
|
|
|
post_install() {
|
2016-12-16 02:29:11 +01:00
|
|
|
vlicense license.txt
|
2016-10-25 17:08:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
botan-doc_package() {
|
|
|
|
short_desc+=" - documentation"
|
2016-12-16 02:29:11 +01:00
|
|
|
noarch=yes
|
2016-10-25 17:08:37 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/doc
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
botan-devel_package() {
|
|
|
|
short_desc+=" - development files"
|
|
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/*.a
|
|
|
|
vmove usr/lib/*.so
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
}
|