Files
haikuports/dev-libs/botan/botan3-3.1.1.recipe
2023-09-22 18:55:48 +00:00

102 lines
2.6 KiB
Bash

SUMMARY="A cryptography library"
DESCRIPTION="Botan is a cryptography library written in C++. \
Its goal is to offer the tools necessary to implement a range of practical \
systems, such as TLS/DTLS, PKIX certificate handling, PKCS#11 and TPM \
hardware support, password hashing, and post quantum crypto schemes. \
Botan also has a C89 API specifically designed to be easy to call from other \
languages."
HOMEPAGE="https://botan.randombit.net/"
COPYRIGHT="1999-2023 The Botan Authors"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/randombit/botan/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="2d0af0c3a7140572f3f7f1a22865f9c5eadc102a7fa58f03314709b0bee26c11"
SOURCE_DIR="botan-$portVersion"
PATCHES="botan3-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="0.1.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
botan3$secondaryArchSuffix = $portVersion
cmd:botan$commandSuffix = $portVersion
lib:libbotan_3$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
botan3${secondaryArchSuffix}_devel = $portVersion
devel:libbotan_3$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
botan3$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
gcc${secondaryArchSuffix}_syslibs_devel
devel:libbz2$secondaryArchSuffix
devel:liblzma$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
"
BUILD()
{
runConfigure --omit-buildspec --omit-dirs binDir ./configure.py \
--bindir="$commandBinDir" \
--enable-shared-library \
--disable-static \
--with-bzip2 --with-lzma --with-zlib \
--with-sqlite3 \
--no-install-python-module
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLib libbotan-3
fixPkgconfig
packageEntries devel \
"$developDir"
# install botan3.py to the wright place
local installDir="$prefix/lib/python3.10/vendor-packages"
mkdir -p $installDir
cp src/python/botan3.py $installDir
}
TEST()
{
LIBRARY_PATH="$sourceDir${LIBRARY_PATH:+:$LIBRARY_PATH}" \
./botan-test
}