git: f42887e268b3 - main - x11-fonts/webfonts: Fix ClearType extraction with libarchive 3.8.9

From: Jimmy Olgeni <olgeni_at_FreeBSD.org>
Date: Mon, 05 Oct 2026 13:10:49 UTC
The branch main has been updated by olgeni:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f42887e268b3fb71e5559a729b894eacc6c9f42b

commit f42887e268b3fb71e5559a729b894eacc6c9f42b
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2026-10-05 12:57:30 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2026-10-05 13:10:11 +0000

    x11-fonts/webfonts: Fix ClearType extraction with libarchive 3.8.9
    
    Unpack ppviewer.cab to a file instead of piping it into a second bsdtar.
    libarchive 3.8.9 fails to skip entries of an LZX cabinet read from a
    stream and aborts with "LZX decompression failed (-25)", while the
    seekable path works on every version:
    
      https://github.com/libarchive/libarchive/issues/3542
    
    The fix is already upstream but is in no release yet, and main,
    stable/15 and stable/14 all carry 3.8.9.
    
    Extracting eula.txt now happens in the same pass over the outer cabinet.
    
    While here, move NO_WRKSUBDIR where portclippy wants it.
    
    PR:             299148
    Reported by:    KOT@MATPOCKuH.Ru
---
 x11-fonts/webfonts/Makefile | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/x11-fonts/webfonts/Makefile b/x11-fonts/webfonts/Makefile
index a300d2d206e9..75fcc2fb6157 100644
--- a/x11-fonts/webfonts/Makefile
+++ b/x11-fonts/webfonts/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	webfonts
 PORTVERSION=	0.30
-PORTREVISION=	14
+PORTREVISION=	15
 CATEGORIES=	x11-fonts
 MASTER_SITES=	SF/corefonts/the%20fonts/final:group1 \
 		ftp://ftp.botik.ru/rented/znamensk/distributions/ftp.vsu.ru/pub/tex/font-packs/mscore/:group1 \
@@ -28,12 +28,13 @@ USES=		fonts
 EXTRACT_AFTER_ARGS=	--include '*.[tT][tT][fF]' \
 			--no-same-owner --no-same-permissions
 
-NO_WRKSUBDIR=	yes
 NO_ARCH=	yes
 NO_BUILD=	yes
 
 SUB_FILES=	pkg-message
 
+NO_WRKSUBDIR=	yes
+
 OPTIONS_DEFINE=	EXTRAFONTS CLEARTYPE NEWVERDANA DOCS COMIC
 OPTIONS_DEFAULT=COMIC
 OPTIONS_SUB=	yes
@@ -48,10 +49,15 @@ EXTRAFONTS_DISTFILES=	IELPKTH.CAB:group2
 
 .include <bsd.port.options.mk>
 
+# ppviewer.cab is unpacked to a file rather than piped into a second bsdtar:
+# libarchive 3.8.9 cannot skip entries of an LZX cabinet read from a stream
+# (https://github.com/libarchive/libarchive/issues/3542), while the seekable
+# path works on every version.
 pre-extract-CLEARTYPE-on:
 	${MKDIR} ${EXTRACT_WRKDIR}
-	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${_DISTFILES:MPowerPointViewer*} --include eula.txt -C ${EXTRACT_WRKDIR} --no-same-owner --no-same-permissions
-	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${_DISTFILES:MPowerPointViewer*} -O --include ppviewer.cab | ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} - -C ${EXTRACT_WRKDIR} ${EXTRACT_AFTER_ARGS}
+	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${_DISTFILES:MPowerPointViewer*} -C ${EXTRACT_WRKDIR} --no-same-owner --no-same-permissions --include eula.txt --include ppviewer.cab
+	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKDIR}/ppviewer.cab -C ${EXTRACT_WRKDIR} ${EXTRACT_AFTER_ARGS}
+	${RM} ${EXTRACT_WRKDIR}/ppviewer.cab
 
 post-extract:
 	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${_DISTFILES:Mwebdin32*} --include *.TXT -C ${EXTRACT_WRKDIR} --no-same-owner --no-same-permissions