mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
lz4: bump to 1.8.2, add TEST, move some patches to PATCH. (#2564)
This commit is contained in:
@@ -4,20 +4,23 @@ compression speed at 400 MB/s per core, scalable with multi-core CPUs. It \
|
||||
also features an extremely fast decoder, with speed in multiple GB/s per \
|
||||
core, typically reaching RAM speed limits on multi-core systems."
|
||||
HOMEPAGE="https://github.com/lz4/lz4"
|
||||
COPYRIGHT="2011-2014, Yann Collet"
|
||||
COPYRIGHT="2011-2018 Yann Collet"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="lz4-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="2ca482ea7a9bb103603108b5a7510b7592b90158c151ff50a28f1ca8389fccf6"
|
||||
CHECKSUM_SHA256="0963fbe9ee90acd1d15e9f09e826eaaf8ea0312e854803caf2db0a6dd40f4464"
|
||||
PATCHES="lz4-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
lz4${secondaryArchSuffix} = $portVersion
|
||||
lib:liblz4${secondaryArchSuffix} = $portVersion compat >= 1
|
||||
lz4$secondaryArchSuffix = $portVersion
|
||||
lib:liblz4$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
@@ -35,10 +38,10 @@ REQUIRES="
|
||||
|
||||
PROVIDES_devel="
|
||||
lz4${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:liblz4$secondaryArchSuffix = $portVersion compat >= 1
|
||||
devel:liblz4$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
lz4${secondaryArchSuffix} == $portVersion base
|
||||
lz4$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
@@ -51,6 +54,28 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:diff
|
||||
cmd:find
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
sed -i \
|
||||
-e "s/-Wextra//" \
|
||||
-e "s/-Wswitch-enum//" \
|
||||
-e "s/-Wdeclaration-after-statement//" \
|
||||
-e "s/-Wstrict-aliasing=1//" \
|
||||
-e "s/-fvisibility=hidden//" \
|
||||
lib/Makefile \
|
||||
programs/Makefile \
|
||||
tests/Makefile \
|
||||
Makefile
|
||||
fi
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make -C lib $jobArgs
|
||||
@@ -75,3 +100,16 @@ INSTALL()
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
testTarget=test
|
||||
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
# gcc2 can't build all tests, so let's run the basic set only
|
||||
testTarget=check
|
||||
fi
|
||||
|
||||
LIBRARY_PATH="$sourceDir/libs${LIBRARY_PATH:+:$LIBRARY_PATH}" \
|
||||
make $testTarget
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: haiku patch
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index da485a1..42440b6 100644
|
||||
index 86613fd..4afd03f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -90,7 +90,7 @@ clean:
|
||||
@@ -89,7 +89,7 @@ clean:
|
||||
#-----------------------------------------------------------------------------
|
||||
# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -18,54 +18,23 @@ index da485a1..42440b6 100644
|
||||
|
||||
.PHONY: install uninstall
|
||||
diff --git a/lib/Makefile b/lib/Makefile
|
||||
index 9abb699..f44d999 100644
|
||||
index abb6c07..d2ce31d 100644
|
||||
--- a/lib/Makefile
|
||||
+++ b/lib/Makefile
|
||||
@@ -46,9 +46,7 @@ BUILD_STATIC:=yes
|
||||
|
||||
CPPFLAGS+= -DXXH_NAMESPACE=LZ4_
|
||||
CFLAGS ?= -O3
|
||||
-DEBUGFLAGS:= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
|
||||
- -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
|
||||
- -Wpointer-arith -Wstrict-aliasing=1
|
||||
+DEBUGFLAGS:= -Wall -Wshadow -Wstrict-prototypes -Wundef
|
||||
CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
|
||||
FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
@@ -96,7 +94,7 @@ ifneq (,$(filter Windows%,$(OS)))
|
||||
@$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o dll\$@.dll
|
||||
dlltool -D dll\liblz4.dll -d dll\liblz4.def -l dll\liblz4.lib
|
||||
else
|
||||
- @$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
|
||||
+ @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@
|
||||
@echo creating versioned links
|
||||
@ln -sf $@ liblz4.$(SHARED_EXT_MAJOR)
|
||||
@ln -sf $@ liblz4.$(SHARED_EXT)
|
||||
@@ -113,7 +111,7 @@ clean:
|
||||
@@ -123,7 +123,7 @@ clean:
|
||||
#-----------------------------------------------------------------------------
|
||||
# make install is validated only for Linux, OSX, BSD, Hurd and Solaris 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 convention prefers lowercase
|
||||
.PHONY: listL120
|
||||
listL120: # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (note : $$, for Makefile compatibility)
|
||||
diff --git a/programs/Makefile b/programs/Makefile
|
||||
index c7ef6d1..d1cabb0 100644
|
||||
index 72bdcaa..655efbc 100644
|
||||
--- a/programs/Makefile
|
||||
+++ b/programs/Makefile
|
||||
@@ -46,9 +46,7 @@ OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
|
||||
|
||||
CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
|
||||
CFLAGS ?= -O3
|
||||
-DEBUGFLAGS:=-Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow \
|
||||
- -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes \
|
||||
- -Wpointer-arith -Wstrict-aliasing=1
|
||||
+DEBUGFLAGS:=-Wall -Wundef -Wshadow -Wstrict-prototypes
|
||||
CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
|
||||
FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
@@ -109,7 +107,7 @@ clean:
|
||||
@@ -109,7 +109,7 @@ clean:
|
||||
#-----------------------------------------------------------------------------
|
||||
# make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -74,6 +43,19 @@ index c7ef6d1..d1cabb0 100644
|
||||
|
||||
unlz4: lz4
|
||||
ln -s lz4 unlz4
|
||||
diff --git a/tests/Makefile b/tests/Makefile
|
||||
index d238561..ac86c3e 100644
|
||||
--- a/tests/Makefile
|
||||
+++ b/tests/Makefile
|
||||
@@ -129,7 +129,7 @@ checkTag: checkTag.c $(LZ4DIR)/lz4.h
|
||||
#-----------------------------------------------------------------------------
|
||||
# validated only for Linux, OSX, BSD, Hurd and Solaris 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))
|
||||
|
||||
MD5:=md5sum
|
||||
ifneq (,$(filter $(shell uname), Darwin ))
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user