On 2023/01/16 15:30, Christian Weisgerber wrote:
> CVSROOT: /cvs
> Module name: ports
> Changes by: [email protected] 2023/01/16 15:30:55
>
> Modified files:
> archivers/xz : Makefile distinfo
> archivers/xz/patches: patch-config_h_in
> archivers/xz/pkg: DESCR
> Removed files:
> archivers/xz/patches: patch-src_xz_main_c
>
> Log message:
> archivers/xz: update to 5.4.1
>
> Significant changes:
> * threaded .xz decompressor
> * decompression support for the .lz (lzip) file format
> * upstream pledge(2) sandboxing
Would it make sense to switch lzip decompression to use this instead?
xz is much more widely used in ports, so this avoids having to install
an extra package as BDEP when you occasionally work on a port with lz
distfiles. (Also fixes a small bug where lz patch files don't work
unless the main distfile is .tar.lz).
I'm also wondering if we should add a way to pass user-defined flags to
xz; the new threaded decompressor saves a lot of clock time extracting
large xz files (including ports like chromium, firefox, texmf).
(use xz --decompress instead of xzdec, and add a new variable that the
user can set in mk.conf added to the command; -T0 to use all available
cores or use some specific other value).
Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1582
diff -u -p -r1.1582 bsd.port.mk
--- bsd.port.mk 9 Jan 2023 17:08:50 -0000 1.1582
+++ bsd.port.mk 17 Jan 2023 09:11:12 -0000
@@ -1366,20 +1366,17 @@ EXTRACT_CASES += *.zip) \
.endif
.if !empty(_LIST_EXTRACTED:M*.xz) || \
- !empty(_LIST_EXTRACTED:M*.lzma)
+ !empty(_LIST_EXTRACTED:M*.lzma) || \
+ !empty(_LIST_EXTRACTED:M*.lz)
BUILD_DEPENDS += archivers/xz
EXTRACT_CASES += *.tar.xz) \
xzdec <${FULLDISTDIR}/$$archive | ${TAR} -xf - -- ${EXTRACT_FILES};;
EXTRACT_CASES += *.tar.lzma) \
lzmadec <${FULLDISTDIR}/$$archive | ${TAR} -xf - -- ${EXTRACT_FILES};;
-.endif
-
-.if !empty(_LIST_EXTRACTED:M*.tar.lz)
-BUILD_DEPENDS += archivers/lzip/lunzip
EXTRACT_CASES += *.tar.lz) \
- lunzip <${FULLDISTDIR}/$$archive | ${TAR} -xf - -- ${EXTRACT_FILES};;
+ xz --format=lzip --decompress <${FULLDISTDIR}/$$archive | ${TAR} -xf -
-- ${EXTRACT_FILES};;
PATCH_CASES += *.lz) \
- lunzip <$$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
+ xz --format=lzip --decompress <$$patchfile | ${PATCH}
${PATCH_DIST_ARGS};;
.endif
.if !empty(_LIST_EXTRACTED:M*.bz2) || \