diff --git a/dev-libs/botan/botan-2.0.1.recipe b/dev-libs/botan/botan-2.0.1.recipe new file mode 100644 index 000000000..6bdcfeded --- /dev/null +++ b/dev-libs/botan/botan-2.0.1.recipe @@ -0,0 +1,93 @@ +SUMMARY="A cryptography library written in C++" +DESCRIPTION="This is the best option for crypthography in C++" +HOMEPAGE="https://botan.randombit.net/" +COPYRIGHT="2000-2017 The Botan Authors" +LICENSE="BSD (2-clause)" +REVISION="1" +SOURCE_URI="https://github.com/randombit/botan/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="f4c02bc4247eb78ac004ce10374992dd488f0d1ba21e712874cd77481332f731" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="!x86_gcc2 x86" + +if [ "$targetArchitecture" != x86_gcc2 ]; then + commandSuffix=$secondaryArchSuffix + commandBinDir=$binDir +else + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + botan$secondaryArchSuffix = $portVersion +# lib:libbotan_2$secondaryArchSuffix = 0.0.1 compat >= 0 + cmd:botan$commandSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:liblzma$secondaryArchSuffix + lib:libsqlite3$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + botan${secondaryArchSuffix}_devel = $portVersion + devel:libbotan_2$secondaryArchSuffix = 0.0.1 compat >= 0 + " +REQUIRES_devel=" + haiku${secondaryArchSuffix}_devel + botan$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libbz2$secondaryArchSuffix + devel:libcrypto$secondaryArchSuffix + devel:liblzma$secondaryArchSuffix + devel:libsqlite3$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:g++$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python + " + +PATCH() +{ + sed -i -e "/^all\>/ s/-pthread -fstack-protector/-fno-stack-protector/" src/build-data/cc/gcc.txt +} + +BUILD() +{ + libtoolize --force --copy --install + runConfigure --omit-buildspec --omit-dirs binDir ./configure.py \ + --destdir=/ --bindir=$commandBinDir \ + --enable-shared-library \ + --with-bzip2 --with-lzma --with-zlib \ + --with-openssl --with-sqlite3 + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLib libbotan-2 + fixPkgconfig + + packageEntries devel \ + $developDir +} + +TEST() +{ + ./botan-test +}