git: 9942b0aef604 - main - archivers/liblz4: revert switch to meson
Date: Sun, 02 Nov 2025 09:39:54 UTC
The branch main has been updated by mandree:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9942b0aef6049d260a451b255faf4cadeb44b7b0
commit 9942b0aef6049d260a451b255faf4cadeb44b7b0
Author: Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-11-02 09:24:36 +0000
Commit: Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-11-02 09:37:50 +0000
archivers/liblz4: revert switch to meson
This partially reverts commit 7d6061f15551dcde40cf70fd743d631095360a23
made in the year 2020.
Reason: lang/python314 newly depends on archivers/zstd,
which depends on archivers/liblz4, so neither of the latter two
can use any Python to build lest we create a circular dependency
when Python 3.14 is made the default.
Note: make-based builds remain the documented way
to build/test lz4 1.10.0 in their primary documentation.
Note also that the meson build installed one file less than the
make-based build, which gets re-added, hence bumping PORTREVISION.
PR: 251183
PR: 290732
Approved by: portmgr@ (just-fix-it blanket)
---
archivers/liblz4/Makefile | 41 +++++++++-------------
.../liblz4/files/patch-meson-programs-meson.build | 24 -------------
archivers/liblz4/pkg-plist | 1 +
3 files changed, 18 insertions(+), 48 deletions(-)
diff --git a/archivers/liblz4/Makefile b/archivers/liblz4/Makefile
index 857fe6dfecc1..679868ef0d64 100644
--- a/archivers/liblz4/Makefile
+++ b/archivers/liblz4/Makefile
@@ -1,5 +1,6 @@
PORTNAME= lz4
PORTVERSION= 1.10.0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= archivers
MASTER_SITES= https://github.com/lz4/lz4/releases/download/v${PORTVERSION}/
@@ -12,37 +13,29 @@ WWW= https://lz4.org/ \
LICENSE= BSD2CLAUSE GPLv2
LICENSE_COMB= multi
-LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/../../lib/LICENSE
-LICENSE_FILE_GPLv2= ${WRKSRC}/../../programs/COPYING
-
-USES= cpe meson pkgconfig python:build
-
-MESON_ARGS= --default-library=both \
- -Dalign-test=true \
- -Dcontrib=false \
- -Ddebug-level=1 \
- -Ddistance-max=65535 \
- -Denable_multithread=true \
- -Dexamples=false \
- -Dfast-dec-loop='auto' \
- -Dforce-sw-bitcount=false \
- -Dfreestanding=false \
- -Dmemory-usage=0 \
- -Dossfuzz=true \
- -Dprograms=true \
- -Dunstable=false \
- -Duser-memory-functions=false
+LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/lib/LICENSE
+LICENSE_FILE_GPLv2= ${WRKSRC}/programs/COPYING
+
+# Note this port is in the dependency chain of lang/python314
+# via archivers/zstd and cannot use meson or python to build
+USES= cpe gmake pkgconfig
+CPE_VENDOR= lz4_project
USE_LDCONFIG= yes
-WRKSRC_SUBDIR= build/meson
-PLIST_SUB= PORTVERSION=${PORTVERSION}
+MAKE_ARGS= PREFIX="${PREFIX}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ MANDIR="${PREFIX}/share/man"
+MAKE_ENV+= TARGET_ARCH=
-CPE_VENDOR= lz4_project
+TEST_TARGET= check
PORTSCOUT= limit:^[0-9]*\.
+PLIST_SUB= PORTVERSION=${PORTVERSION}
+
OPTIONS_DEFINE= TEST
+TEST_DESC= Run complete tests
-TEST_MESON_TRUE= tests
+TEST_TEST_TARGET=test
.include <bsd.port.mk>
diff --git a/archivers/liblz4/files/patch-meson-programs-meson.build b/archivers/liblz4/files/patch-meson-programs-meson.build
deleted file mode 100644
index 1e04f406f8fc..000000000000
--- a/archivers/liblz4/files/patch-meson-programs-meson.build
+++ /dev/null
@@ -1,24 +0,0 @@
---- meson/programs/meson.build.orig 2024-07-21 17:29:49 UTC
-+++ meson/programs/meson.build
-@@ -49,8 +49,8 @@ lz4cat = custom_target(
- output: 'lz4cat',
- command: [
- 'ln',
-- '--symbolic',
-- '--force',
-+ '-s',
-+ '-f',
- fs.name(lz4.full_path()),
- '@OUTPUT@'
- ]
-@@ -62,8 +62,8 @@ unlz4 = custom_target(
- output: 'unlz4',
- command: [
- 'ln',
-- '--symbolic',
-- '--force',
-+ '-s',
-+ '-f',
- fs.name(lz4.full_path()),
- '@OUTPUT@'
- ]
diff --git a/archivers/liblz4/pkg-plist b/archivers/liblz4/pkg-plist
index 9b7308e7d257..782d464e1133 100644
--- a/archivers/liblz4/pkg-plist
+++ b/archivers/liblz4/pkg-plist
@@ -3,6 +3,7 @@ bin/lz4c
bin/lz4cat
bin/unlz4
include/lz4.h
+include/lz4file.h
include/lz4frame.h
include/lz4frame_static.h
include/lz4hc.h