xxhash, bump version (#6787)

This commit is contained in:
Schrijvers Luc
2022-03-29 15:11:51 +02:00
committed by GitHub
parent 8b370150e9
commit a8206049cd
4 changed files with 150 additions and 188 deletions

View File

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

@@ -0,0 +1,69 @@
From 9f45d75e40253a23b88eb8a49f307daa70a8d124 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 7191b70..3f05073 100644
--- a/tests/collisions/Makefile
+++ b/tests/collisions/Makefile
@@ -30,7 +30,7 @@ CFLAGS += -Wall -Wextra -Wconversion \
-std=c99
CXXFLAGS += -Wall -Wextra -Wconversion \
-std=c++11
-LDFLAGS += -pthread
+#LDFLAGS += -pthread
TESTHASHES = 110000000
HASH_SRC := $(sort $(wildcard allcodecs/*.c allcodecs/*.cc))
--
2.30.2
From b9d85ce7b19c1da58eed5118ebe47309de1d60e2 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 29 Mar 2022 11:59:37 +0000
Subject: Fix, error: unused parameter 'stream'
diff --git a/cli/xsum_os_specific.c b/cli/xsum_os_specific.c
index a568b56..4f6f00f 100644
--- a/cli/xsum_os_specific.c
+++ b/cli/xsum_os_specific.c
@@ -42,7 +42,8 @@
#if (defined(__linux__) && (XSUM_PLATFORM_POSIX_VERSION >= 1)) \
|| (XSUM_PLATFORM_POSIX_VERSION >= 200112L) \
|| defined(__DJGPP__) \
- || defined(__MSYS__)
+ || defined(__MSYS__) \
+ || defined(__HAIKU__)
# include <unistd.h> /* isatty */
# define XSUM_IS_CONSOLE(stdStream) isatty(fileno(stdStream))
#elif defined(MSDOS) || defined(OS2)
--
2.30.2
From 0294335ff690aea92036bde617ac78e3644bb48b 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 be631b1..da2f978 100644
--- a/Makefile
+++ b/Makefile
@@ -368,7 +368,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.30.2

View File

@@ -1,120 +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="7054c3ebd169c97b64a92d7b994ab63c70dd53a06974f1f630ab782c28db0f4f"
SOURCE_FILENAME="xxHash-$portVersion.tar.gz"
SOURCE_DIR="xxHash-$portVersion"
PATCHES="xxhash-$portVersion.patchset"
ARCHITECTURES="all ?x86_gcc2 ?x86"
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.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
provideRuntime=yes
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
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$commandSuffix = $portVersion
cmd:xxh64sum$commandSuffix = $portVersion
cmd:xxh128sum$commandSuffix = $portVersion
cmd:xxhsum$commandSuffix = $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
}
TEST_REQUIRES="
cmd:awk
cmd:find
devel:libclang$secondaryArchSuffix
"
BUILD()
{
make $jobArgs
}
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
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
make ENABLE_UNICODE=1 test-all
}

View File

@@ -0,0 +1,81 @@
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-2022 Yann Collet"
LICENSE="BSD (2-clause)"
REVISION="1"
srcGitRev="aa7ac8bd1f31172937069efe7557600593ffe871"
SOURCE_URI="http://github.com/Cyan4973/xxHash/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="342c0c20046e108f4cddf2163b3bc371439f8188fceefaa9c859df13c53f4a08"
SOURCE_FILENAME="xxHash-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="xxHash-$srcGitRev"
PATCHES="xxhash-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.8.1"
libVersionCompat="$portVersion compat >= ${portVersion%%.*}"
PROVIDES="
xxhash$secondaryArchSuffix = $portVersion
cmd:xxh32sum$commandSuffix = $portVersion
cmd:xxh64sum$commandSuffix = $portVersion
cmd:xxh128sum$commandSuffix = $portVersion
cmd:xxhsum$commandSuffix = $portVersion
lib:libxxhash$secondaryArchSuffix = $libVersionCompat
"
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
"
defineDebugInfoPackage xxhash$secondaryArchSuffix \
"$prefix/bin"/xxhsum \
"$libDir"/libxxhash.so.$libVersion
TEST_REQUIRES="
cmd:awk
cmd:find
gcc${secondaryArchSuffix}_syslibs_devel
devel:libclang$secondaryArchSuffix
"
BUILD()
{
make $jobArgs
}
INSTALL()
{
make PREFIX="$prefix" BINDIR="$prefix/bin" INCLUDEDIR="$includeDir" \
LIBDIR="$libDir" MANDIR="$manDir/man1" install
prepareInstalledDevelLib libxxhash
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
make ENABLE_UNICODE=1 test-all
}