botan: clean up template and fix license

Thanks to the input of upstream Jack Lloyd all hacks needed for
previous versions could now be removed. The license is actually
2-clause BSD.
This commit is contained in:
Jürgen Buchmüller 2018-03-30 11:50:28 +02:00
parent 6b01838cb2
commit 286cd6d87a
1 changed files with 4 additions and 54 deletions

View File

@ -1,14 +1,14 @@
# Template file for 'botan' # Template file for 'botan'
pkgname=botan pkgname=botan
version=2.4.0 version=2.4.0
revision=2 revision=3
wrksrc="${pkgname^}-${version}" wrksrc="${pkgname^}-${version}"
build_style=gnu-makefile build_style=gnu-makefile
hostmakedepends="doxygen epstopdf python" hostmakedepends="doxygen epstopdf python"
makedepends="libressl-devel bzip2-devel liblzma-devel sqlite-devel zlib-devel" makedepends="libressl-devel bzip2-devel liblzma-devel sqlite-devel zlib-devel"
short_desc="Crypto library written in C++" short_desc="Crypto library written in C++"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>" maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="3-clause-BSD" license="2-clause-BSD"
homepage="http://botan.randombit.net/" homepage="http://botan.randombit.net/"
distfiles="http://botan.randombit.net/releases/Botan-${version}.tgz" distfiles="http://botan.randombit.net/releases/Botan-${version}.tgz"
checksum=ed9464e2a5cfee4cd3d9bd7a8f80673b45c8a0718db2181a73f5465a606608a5 checksum=ed9464e2a5cfee4cd3d9bd7a8f80673b45c8a0718db2181a73f5465a606608a5
@ -16,12 +16,10 @@ checksum=ed9464e2a5cfee4cd3d9bd7a8f80673b45c8a0718db2181a73f5465a606608a5
LDFLAGS="-pthread" LDFLAGS="-pthread"
do_configure() { do_configure() {
local _args _arch _cpu _march _tune local _args _arch _cpu
_args="--prefix=/usr" _args="--prefix=/usr"
_args+=" --os=linux" _args+=" --os=linux"
_args+=" --cc=gcc"
_args+=" --cc-bin=$CXX"
_args+=" --with-doxygen" _args+=" --with-doxygen"
_args+=" --with-openssl" _args+=" --with-openssl"
_args+=" --with-bzip2" _args+=" --with-bzip2"
@ -34,89 +32,41 @@ do_configure() {
i686*) i686*)
_cpu="i686" _cpu="i686"
_arch="x86" _arch="x86"
_march="i686"
_tune="i686"
;; ;;
x86_64*) x86_64*)
_cpu="x86_64" _cpu="x86_64"
_arch="x86" _arch="x86"
_march="x86_64"
_tune="generic"
;; ;;
armv5*) armv5*)
_cpu="armv5" _cpu="armv5"
_arch="armv5te" _arch="armv5te"
_march="armv5te"
_float="soft"
_args+=" --disable-modules=simd" _args+=" --disable-modules=simd"
;; ;;
armv6*) armv6*)
_cpu="armv6" _cpu="armv6"
_arch="armv6" _arch="armv6"
_march="armv6"
_float="hard"
_args+=" --disable-modules=simd" _args+=" --disable-modules=simd"
;; ;;
armv7*) armv7*)
_cpu="armv7-a" _cpu="armv7-a"
_arch="armv7" _arch="armv7"
_march="armv7-a"
_float="hard"
_args+=" --disable-modules=simd" _args+=" --disable-modules=simd"
;; ;;
aarch64*) aarch64*)
_cpu="armv8-a" _cpu="armv8-a"
_arch="arm64" _arch="arm64"
_float="hard"
_march="armv8-a"
;;
mipselhf*)
_cpu="mips32"
_arch="mips"
_march="mips32"
_mtune="mips32r2 --hard-float"
_float="hard"
;;
mipshf*)
_cpu="mips32"
_arch="mips"
_march="mips32"
_mtune="mips32r2 --hard-float"
_float="hard"
;; ;;
mips*) mips*)
_cpu="mips32" _cpu="mips32"
_arch="mips" _arch="mips"
_march="mips32"
_mtune="mips32r2 --soft-float"
_float="soft"
;; ;;
esac esac
python configure.py \ python configure.py \
--distribution-info="Void Linux botan-${version}_${revision}" \
--cc-abi-flags="-arch ${_arch} -stdlib=libc++" \ --cc-abi-flags="-arch ${_arch} -stdlib=libc++" \
--cpu=${_cpu} \ --cpu=${_cpu} \
${_args} ${_args}
sed -i Makefile \
-e"s;^\(CXX.*\)=.*;\1= $CXXFLAGS;" \
-e"s;^\(LIB_OPT.*\)=.*;\1= $LDFLAGS;" \
-e"s;^\(AR.*\)=.*;\1= $AR;" \
-e"s;^\(DESTDIR.*\)=.*;\1= $DESTDIR;" \
-e"s;\(--destdir\)=/usr;\1=$DESTDIR/usr;" \
-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);'
# configure.py sometimes(?) creates invalid "-march= " and "-mtune= " without parameter
sed -i Makefile \
-e"s;-std= ;-std=c++11 ;" \
-e"s;-mabi= ;;" \
-e"s;-march= ;-march=${_march} ;" \
-e"s;-mtune= ;-mtune=${_tune} ;" \
-e"s;-mfloat-abi= ;-mfloat-abi=${_float} ;"
} }
post_install() { post_install() {
vlicense license.txt vlicense license.txt