mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
The quotes around $binDir and $prefix are not needed in the definitions of commandBinDir. There are over 120 recipes which define commandBinDir, and *most* of them don't have quotes in the lines defining commandBinDir and commandSuffix. 15 recipes were not consistent with the wiki. Now they are.
109 lines
2.5 KiB
Bash
109 lines
2.5 KiB
Bash
SUMMARY="A fast non-cryptographic hash algorithm"
|
|
DESCRIPTION="xxHash is an extremely fast non-cryptographic hash algorithm, \
|
|
working at speeds close to RAM limits."
|
|
HOMEPAGE="https://cyan4973.github.io/xxHash/
|
|
http://www.xxhash.com/"
|
|
COPYRIGHT="2014-2017 Yann Collet"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="http://github.com/Cyan4973/xxHash/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4570ccd111df6b6386502791397906bf69b7371eb209af7d41debc2f074cdb22"
|
|
SOURCE_FILENAME="xxHash-$portVersion.tar.gz"
|
|
SOURCE_DIR="xxHash-$portVersion"
|
|
PATCHES="xxHash-$portVersion.patch"
|
|
|
|
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
|
|
|
|
# Provide cmd:xxhash on all primary architectures except x86_gcc2,
|
|
# as well as on x86 secondary arch if the primary arch is x86_gcc2.
|
|
commandBinDir=$binDir
|
|
provideRuntime=yes
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandBinDir=$prefix/bin
|
|
else
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
provideRuntime=no
|
|
fi
|
|
fi
|
|
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
|
provideRuntime=no
|
|
fi
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$portVersion compat >= ${portVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
xxhash$secondaryArchSuffix = $portVersion
|
|
lib:libxxhash$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
if [ "$provideRuntime" = yes ]; then
|
|
PROVIDES="$PROVIDES
|
|
cmd:xxh32sum = $portVersion
|
|
cmd:xxh64sum = $portVersion
|
|
cmd:xxhsum = $portVersion
|
|
"
|
|
fi
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
xxhash${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libxxhash$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
xxhash$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
debugList=(
|
|
"$libDir"/libxxhash.so.$libVersion
|
|
)
|
|
if [ "$provideRuntime" = yes ]; then
|
|
debugList+=("$commandBinDir"/xxhsum)
|
|
fi
|
|
defineDebugInfoPackage xxhash$secondaryArchSuffix "${debugList[@]}"
|
|
|
|
PATCH()
|
|
{
|
|
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
|
sed -i \
|
|
-e "s/ -Wextra//" \
|
|
-e "s/ -Wstrict-aliasing=1//" \
|
|
-e "s/ -Wswitch-enum//" \
|
|
-e "s/ -Wdeclaration-after-statement//" \
|
|
Makefile
|
|
fi
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make BINDIR="$commandBinDir" INCLUDEDIR="$includeDir" LIBDIR="$libDir" \
|
|
MANDIR="$manDir/man1" install
|
|
|
|
if [ "$provideRuntime" != yes ]; then
|
|
rm -rf "$commandBinDir" "$manDir"
|
|
fi
|
|
|
|
prepareInstalledDevelLib libxxhash
|
|
packageEntries devel "$developDir"
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make test-all
|
|
}
|