On Tue, Jan 17, 2023 at 04:10:19PM +0100, Christian Weisgerber wrote:
> But yes, I wanted to make more or less the same suggestions.
> * Now that upstream supports pledge(), switch from xzdec to xz.
> * Enable threaded decompression: use ${MAKE_JOBS} threads.
> * Also use xz for .lz files.
> 
> Patch below.

OK kn

> This also drops support for lz-compressed patch files, because
> there aren't any.  We never added support for xz-compressed patch
> files, because we never encountered any.  If the need arises,
> it will be trivial to add.

Agreed.

> 
> ok?
> 
> 
> Index: infrastructure/mk/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
> --- infrastructure/mk/bsd.port.mk     9 Jan 2023 17:08:50 -0000       1.1582
> +++ infrastructure/mk/bsd.port.mk     17 Jan 2023 14:15:32 -0000
> @@ -1366,20 +1366,11 @@ EXTRACT_CASES += *.zip) \
>  .endif
>  
>  .if !empty(_LIST_EXTRACTED:M*.xz) || \
> -     !empty(_LIST_EXTRACTED:M*.lzma)
> -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};;
> -PATCH_CASES += *.lz) \
> -     lunzip <$$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
> +     !empty(_LIST_EXTRACTED:M*.lzma) || \
> +     !empty(_LIST_EXTRACTED:M*.tar.lz)
> +BUILD_DEPENDS += archivers/xz>=5.4.0
> +EXTRACT_CASES += *.tar.xz|*.tar.lzma|*.tar.lz) \
> +     xz -T${MAKE_JOBS} -d <${FULLDISTDIR}/$$archive | ${TAR} -xf - -- 
> ${EXTRACT_FILES};;
>  .endif
>  
>  .if !empty(_LIST_EXTRACTED:M*.bz2) || \
> -- 
> Christian "naddy" Weisgerber                          [email protected]
> 

Reply via email to