mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
librnp: add recipe for 0.17.0 (#8590)
This commit is contained in:
118
dev-util/librnp/librnp-0.17.0.recipe
Normal file
118
dev-util/librnp/librnp-0.17.0.recipe
Normal file
@@ -0,0 +1,118 @@
|
||||
SUMMARY="High performance C++ OpenPGP library and tools"
|
||||
DESCRIPTION="RNP is a set of OpenPGP (RFC4880) tools built with C++ that works on Linux, macOS, \
|
||||
Windows, *BSD, and Haiku.
|
||||
|
||||
librnp is the library used by RNP for all OpenPGP functions, useful for developers to build \
|
||||
against, different from GPGME."
|
||||
HOMEPAGE="https://www.rnpgp.org/"
|
||||
COPYRIGHT="2017-2021 Ribose Inc
|
||||
2009-2016 The NetBSD Foundation, Inc
|
||||
2005-2008 Nominet UK
|
||||
2017 Marc Stevens
|
||||
2017 Dan Shumow"
|
||||
LICENSE="Apache v2
|
||||
BSD (2-clause)
|
||||
BSD (3-clause)
|
||||
MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/rnpgp/rnp/releases/download/v$portVersion/rnp-v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="04d29fe9a20c56bb7ff4d77bc761b91f1f96462efd3b29d4d1d40262ce4eb782"
|
||||
SOURCE_DIR="rnp-v$portVersion"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.17.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
librnp$secondaryArchSuffix = $portVersion
|
||||
lib:librnp$secondaryArchSuffix = $libVersionCompat
|
||||
cmd:rnp = $portVersion
|
||||
cmd:rnpkeys = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbotan_2$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libjson_c$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
librnp${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:librnp$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
librnp$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbotan_2$secondaryArchSuffix
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libgtest$secondaryArchSuffix # used for testing but must be available during configure
|
||||
devel:libjson_c$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:asciidoc
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:gpg$secondaryArchSuffix # used for testing but must be available during configure
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pygmentize
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DCMAKE_INSTALL_BINDIR=$prefix/bin \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$developDir \
|
||||
-DCMAKE_INSTALL_LIBDIR=$libDir \
|
||||
-DCRYPTO_BACKEND=botan \
|
||||
-DBUILD_SHARED_LIBS=on \
|
||||
-DDOWNLOAD_GTEST=off \
|
||||
-DBUILD_TESTING=on \
|
||||
-DENABLE_FUZZERS=off \
|
||||
-DENABLE_SANITIZERS=off \
|
||||
-DENABLE_COVERAGE=off \
|
||||
-DENABLE_DOC=off
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
rm -f $libDir/librnp.a $libDir/libsexp.a
|
||||
|
||||
prepareInstalledDevelLib librnp
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
|
||||
## generate documentation since we don't have asciidoctor
|
||||
## navigation.adoc causes an error which necessitates the `|| true`
|
||||
mkdir -p $docDir/develop
|
||||
cd docs
|
||||
for i in *.adoc develop/*.adoc;do
|
||||
asciidoc -a source-highlighter=pygments $i || true
|
||||
mv -f ${i/adoc/html} $docDir/${i/adoc/html}
|
||||
done
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make -C build test
|
||||
}
|
||||
Reference in New Issue
Block a user