Download raw body.
[llvm22] update x11/tkhtml to Alpha17 and fix build
On Mon, Jun 08, 2026 at 10:57:13PM +0200, Matthieu Herrb wrote:
> Hi,
>
> tkhtml has an Alpha17 version, according to AUR:
> https://aur.archlinux.org/packages/tkhtml
>
> Update to that version and fix remaining issues with llvm22
>
> (A better way to handle DISTNAME/PKGNAME/SITE is welcome if
> any)
>
> ok, suggestions ?
>
Or remove it, as nothing depends on it... ? ok ?
> Index: Makefile
> ===================================================================
> RCS file: /local/cvs/ports/x11/tkhtml/Makefile,v
> diff -u -p -u -r1.15 Makefile
> --- Makefile 17 May 2026 19:23:41 -0000 1.15
> +++ Makefile 8 Jun 2026 20:54:15 -0000
> @@ -1,11 +1,11 @@
> COMMENT = Tk widget to display HTML/CSS formatted contents
>
> -REVISION = 2
> -DISTNAME = tkhtml3-alpha-16
> -PKGNAME = ${DISTNAME:S/3-alpha-/-3a/}
> +V = 17
> +DISTNAME = Alpha-$V
> +PKGNAME = tkhtml-3a$V
> CATEGORIES = x11
> HOMEPAGE = http://tkhtml.tcl.tk/
> -SITES = ${HOMEPAGE}
> +SITES = https://github.com/Geballin/tkhtml3/archive/
>
> # BSD
> PERMIT_PACKAGE = Yes
> @@ -15,7 +15,7 @@ BUILD_DEPENDS = ${MODTK_BUILD_DEPENDS}
> RUN_DEPENDS = ${MODTK_RUN_DEPENDS}
> WANTLIB += X11
>
> -WRKDIST = ${WRKDIR}/htmlwidget
> +WRKDIST = ${WRKDIR}/tkhtml3-${DISTNAME}
> USE_GMAKE = Yes
> SEPARATE_BUILD = Yes
> CONFIGURE_STYLE = gnu
> Index: distinfo
> ===================================================================
> RCS file: /local/cvs/ports/x11/tkhtml/distinfo,v
> diff -u -p -u -r1.2 distinfo
> --- distinfo 18 Jan 2015 03:16:02 -0000 1.2
> +++ distinfo 8 Jun 2026 20:54:15 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (tkhtml3-alpha-16.tar.gz) = 1d8FxT7TIFZbxB5mUFVN+lhU+zfRhgCxEDF+qoJVY6g=
> -SIZE (tkhtml3-alpha-16.tar.gz) = 838580
> +SHA256 (Alpha-17.tar.gz) = 0t0knDQwb2hl7iVwlWByw2ghIs/FNqxVlc6l3v+aAKA=
> +SIZE (Alpha-17.tar.gz) = 1238570
> Index: patches/patch-configure
> ===================================================================
> RCS file: /local/cvs/ports/x11/tkhtml/patches/patch-configure,v
> diff -u -p -u -r1.3 patch-configure
> --- patches/patch-configure 11 Mar 2022 20:17:28 -0000 1.3
> +++ patches/patch-configure 8 Jun 2026 20:54:15 -0000
> @@ -1,7 +1,7 @@
> Index: configure
> --- configure.orig
> +++ configure
> -@@ -9545,7 +9545,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
> +@@ -9579,7 +9579,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6
> DL_LIBS=""
> CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
> LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
> Index: patches/patch-src_htmlprop_c
> ===================================================================
> RCS file: patches/patch-src_htmlprop_c
> diff -N patches/patch-src_htmlprop_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_htmlprop_c 8 Jun 2026 20:54:15 -0000
> @@ -0,0 +1,23 @@
> +Fix build with llvm22
> +
> +Index: src/htmlprop.c
> +--- src/htmlprop.c.orig
> ++++ src/htmlprop.c
> +@@ -1232,7 +1232,7 @@ propertyValuesSetColor(p, pCVar, pProp)
> + HtmlTree *pTree = p->pTree;
> +
> + if (pProp->eType == CSS_CONST_INHERIT) {
> +- HtmlColor **pInherit = (HtmlColor **)getInheritPointer(p, pCVar);
> ++ HtmlColor **pInherit = (HtmlColor **)getInheritPointer(p, (char *)pCVar);
> + assert(pInherit);
> + cVal = *pInherit;
> + goto setcolor_out;
> +@@ -1757,7 +1757,7 @@ propertyValuesSetSize(p, pIVal, p_mask, pProp, allow_m
> + case CSS_CONST_INHERIT:
> + if (allow_mask & SZ_INHERIT) {
> + HtmlNode *pParent = p->pParent;
> +- int *pInherit = (int *)getInheritPointer(p, pIVal);
> ++ int *pInherit = (int *)getInheritPointer(p, (u_char *)pIVal);
> + assert(pInherit);
> + assert(pParent);
> +
> Index: patches/patch-src_htmltable_c
> ===================================================================
> RCS file: patches/patch-src_htmltable_c
> diff -N patches/patch-src_htmltable_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_htmltable_c 8 Jun 2026 20:54:15 -0000
> @@ -0,0 +1,23 @@
> +Fix build with llvm22
> +
> +Index: src/htmltable.c
> +--- src/htmltable.c.orig
> ++++ src/htmltable.c
> +@@ -1206,7 +1206,7 @@ rowGroupIterate(pTree, pNode, p)
> + sRow.node.iNode = -1;
> + sRow.nChild = jj - ii;
> + sRow.apChildren = &((HtmlElementNode *)pNode)->apChildren[ii];
> +- rowIterate(pTree, &sRow, p);
> ++ rowIterate(pTree, (HtmlNode *)&sRow, p);
> + assert(!sRow.pLayoutCache);
> + ii = jj - 1;
> + }
> +@@ -1331,7 +1331,7 @@ tableIterate(pTree, pNode, xCallback, xRowCallback, pC
> + sRowGroup.node.iNode = -1;
> + sRowGroup.nChild = jj - ii;
> + sRowGroup.apChildren = &((HtmlElementNode *)pNode)->apChildren[ii];
> +- rowGroupIterate(pTree, &sRowGroup, &sRowContext);
> ++ rowGroupIterate(pTree, (HtmlNode *)&sRowGroup, &sRowContext);
> + assert(!sRowGroup.pLayoutCache);
> + ii = jj - 1;
> + }
> Index: patches/patch-src_htmltcl_c
> ===================================================================
> RCS file: /local/cvs/ports/x11/tkhtml/patches/patch-src_htmltcl_c,v
> diff -u -p -u -r1.2 patch-src_htmltcl_c
> --- patches/patch-src_htmltcl_c 11 Mar 2022 20:17:28 -0000 1.2
> +++ patches/patch-src_htmltcl_c 8 Jun 2026 20:54:15 -0000
> @@ -1,10 +1,11 @@
> fix implicit declaration compilation warning
>
> ---- src/htmltcl.c.orig Sun Dec 12 10:19:53 2010
> -+++ src/htmltcl.c Sun Dec 12 10:20:10 2010
> -@@ -41,6 +41,7 @@ static char const rcsid[] = "@(#) $Id: htmltcl.c,v 1.1
> - #include <assert.h>
> +Index: src/htmltcl.c
> +--- src/htmltcl.c.orig
> ++++ src/htmltcl.c
> +@@ -42,6 +42,7 @@ static char const rcsid[] = "@(#) $Id: htmltcl.c,v 1.2
> #include "html.h"
> + #include "restrack.h"
> #include "swproc.h"
> +#include "restrack.h"
>
> Index: patches/patch-src_htmltree_c
> ===================================================================
> RCS file: patches/patch-src_htmltree_c
> diff -N patches/patch-src_htmltree_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_htmltree_c 8 Jun 2026 20:54:15 -0000
> @@ -0,0 +1,45 @@
> +Fix build with llvm22
> +
> +Index: src/htmltree.c
> +--- src/htmltree.c.orig
> ++++ src/htmltree.c
> +@@ -3169,7 +3169,7 @@ fragmentAddElement(pTree, eType, zType, pAttributes, i
> + return;
> + }
> +
> +- implicitCloseCount(pTree, pFragment->pCurrent, eType, &nClose);
> ++ implicitCloseCount(pTree, (HtmlNode *)pFragment->pCurrent, eType, &nClose);
> + for (ii = 0; ii < nClose; ii++) {
> + HtmlNode *pC = &pFragment->pCurrent->node;
> + HtmlNode *pParentC = HtmlNodeParent(pC);
> +@@ -3199,7 +3199,7 @@ fragmentAddElement(pTree, eType, zType, pAttributes, i
> + pFragment->pCurrent = pElem;
> +
> + if (HtmlMarkup(eType)->flags & HTMLTAG_EMPTY) {
> +- nodeHandlerCallbacks(pTree, pFragment->pCurrent);
> ++ nodeHandlerCallbacks(pTree, (HtmlNode *)pFragment->pCurrent);
> + pFragment->pCurrent = (HtmlElementNode *)HtmlNodeParent(pElem);
> + }
> + if (!pFragment->pCurrent) {
> +@@ -3217,10 +3217,10 @@ fragmentAddClosingTag(pTree, eType, zType, iOffset)
> + int nClose;
> + int ii;
> + HtmlFragmentContext *p = pTree->pFragment;
> +- explicitCloseCount(p->pCurrent, eType, zType, &nClose);
> ++ explicitCloseCount((HtmlNode *)p->pCurrent, eType, zType, &nClose);
> + for (ii = 0; ii < nClose; ii++) {
> + assert(p->pCurrent);
> +- nodeHandlerCallbacks(pTree, p->pCurrent);
> ++ nodeHandlerCallbacks(pTree, (HtmlNode *)p->pCurrent);
> + p->pCurrent = (HtmlElementNode *)HtmlNodeParent(p->pCurrent);
> + }
> + if (!p->pCurrent) {
> +@@ -3247,7 +3247,7 @@ HtmlParseFragment(pTree, zHtml)
> +
> + while (sContext.pCurrent) {
> + HtmlNode *pParent = HtmlNodeParent(sContext.pCurrent);
> +- nodeHandlerCallbacks(pTree, sContext.pCurrent);
> ++ nodeHandlerCallbacks(pTree, (HtmlNode *)sContext.pCurrent);
> + sContext.pCurrent = (HtmlElementNode *)pParent;
> + }
> +
> Index: pkg/PLIST
> ===================================================================
> RCS file: /local/cvs/ports/x11/tkhtml/pkg/PLIST,v
> diff -u -p -u -r1.4 PLIST
> --- pkg/PLIST 11 Mar 2022 20:17:28 -0000 1.4
> +++ pkg/PLIST 8 Jun 2026 20:54:15 -0000
> @@ -1,4 +1,5 @@
> lib/tcl/tkhtml/
> -lib/tcl/tkhtml/libTkhtml${VER}.so
> +lib/tcl/tkhtml/hv3-0.1.tm
> +@so lib/tcl/tkhtml/libTkhtml${VER}.so
> lib/tcl/tkhtml/pkgIndex.tcl
> @man man/mann/tkhtml.n
>
> --
> Matthieu Herrb
>
--
Matthieu Herrb
[llvm22] update x11/tkhtml to Alpha17 and fix build