pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/archivers/lz4



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Nov  9 14:20:58 UTC 2026

Modified Files:
        pkgsrc/archivers/lz4: Makefile distinfo
        pkgsrc/archivers/lz4/patches: patch-lib_Makefile
            patch-programs_Makefile
Added Files:
        pkgsrc/archivers/lz4/patches: patch-build_make_lz4defs.make
Removed Files:
        pkgsrc/archivers/lz4/patches: patch-Makefile.inc

Log Message:
lz4: update to 1.11.0.

Note: this includes files for other build systems like cmake or meson;
we should consider switching to one of them to avoid our libtoolization patches.

v1.11.0
fix  : data corruption in valid usage : ring buffer decoding (`LZ4_decoderRingBufferSize()`, since v1.9.0), rare cases of streaming or `destSize` compression, one reported by @freedom-winds
fix  : single-thread `lz4` could truncate the decoding of concatenated frames with block checksums
fix  : multithreaded decompression could write out of bounds after 2^31 frames (since v1.10.0), by @arshsmith1
fix  : `LZ4F_compressBegin_usingDict()` ignored the dictionary with independent blocks
fix  : some periodic data compressed up to 30x worse at fast levels, and very slowly at level 12, reported by @martinus
fix  : invalid arguments (negative sizes, `NULL`, invalid `blockSizeID`, extreme levels) no longer crash nor overflow, by @arthuz-th, @jaypatrickhoward, @louislafosse, @akashdeshmukh-git, @rinsuki
fix  : lz4file reports truncated files and write failures, and accepts files < 19 bytes, by @axiqia
perf : faster decompression on aarch64 and x86-64 (up to +19%, +4% on silesia.tar), `LZ4_FAST_DEC_LOOP` on aarch64 with clang and on riscv64, by @Nicoshev and @arpadpanyik-arm
perf : faster compression of small blocks at fast levels, with reused states (up to +80%) or dictionaries (up to +35%), partly proposed by @BiplabRaut
perf : faster levels 11 and 12 (+8% to +27%), level 2 compresses ~0.8% better
perf : x86 builds avoid the JCC erratum : up to +12% compression and +31% decompression on Intel Skylake-family cpus
api  : multithreaded lz4frame compression (experimental `LZ4F_preferences_t.nbWorkers`) : output independent of the nb of workers and of the context's history
api  : random access within frames and lz4 files : `LZ4F_resumeFrame()`, `LZ4F_seek()`, `LZ4F_tell()` (static)
api  : `LZ4_decompress_safe()` returns distinct error codes : `-1` malformed input, `-2` `dstCapacity` too small, `-3` missing dictionary
api  : lz4frame compression accepts any `dstCapacity`, and only fails if the output doesn't fit
api  : removed from headers : functions deprecated since v1.7.x / v1.8.0 (still exported by liblz4), unprefixed lz4frame enums ; `LZ4_resetStream()` and `LZ4_resetStreamHC()` are deprecated
api  : `LZ4F_compressOptions_t` must be zero-initialized ; reserved fields are scalars (flatten positional initializers) ; `LZ4F_uncompressedUpdate()` deprecated (use `.uncompressed`)
api  : custom allocators for lz4file (`_advanced()` functions), `LZ4_USER_MEMORY_FUNCTIONS` also for lz4frame and lz4file ; `LZ4F_cctx_size()` and `LZ4F_dctx_size()` by @felixhandte
api  : HC states include the buffer of levels 10+ (+64 KB per state) : no allocation during compression
cli  : multithreaded compression relies on liblz4 : same output with any nb of threads and without multithreading support ; `-T#` within a memory budget (`--memory=#`) ; new `--single-thread`
cli  : decodes Firefox's mozlz4 files, proposed by @UnitedMarsupials, and legacy frames with the Linux kernel end marker, requested by @benjarobin (frame format documentation by @Artoria2e5)
cli  : safer file handling : an output identical to the input is refused, a source modified during compression is detected, `--rm` keeps the source after failures, by @Furan666, @Nexory and 
@immanuwell
cli  : benchmark (`-b`) measures frames, compressed as `lz4` does with the same options
cli  : various fixes (`--list`, legacy format, benchmark, `-t -m`, numeric arguments), by @tansy, @jmestwa-coder, @akashdeshmukh-git, @arshsmith1, @jlee303 and @Nexory
build: dynamic library multithreaded by default, static library single-threaded ; cmake `lz4` multithreaded
build: cmake : exported `lz4::lz4` target by @dg0yt, CMake 4 support by @GeorgH93, `CMAKE_POSITION_INDEPENDENT_CODE` by @ds-sloth
build: cmake : as a subproject, the `lz4` program is no longer built by default (`-DLZ4_BUILD_CLI=ON` restores it), by @crueter
build: reproducible static library by @rpurdie, AIX support by @shubhamhii, meson fixes by @grobian, @bgilbert and @eli-schwartz, other fixes by @hotschmoe, @iwamatsu, @doraorak, @JCash and @brainy
port : RISC-V with `Zicclsm` uses unaligned memory accesses, by @Polaris-911


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 pkgsrc/archivers/lz4/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/archivers/lz4/distinfo
cvs rdiff -u -r1.2 -r0 pkgsrc/archivers/lz4/patches/patch-Makefile.inc
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/archivers/lz4/patches/patch-build_make_lz4defs.make
cvs rdiff -u -r1.13 -r1.14 pkgsrc/archivers/lz4/patches/patch-lib_Makefile
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/lz4/patches/patch-programs_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/archivers/lz4/Makefile
diff -u pkgsrc/archivers/lz4/Makefile:1.29 pkgsrc/archivers/lz4/Makefile:1.30
--- pkgsrc/archivers/lz4/Makefile:1.29  Tue Jul 23 06:22:37 2024
+++ pkgsrc/archivers/lz4/Makefile       Mon Nov  9 14:20:58 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.29 2024/07/23 06:22:37 adam Exp $
+# $NetBSD: Makefile,v 1.30 2026/11/09 14:20:58 wiz Exp $
 
-DISTNAME=      lz4-1.10.0
+DISTNAME=      lz4-1.11.0
 CATEGORIES=    archivers
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=lz4/}
 GITHUB_RELEASE=        v${PKGVERSION_NOREV}
@@ -20,7 +20,4 @@ TEST_TARGET=          test
 
 MAKE_FLAGS+=           PKGCONFIGDIR=${PREFIX}/lib/pkgconfig
 
-# Needed for nanosleep() on Solaris 10, PR pkg/56226
-LDFLAGS.SunOS+=                -lrt
-
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/archivers/lz4/distinfo
diff -u pkgsrc/archivers/lz4/distinfo:1.27 pkgsrc/archivers/lz4/distinfo:1.28
--- pkgsrc/archivers/lz4/distinfo:1.27  Tue Jul 23 06:22:37 2024
+++ pkgsrc/archivers/lz4/distinfo       Mon Nov  9 14:20:58 2026
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.27 2024/07/23 06:22:37 adam Exp $
+$NetBSD: distinfo,v 1.28 2026/11/09 14:20:58 wiz Exp $
 
-BLAKE2s (lz4-1.10.0.tar.gz) = 808c7e29e470bced688f9c8f965518b4eb2ead74521cf6f79f1699593d756fca
-SHA512 (lz4-1.10.0.tar.gz) = 8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28
-Size (lz4-1.10.0.tar.gz) = 387114 bytes
-SHA1 (patch-Makefile.inc) = 7f27fb9d4cde9c14623c8fce167990bec0332161
-SHA1 (patch-lib_Makefile) = 1e43f41313a7f600a828d212e1bd4920fdc62920
-SHA1 (patch-programs_Makefile) = 572e70b467fe6566f4898d3cf0b660ee72f589a1
+BLAKE2s (lz4-1.11.0.tar.gz) = 8cfee74d286995f4a076c4442320899603bdca6771691089f5a95b6d412e3788
+SHA512 (lz4-1.11.0.tar.gz) = 5638a9ca76f333bea718b457588eadafd8dddbc4c8afcd8e21992805afff7af283283642558e52d1f1d4655dbe26f2aa85fa89dc365041ca621baf79c552f364
+Size (lz4-1.11.0.tar.gz) = 545646 bytes
+SHA1 (patch-build_make_lz4defs.make) = 27d09bfa241c00c0376d52fbdaa2e019c7f1d0c8
+SHA1 (patch-lib_Makefile) = 13f9aaf15f7f0ab8c0bd5386d24a300c4c2b8318
+SHA1 (patch-programs_Makefile) = 50051e64489836066581693d8ed2c2cf9f662d8a

Index: pkgsrc/archivers/lz4/patches/patch-lib_Makefile
diff -u pkgsrc/archivers/lz4/patches/patch-lib_Makefile:1.13 pkgsrc/archivers/lz4/patches/patch-lib_Makefile:1.14
--- pkgsrc/archivers/lz4/patches/patch-lib_Makefile:1.13        Tue Jul 23 06:22:37 2024
+++ pkgsrc/archivers/lz4/patches/patch-lib_Makefile     Mon Nov  9 14:20:58 2026
@@ -1,9 +1,9 @@
-$NetBSD: patch-lib_Makefile,v 1.13 2024/07/23 06:22:37 adam Exp $
+$NetBSD: patch-lib_Makefile,v 1.14 2026/11/09 14:20:58 wiz Exp $
 
 Make portable (inc. libtoolize).
 Unlock install target. Use pkgsrc install scripts.
 
---- lib/Makefile.orig  2024-07-21 17:29:49.000000000 +0000
+--- lib/Makefile.orig  2026-11-04 00:58:16.000000000 +0000
 +++ lib/Makefile
 @@ -34,9 +34,9 @@
  SED ?= sed
@@ -18,74 +18,65 @@ Unlock install target. Use pkgsrc instal
  LIBVER_SCRIPT:= $(LIBVER_MAJOR_SCRIPT).$(LIBVER_MINOR_SCRIPT).$(LIBVER_PATCH_SCRIPT)
  LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT))
  LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT))
-@@ -55,6 +55,7 @@ CFLAGS   = $(DEBUGFLAGS) $(USERCFLAGS)
- ALLFLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+@@ -59,6 +59,7 @@
  
  SRCFILES := $(sort $(wildcard *.c))
-+OBJFILES := $(patsubst %.c,%.lo,$(SRCFILES))
+ OBJFILES = $(SRCFILES:.c=.o)
++LIBTOOL_OBJS := $(patsubst %.c,%.lo,$(SRCFILES))
  
- include ../Makefile.inc
+ include ../build/make/lz4defs.make
  
-@@ -97,11 +98,15 @@ all: lib liblz4.pc
- all32: CFLAGS+=-m32
+@@ -168,11 +169,18 @@
+ all32: MCM_CFLAGS += -m32
  all32: all
  
 +.SUFFIXES: .lo
 +.c.lo:
-+      $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@
++      $(LIBTOOL) --mode=compile --tag=CC $(CC) $(MCM_CPPFLAGS) $(CPPFLAGS) $(MCM_CFLAGS) $(CFLAGS) -c $^ -o $@
 +
 +
- CLEAN += liblz4.a
--liblz4.a: $(SRCFILES)
-+liblz4.a: $(OBJFILES)
- ifeq ($(BUILD_STATIC),yes)  # can be disabled on command line
-       @echo compiling static library
--      $(COMPILE.c) $^
-       $(AR) rcs $@ *.o
+ # multi-threading flags are part of the objects' cache key (last argument)
+ liblz4.a: MCM_CPPFLAGS += $(STATICLIB_MT_FLAGS)
+ liblz4.a: ARFLAGS = rcs
+ ifeq ($(BUILD_STATIC),yes)
+-$(eval $(call static_library,liblz4.a,$(OBJFILES),,,$(STATICLIB_MT_FLAGS)))
++liblz4.a: $(LIBTOOL_OBJS)
++      @echo compiling static library
++      $(AR) rcs $@ *.o
  endif
  
-@@ -128,29 +133,26 @@ $(LIBLZ4): $(SRCFILES) liblz4-dll.o
+ ifeq ($(WINBASED),yes)
+@@ -200,12 +208,11 @@
  
  else   # not windows
  
--$(LIBLZ4): $(SRCFILES)
-+liblz4.la: $(OBJFILES)
-   ifeq ($(BUILD_SHARED),yes)
-       @echo compiling dynamic library $(LIBVER)
--      $(CC) $(ALLFLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
--      @echo creating versioned links
--      $(LN_SF) $@ liblz4.$(SHARED_EXT_MAJOR)
--      $(LN_SF) $@ liblz4.$(SHARED_EXT)
+-$(LIBLZ4): MCM_CPPFLAGS += $(DYNLIB_MT_FLAGS)
+-$(LIBLZ4): MCM_CFLAGS += -fPIC -fvisibility=hidden  # only API functions (LZ4LIB_API, LZ4FLIB_API) are exported
+-$(LIBLZ4): MCM_LDFLAGS += $(SONAME_FLAGS) $(filter -pthread,$(DYNLIB_MT_FLAGS))
+-ifeq ($(BUILD_SHARED),yes)
+-$(eval $(call c_dynamic_library,$(LIBLZ4),$(OBJFILES),,echo "$(LIBLZ4) created $(DYNLIB_MT_MSG)",$(DYNLIB_MT_FLAGS)))
+-endif
++liblz4.la: $(LIBTOOL_OBJS)
++  ifeq ($(BUILD_SHARED),yes)
++      @echo compiling dynamic library $(LIBVER)
 +      $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -rpath $(PREFIX)/lib -version-info $(LIBVER_MAJOR):0 $^ -o $@
-   endif
++  endif
  
  endif
- CLEAN += $(LIBLZ4)
+ 
+@@ -219,7 +226,7 @@
+       $(LN_SF) $< $@
  
  .PHONY: liblz4
--liblz4: $(LIBLZ4)
+-liblz4: $(LIBLZ4) liblz4.$(SHARED_EXT_MAJOR) liblz4.$(SHARED_EXT)
 +liblz4: liblz4.la
  
- CLEAN += liblz4.pc
- liblz4.pc: liblz4.pc.in Makefile
-       @echo creating pkgconfig
--      $(SED) -e 's|@PREFIX@|$(prefix)|' \
--           -e 's|@LIBDIR@|$(libdir)|' \
--           -e 's|@INCLUDEDIR@|$(includedir)|' \
--           -e 's|@VERSION@|$(LIBVER)|' \
--           -e 's|=${prefix}/|=$${prefix}/|' \
-+      $(SED) -e 's|@PREFIX@|$(prefix)|g' \
-+           -e 's|@LIBDIR@|$(libdir)|g' \
-+           -e 's|@INCLUDEDIR@|$(includedir)|g' \
-+           -e 's|@VERSION@|$(LIBVER)|g' \
-+           -e 's|=${prefix}/|=$${prefix}/|g' \
-            $< >$@
+ else
  
- .PHONY: clean
-@@ -195,13 +197,13 @@ pkgconfigdir ?= $(PKGCONFIGDIR)
- 
- .PHONY: install
- install: lib liblz4.pc
+@@ -298,13 +305,13 @@
+       [ -e $(LIBLZ4) ] || $(MAKE) liblz4
+   endif
+       $(MAKE) liblz4.pc PC_LIBS_PRIVATE="$(if $(filter yes,$(BUILD_STATIC)),$$($(PC_THREADS_SH)))"
 -      $(MAKE_DIR) $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(includedir)/ $(DESTDIR)$(libdir)/ $(DESTDIR)$(bindir)/
 -      $(INSTALL_DATA) liblz4.pc $(DESTDIR)$(pkgconfigdir)/
 +      $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(pkgconfigdir)/ $(DESTDIR)$(includedir)/ $(DESTDIR)$(libdir)/ $(DESTDIR)$(bindir)/
@@ -101,7 +92,7 @@ Unlock install target. Use pkgsrc instal
    endif
    ifeq ($(BUILD_SHARED),yes)
  # Traditionally, one installs the DLLs in the bin directory as programs
-@@ -211,15 +213,13 @@ install: lib liblz4.pc
+@@ -314,15 +321,13 @@
        $(INSTALL_PROGRAM) $(LIBLZ4) $(DESTDIR)$(bindir)
        $(INSTALL_PROGRAM) $(LIBLZ4_EXP) $(DESTDIR)$(libdir)
      else

Index: pkgsrc/archivers/lz4/patches/patch-programs_Makefile
diff -u pkgsrc/archivers/lz4/patches/patch-programs_Makefile:1.14 pkgsrc/archivers/lz4/patches/patch-programs_Makefile:1.15
--- pkgsrc/archivers/lz4/patches/patch-programs_Makefile:1.14   Tue Jul 23 06:22:37 2024
+++ pkgsrc/archivers/lz4/patches/patch-programs_Makefile        Mon Nov  9 14:20:58 2026
@@ -1,22 +1,24 @@
-$NetBSD: patch-programs_Makefile,v 1.14 2024/07/23 06:22:37 adam Exp $
+$NetBSD: patch-programs_Makefile,v 1.15 2026/11/09 14:20:58 wiz Exp $
 
-Remove OS_VERSION as it is defined by pkgsrc, and causes "No such file or directory" message.
-Unlock install target. Use pkgsrc install scripts.
+Avoid conflict with OS_VERSION (defined by pkgsrc).
+Use pkgsrc install scripts.
 
---- programs/Makefile.orig     2024-07-21 17:29:49.000000000 +0000
+--- programs/Makefile.orig     2026-11-04 00:58:16.000000000 +0000
 +++ programs/Makefile
-@@ -55,10 +55,6 @@ CPPFLAGS += -I$(LIBDIR) -DXXH_NAMESPACE=
+@@ -56,10 +56,10 @@
  
- include ../Makefile.inc
+ include ../build/make/lz4defs.make
  
 -OS_VERSION ?= $(UNAME) -r
 -ifeq ($(TARGET_OS)$(shell $(OS_VERSION)),SunOS5.10)
--LDFLAGS  += -lrt
--endif
++LZ4OS_VERSION ?= $(UNAME) -r
++ifeq ($(TARGET_OS)$(shell $(LZ4OS_VERSION)),SunOS5.10)
+ LDFLAGS  += -lrt
+ endif
  
- ALLFLAGS  = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ ALLFLAGS  = $(MCM_CFLAGS) $(CFLAGS) $(MCM_CPPFLAGS) $(CPPFLAGS) $(MCM_LDFLAGS) $(LDFLAGS)
  
-@@ -201,7 +197,7 @@ BINDIR      ?= $(exec_prefix)/bin
+@@ -213,7 +213,7 @@
  bindir      ?= $(BINDIR)
  DATAROOTDIR ?= $(prefix)/share
  datarootdir ?= $(DATAROOTDIR)
@@ -25,7 +27,7 @@ Unlock install target. Use pkgsrc instal
  mandir      ?= $(MANDIR)
  MAN1DIR     ?= $(mandir)/man1
  man1dir     ?= $(MAN1DIR)
-@@ -209,13 +205,13 @@ man1dir     ?= $(MAN1DIR)
+@@ -221,13 +221,13 @@
  .PHONY: install
  install: lz4
        @echo Installing binaries in $(DESTDIR)$(bindir)

Added files:

Index: pkgsrc/archivers/lz4/patches/patch-build_make_lz4defs.make
diff -u /dev/null pkgsrc/archivers/lz4/patches/patch-build_make_lz4defs.make:1.1
--- /dev/null   Mon Nov  9 14:20:58 2026
+++ pkgsrc/archivers/lz4/patches/patch-build_make_lz4defs.make  Mon Nov  9 14:20:58 2026
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_make_lz4defs.make,v 1.1 2026/11/09 14:20:58 wiz Exp $
+
+Unlock install target.
+
+--- build/make/lz4defs.make.orig       2026-11-04 00:58:16.000000000 +0000
++++ build/make/lz4defs.make
+@@ -122,11 +122,7 @@
+ JCC_FLAGS = $(eval JCC_FLAGS := $(JCC_PROBE))$(JCC_FLAGS)
+ endif
+ 
+-ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS% AIX,$(shell $(UNAME))))
+ POSIX_ENV = Yes
+-else
+-POSIX_ENV = No
+-endif
+ 
+ # Avoid symlinks when targeting Windows or building on a Windows host
+ ifeq ($(WINBASED),yes)



Home | Main Index | Thread Index | Old Index