From 959f166ac2b727f2bc3b87fa99fafc8690da4ac5 Mon Sep 17 00:00:00 2001 From: extrowerk <5569059+extrowerk@users.noreply.github.com> Date: Tue, 26 May 2020 19:57:19 +0200 Subject: [PATCH] DHT: new recipe (#5020) --- net-libs/dht/dht-0.26.recipe | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 net-libs/dht/dht-0.26.recipe diff --git a/net-libs/dht/dht-0.26.recipe b/net-libs/dht/dht-0.26.recipe new file mode 100644 index 000000000..d02bb79f8 --- /dev/null +++ b/net-libs/dht/dht-0.26.recipe @@ -0,0 +1,71 @@ +SUMMARY="BitTorrent DHT library" +DESCRIPTION="dht implement the variant of the Kademlia Distributed Hash \ +Table (DHT) used in the Bittorrent network (\"mainline\" variant)." +HOMEPAGE="https://github.com/transmission/dht" +COPYRIGHT="2009-2010 by Juliusz Chroboczek" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/transmission/dht/archive/dht-$portVersion.tar.gz" +CHECKSUM_SHA256="3873d54b786cf74090672ed6f786b82510ae375d5a8d8f4d99314e358d898baa" +SOURCE_DIR="dht-dht-$portVersion" + +ARCHITECTURES="?x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +libVersion="2.1" +libVersionCompat="$libVersion compat >= 2" + +PROVIDES=" + dht$secondaryArchSuffix = $portVersion + lib:libdht$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + dht${secondaryArchSuffix}_devel = $portVersion + devel:libdht$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + dht$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + " + +BUILD() +{ + gcc -o dht.o -c dht.c + gcc -shared -o libdht.so dht.o +} + +INSTALL() +{ + mkdir -p $includeDir/dht $libDir + cp dht.h $includeDir/dht + cp libdht.so $libDir + + mkdir -p $developLibDir/pkgconfig + # No need to call prepareInstalledDevelLibs + cat > $developLibDir/pkgconfig/dht.pc << EOF +prefix=${prefix} +exec_prefix=${prefix} +libdir=${libDir} +includedir=${includeDir} + +Name: dht +Description: BitTorrent DHT library +Version: $portVersion +Libs: -L${developLibDir} -ldht +Cflags: -I${includeDir}/dht +EOF + + prepareInstalledDevelLibs libdht + packageEntries devel \ + $developDir +}