From ac939cb9f077c44de8676c77daef6a45152a5ce67b7b87784f783a1bb838cb66 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 25 Aug 2017 14:19:22 +0000 Subject: [PATCH] - Update to new upstream release 1.8.0 OBS-URL: https://build.opensuse.org/package/show/Archiving/lz4?expand=0&rev=31 --- lz-export.diff | 21 +++++++++++++++++++++ lz4-use-shlib.diff | 37 +++++++++++++++---------------------- lz4.changes | 20 ++++++++++++++++++++ lz4.spec | 15 ++++++++++----- v1.7.5.tar.gz | 3 --- v1.8.0.tar.gz | 3 +++ 6 files changed, 69 insertions(+), 30 deletions(-) create mode 100644 lz-export.diff delete mode 100644 v1.7.5.tar.gz create mode 100644 v1.8.0.tar.gz diff --git a/lz-export.diff b/lz-export.diff new file mode 100644 index 0000000..85a5334 --- /dev/null +++ b/lz-export.diff @@ -0,0 +1,21 @@ + +[ 9s] bench.o: In function `BMK_benchMem': +[ 9s] /home/abuild/rpmbuild/BUILD/lz4-1.8.0/programs/bench.c:221: undefined reference to `LZ4_XXH64' + +--- + lib/xxhash.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: lz4-1.8.0/lib/xxhash.h +=================================================================== +--- lz4-1.8.0.orig/lib/xxhash.h ++++ lz4-1.8.0/lib/xxhash.h +@@ -105,7 +105,7 @@ typedef enum { XXH_OK=0, XXH_ERROR } XXH + # define XXH_PUBLIC_API static /* this version may generate warnings for unused static functions; disable the relevant warning */ + # endif + #else +-# define XXH_PUBLIC_API /* do nothing */ ++# define XXH_PUBLIC_API __attribute__((visibility("default"))) /* do nothing */ + #endif /* XXH_PRIVATE_API */ + + /*!XXH_NAMESPACE, aka Namespace Emulation : diff --git a/lz4-use-shlib.diff b/lz4-use-shlib.diff index 3b4f12b..3972670 100644 --- a/lz4-use-shlib.diff +++ b/lz4-use-shlib.diff @@ -5,43 +5,36 @@ References: https://github.com/Cyan4973/lz4/pull/195 build: make programs use liblz too instead of duplicating object code. --- - programs/Makefile | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + programs/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -Index: lz4-1.7.5/programs/Makefile +Index: lz4-1.8.0/programs/Makefile =================================================================== ---- lz4-1.7.5.orig/programs/Makefile -+++ lz4-1.7.5/programs/Makefile -@@ -40,7 +40,7 @@ LIBVER := $(shell echo $(LIBVER_SCRIPT) - - LZ4DIR := ../lib +--- lz4-1.8.0.orig/programs/Makefile ++++ lz4-1.8.0/programs/Makefile +@@ -41,7 +41,7 @@ LIBVER_MINOR := $(shell echo $(LIBVER_MI + LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) + LIBVER := $(shell echo $(LIBVER_SCRIPT)) -SRCFILES := $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c) +SRCFILES := $(wildcard *.c) OBJFILES := $(patsubst %.c,%.o,$(SRCFILES)) - CPPFLAGS+= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -@@ -75,19 +75,19 @@ all32: CFLAGS+=-m32 + CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ +@@ -76,14 +76,14 @@ all32: CFLAGS+=-m32 all32: all - lz4: CFLAGS += $(DEBUGFLAGS) --lz4: $(OBJFILES) + lz4: $(OBJFILES) - $(CC) $(FLAGS) $^ -o $@$(EXT) -+lz4: $(SRCFILES) + $(CC) $(FLAGS) $^ -o $@$(EXT) -L${LZ4DIR} -llz4 lz4-release: DEBUGFLAGS= lz4-release: lz4 - lz4c : CFLAGS += $(DEBUGFLAGS) - lz4c : $(SRCFILES) -- $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) -+ $(CC) $(FLAGS) -DENABLE_LZ4C_LEGACY_OPTIONS $^ -o $@$(EXT) -L${LZ4DIR} -llz4 - - lz4c32: CFLAGS += -m32 $(DEBUGFLAGS) - lz4c32: $(SRCFILES) + lz4c32: CFLAGS += -m32 + lz4c32 : $(SRCFILES) - $(CC) $(FLAGS) $^ -o $@$(EXT) + $(CC) $(FLAGS) $^ -o $@$(EXT) -L${LZ4DIR} -llz4 - clean: - @$(MAKE) -C $(LZ4DIR) $@ > $(VOID) + lz4c: lz4 + ln -s lz4 lz4c diff --git a/lz4.changes b/lz4.changes index a8e4e1a..2432a33 100644 --- a/lz4.changes +++ b/lz4.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Aug 25 13:59:49 UTC 2017 - jengelh@inai.de + +- Update to new upstream release 1.8.0 + * cli: fix: do not modify /dev/null's permissions. + * cli: added POSIX separator "--" for specifying that all + following arguments are non-options. + * cli: restored -BX command enabling block checksum. + * API: added LZ4_compress_HC_destSize() and + LZ4F_resetDecompressionContext(). + * API: lz4frame: negative compression levels trigger fast + acceleration. + * API: lz4frame: ability to control block checksum and + dictionary ID. + * API: fix: expose obsolete decoding functions + * API: experimental: lz4frame_static.h: + new dictionary compression API + * doc: Updated LZ4 Frame format to v1.6.0, restoring + Dictionary ID field in header. + ------------------------------------------------------------------- Tue Aug 15 17:35:16 UTC 2017 - ddiss@suse.com diff --git a/lz4.spec b/lz4.spec index 2532ee1..42b1467 100644 --- a/lz4.spec +++ b/lz4.spec @@ -18,16 +18,18 @@ Name: lz4 %define lname liblz4-1 -Version: 1.7.5 +Version: 1.8.0 Release: 0 Summary: Hash-based Predictive Lempel–Ziv compressor License: GPL-2.0+ and BSD-2-Clause Group: Productivity/Archiving/Compression Url: http://lz4.org/ -Source: https://github.com/lz4/lz4/archive/v%{version}.tar.gz +#Git-Clone: https://github.com/lz4/lz4 +Source: https://github.com/lz4/lz4/archive/v%version.tar.gz Source99: baselibs.conf Patch1: lz4-use-shlib.diff +Patch2: lz-export.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkg-config @@ -68,7 +70,7 @@ applications that want to make use of liblz4. %prep %setup -q -%patch -P 1 -p1 +%patch -P 1 -P 2 -p1 %build # Goddammit, lz4 @@ -76,9 +78,12 @@ perl -i -pe 's{^\t@}{\t}g' Makefile */Makefile # don't bother building here, because make install builds it again - unconditionally :-( %install -make install CFLAGS="%optflags -DXXH_NAMESPACE=LZ4_" \ - DESTDIR="%buildroot" PREFIX="%_prefix" LIBDIR="%_libdir" +make install CFLAGS="%optflags" DESTDIR="%buildroot" \ + PREFIX="%_prefix" LIBDIR="%_libdir" rm -f "%buildroot/%_libdir"/*.a +mkdir -p "%buildroot/%_mandir/man1" +# duh, it was right in 1.7.5 +mv "%buildroot/%_mandir"/*.1 "%buildroot/%_mandir/man1/" %check LD_LIBRARY_PATH="%buildroot/%_libdir" ldd -r "%buildroot/%_bindir/lz4" diff --git a/v1.7.5.tar.gz b/v1.7.5.tar.gz deleted file mode 100644 index 37b2d06..0000000 --- a/v1.7.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0190cacd63022ccb86f44fa5041dc6c3804407ad61550ca21c382827319e7e7e -size 208019 diff --git a/v1.8.0.tar.gz b/v1.8.0.tar.gz new file mode 100644 index 0000000..558608e --- /dev/null +++ b/v1.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ca482ea7a9bb103603108b5a7510b7592b90158c151ff50a28f1ca8389fccf6 +size 222840