xxhash, bump version, fix for tests (#5528)

This commit is contained in:
Schrijvers Luc
2020-12-27 13:18:15 +01:00
committed by GitHub
parent f3ad82a292
commit ba055a9b69
5 changed files with 79 additions and 146 deletions

View File

@@ -1,11 +0,0 @@
--- 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

View File

@@ -1,22 +0,0 @@
From 44dc714e4904fa639903cbfd4a178fa1bf70c5e3 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 23 Jun 2018 12:35:44 +0200
Subject: import previous patch by nikolaszimmermann
diff --git a/Makefile b/Makefile
index 6dd738f..52047c1 100644
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ clean:
#-----------------------------------------------------------------------------
# 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))
.PHONY: list
list:
--
2.16.4

View File

@@ -0,0 +1,68 @@
From 36163b93731956cb986941384de4e6458735472d Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 27 Dec 2020 10:30:29 +0000
Subject: import previous patch by nikolaszimmermann
diff --git a/Makefile b/Makefile
index ef24e94..7bbca1a 100644
--- a/Makefile
+++ b/Makefile
@@ -369,7 +369,7 @@ trailingWhitespace:
# =========================================================
# make install is validated only for the following targets
# =========================================================
-ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS CYGWIN% , $(UNAME)))
+ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU Haiku OpenBSD FreeBSD NetBSD DragonFly SunOS CYGWIN% , $(UNAME)))
DESTDIR ?=
# directory variables: GNU conventions prefer lowercase
--
2.28.0
From 658f6b936d04787a126d479598e8a4d303b2c109 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 27 Dec 2020 11:59:31 +0000
Subject: Remove -pthread for the test
diff --git a/tests/collisions/Makefile b/tests/collisions/Makefile
index bad9835..1e13582 100644
--- a/tests/collisions/Makefile
+++ b/tests/collisions/Makefile
@@ -29,7 +29,7 @@ CPPFLAGS += $(addprefix -I ,$(SRC_DIRS))
CFLAGS ?= -std=c99 \
-Wall -Wextra -Wconversion
CXXFLAGS ?= -Wall -Wextra -Wconversion -std=c++11
-LDFLAGS += -pthread
+LDFLAGS +=
TESTHASHES = 110000000
HASH_SRC := $(sort $(wildcard allcodecs/*.c allcodecs/*.cc))
--
2.28.0
From a6343520084c21292274c3a32c3b31f60d835024 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 27 Dec 2020 12:47:45 +0000
Subject: Fix linking against -lubsan (needed for the clang tests)
diff --git a/Makefile b/Makefile
index 7bbca1a..766ba11 100644
--- a/Makefile
+++ b/Makefile
@@ -303,7 +303,7 @@ usan: CXX=clang++
usan: ## check CLI runtime for undefined behavior, using clang's sanitizer
@echo ---- check undefined behavior - sanitize ----
$(MAKE) clean
- $(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all"
+ $(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all -fsanitize-undefined-trap-on-error"
.PHONY: staticAnalyze
SCANBUILD ?= scan-build
--
2.28.0

View File

@@ -1,108 +0,0 @@
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
}

View File

@@ -7,7 +7,7 @@ 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="19030315f4fc1b4b2cdb9d7a317069a109f90e39d1fe4c9159b7aaa39030eb95"
CHECKSUM_SHA256="7054c3ebd169c97b64a92d7b994ab63c70dd53a06974f1f630ab782c28db0f4f"
SOURCE_FILENAME="xxHash-$portVersion.tar.gz"
SOURCE_DIR="xxHash-$portVersion"
PATCHES="xxhash-$portVersion.patchset"
@@ -43,6 +43,7 @@ if [ "$provideRuntime" = yes ]; then
PROVIDES="$PROVIDES
cmd:xxh32sum$commandSuffix = $portVersion
cmd:xxh64sum$commandSuffix = $portVersion
cmd:xxh128sum$commandSuffix = $portVersion
cmd:xxhsum$commandSuffix = $portVersion
"
fi
@@ -87,6 +88,8 @@ PATCH()
}
TEST_REQUIRES="
cmd:awk
cmd:find
devel:libclang$secondaryArchSuffix
"
@@ -97,18 +100,21 @@ BUILD()
INSTALL()
{
make BINDIR="$commandBinDir" INCLUDEDIR="$includeDir" LIBDIR="$libDir" \
MANDIR="$manDir/man1" install
make PREFIX="$prefix" BINDIR="$commandBinDir" INCLUDEDIR="$includeDir" \
LIBDIR="$libDir" MANDIR="$manDir/man1" install
if [ "$provideRuntime" != yes ]; then
rm -rf "$commandBinDir" "$manDir"
fi
prepareInstalledDevelLib libxxhash
packageEntries devel "$developDir"
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
make test-all
make ENABLE_UNICODE=1 test-all
}