Permalink
Comparing changes
Open a pull request
- 1 commit
- 2 files changed
- 0 commit comments
- 1 contributor
Commits on Mar 26, 2018
Unified
Split
Showing
with
119 additions
and 0 deletions.
- +11 −0 dev-libs/xxhash/patches/xxHash-0.6.4.patch
- +108 −0 dev-libs/xxhash/xxhash-0.6.4.recipe
| @@ -0,0 +1,11 @@ | ||
| --- a/Makefile 2017-12-22 12:07:37.019660800 +0000 | ||
| +++ b/Makefile 2018-03-25 14:32:28.139722752 +0000 | ||
| @@ -210,7 +210,7 @@ | ||
| #----------------------------------------------------------------------------- | ||
| # make install is validated only for the following targets | ||
| #----------------------------------------------------------------------------- | ||
| -ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) | ||
| +ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku)) | ||
|
|
||
| DESTDIR ?= | ||
| # directory variables : GNU conventions prefer lowercase |
| @@ -0,0 +1,108 @@ | ||
| 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 | ||
| } |