mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Farmhash: new recipe (#1755)
This commit is contained in:
74
dev-libs/farmhash/farmhash-1.2~git.recipe
Normal file
74
dev-libs/farmhash/farmhash-1.2~git.recipe
Normal file
@@ -0,0 +1,74 @@
|
||||
SUMMARY="A family of hash functions"
|
||||
DESCRIPTION="FarmHash provides hash functions for strings and other data."
|
||||
HOMEPAGE="https://github.com/google/farmhash/"
|
||||
COPYRIGHT="2014 Google, Inc."
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
srcGitRev="816a4ae622e964763ca0862d9dbd19324a1eaf45"
|
||||
SOURCE_URI="https://github.com/google/farmhash/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0"
|
||||
SOURCE_FILENAME="$portVersionedName.tar.gz"
|
||||
SOURCE_DIR="farmhash-$srcGitRev"
|
||||
PATCHES="farmhash-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
farmhash$secondaryArchSuffix = $portVersion compat >= 0
|
||||
lib:libfarmhash$secondaryArchSuffix = 0.0.0 compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
farmhash${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libfarmhash$secondaryArchSuffix = 0.0.0 compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
farmhash$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CXXFLAGS="-D_BSD_SOURCE"
|
||||
libtoolize --force --copy --install
|
||||
aclocal -I conftools -I m4
|
||||
autoconf
|
||||
automake --add-missing
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/libfarmhash.la
|
||||
|
||||
# prepare develop/lib
|
||||
prepareInstalledDevelLib libfarmhash
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
29
dev-libs/farmhash/patches/farmhash-1.2~git.patchset
Normal file
29
dev-libs/farmhash/patches/farmhash-1.2~git.patchset
Normal file
@@ -0,0 +1,29 @@
|
||||
From a21a95e4dec574181067ced2dde97e581b9efcc6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sun, 29 Oct 2017 09:35:03 +0100
|
||||
Subject: Haiku support
|
||||
|
||||
|
||||
diff --git a/src/farmhash.cc b/src/farmhash.cc
|
||||
index cfd4a47..f2b99ff 100644
|
||||
--- a/src/farmhash.cc
|
||||
+++ b/src/farmhash.cc
|
||||
@@ -165,6 +165,15 @@
|
||||
#define bswap_64(x) bswap64(x)
|
||||
#endif
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+#define _BSD_SOURCE
|
||||
+#include <bsd/endian.h>
|
||||
+#undef bswap_32
|
||||
+#undef bswap_64
|
||||
+#define bswap_32(x) bswap32(x)
|
||||
+#define bswap_64(x) bswap64(x)
|
||||
+
|
||||
#else
|
||||
|
||||
#undef bswap_32
|
||||
--
|
||||
2.14.2
|
||||
|
||||
Reference in New Issue
Block a user