111 lines
2.0 KiB
Bash
111 lines
2.0 KiB
Bash
# Template file for 'botan'
|
|
pkgname=botan
|
|
version=2.10.0
|
|
revision=2
|
|
wrksrc="${pkgname^}-${version}"
|
|
build_style=gnu-makefile
|
|
pycompile_module="botan.py"
|
|
hostmakedepends="doxygen python"
|
|
makedepends="libressl-devel bzip2-devel liblzma-devel sqlite-devel zlib-devel"
|
|
short_desc="Crypto library written in C++"
|
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|
license="BSD-2-Clause"
|
|
homepage="https://botan.randombit.net/"
|
|
distfiles="https://botan.randombit.net/releases/Botan-${version}.tgz"
|
|
checksum=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
|
|
|
|
python_version=2
|
|
|
|
LDFLAGS="-pthread"
|
|
CXXFLAGS="-O3"
|
|
|
|
do_configure() {
|
|
local _args _arch _cpu
|
|
|
|
_args="--prefix=/usr"
|
|
_args+=" --os=linux"
|
|
_args+=" --with-doxygen"
|
|
_args+=" --with-openssl"
|
|
_args+=" --with-bzip2"
|
|
_args+=" --with-lzma"
|
|
_args+=" --with-zlib"
|
|
_args+=" --with-sqlite3"
|
|
_args+=" --enable-shared"
|
|
_args+=" --cc=gcc"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*)
|
|
_cpu="i686"
|
|
_arch="x86"
|
|
;;
|
|
x86_64*)
|
|
_cpu="x86_64"
|
|
_arch="x86"
|
|
;;
|
|
armv5*)
|
|
_cpu="arm"
|
|
_arch="armv5te"
|
|
_args+=" --disable-modules=simd"
|
|
;;
|
|
armv6*)
|
|
_cpu="arm"
|
|
_arch="armv6"
|
|
_args+=" --disable-modules=simd"
|
|
;;
|
|
armv7*)
|
|
_cpu="armv7-a"
|
|
_arch="armv7"
|
|
_args+=" --disable-modules=simd"
|
|
;;
|
|
aarch64*)
|
|
_cpu="armv8-a"
|
|
_arch="arm64"
|
|
;;
|
|
mips*)
|
|
_cpu="mips32"
|
|
_arch="mips"
|
|
;;
|
|
ppc64le*)
|
|
_cpu="ppc64le"
|
|
_arch="ppc64le"
|
|
;;
|
|
ppc64*)
|
|
_cpu="ppc64"
|
|
_arch="ppc64"
|
|
;;
|
|
esac
|
|
|
|
python2 configure.py \
|
|
--distribution-info="Void Linux botan-${version}_${revision}" \
|
|
--cc-abi-flags="-std=c++14" \
|
|
--cpu=${_cpu} \
|
|
${_args}
|
|
}
|
|
|
|
do_check() {
|
|
./botan-test
|
|
}
|
|
|
|
post_install() {
|
|
vlicense license.txt
|
|
}
|
|
|
|
botan-doc_package() {
|
|
short_desc+=" - documentation"
|
|
archs=noarch
|
|
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
|
|
}
|
|
}
|