From nobody Mon Jul 01 06:50:59 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WCGsH1v95z5Pggw; Mon, 01 Jul 2024 06:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCGsH1BVbz4pxG; Mon, 1 Jul 2024 06:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719816659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSQTJ4zN0fZFgnJtPK03cNLsgY8xCkGzPiYj8ss/E0w=; b=v7GdcL+edHFAvyGIWeP1ExhAp6+iI2al73ngyPSBr0JaemIhVhK7214W1mPcpMukR5USD7 FUeIq0UIii6KWOIKJbzy/mzoIFrUQo04aodN1OTOsbVU44FHoYk7hN2MB/oL6QfwuwUI5u hJf0SEj2bBLfrLzpR7x/ImWJktVQnJfS79LF8KxVkZiONXXffUvMh6TpOqv3xPQ9nW7pR5 gEqWef5YhmKf7Esly4sxWAzWU8u/EhPaia9xR6KCFkg02C9MVMOtuuLN4ADVD8MSpoCUrE SpdavFXcMG/R2TVR59kr3fH85KeGGGCq9HWNGyUZ1xxMSCBj/cnVcE5OLowVPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719816659; a=rsa-sha256; cv=none; b=oRpKbCKK1N6bJ/N15yIhg/+8EyDPSTHfqB4Z/K3jC39L1aNPG8qWcrh6iCLIBSyNndlOnk nCnBr/esv52DyFO/Q55HiqyhcmX+E8uEUqSjjRGAOpSivzTM23iZdErJ5TiYF65gurTK7N COr8ezJ9LVaH96FNX9WTrwCBDo0d3BuunGWmC3eCsG61hx5J/zQKGBWP+9EsxFBzkv9G0V kHnvFE8TW397gl3+exMDrJnyFPrb8oGThwpoJNVxgrt8ZSFy2TlXOuJFPtf0sEcXqUiw6Z VA1AtsNUZPApeZ8XizBG8ip4dk/MM/aCZCLKyqoPqGcZszS1NQe8U+7AMDf6fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719816659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSQTJ4zN0fZFgnJtPK03cNLsgY8xCkGzPiYj8ss/E0w=; b=yNb6beSH3Hu7xqiwqKVfLeh6DDBgN0WQKet4Mn8clb2C58xS0opUPi+uCLF1P1KM/5Szoy PlXKfFpdA+ZghVM6c6Obld/5VLgOX0MpioUjFX71odQ/5ZtB/SZCPm4jLeuP61AAeIakF6 imP4H5WaCWXNeu8pcnGsNuzmEmLygAbAIKNq55YdCgR2kuhnjWrNlPo94YHATIPOmOEJJY aXALFMcuboxu8LyfuL3dedAzSbwkAq9+9CTZKZrWjkXv3nKOUawPGEmgNb7Mk3JNxnb+85 gxpcze7tjYmLwlQc5IKT1QVIlcpowkrwKSb08GADbU5KsHjyO97hFUN8kqGagA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WCGsH0nljzvjc; Mon, 1 Jul 2024 06:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4616oxED028465; Mon, 1 Jul 2024 06:50:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4616oxXV028462; Mon, 1 Jul 2024 06:50:59 GMT (envelope-from git) Date: Mon, 1 Jul 2024 06:50:59 GMT Message-Id: <202407010650.4616oxXV028462@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Pietro Cerutti Subject: git: af36765e17ba - main - devel/tclxml: fix build with libxml2 >= 2.12 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gahr X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af36765e17ba36d0e86e95d4476b67f894209468 Auto-Submitted: auto-generated The branch main has been updated by gahr: URL: https://cgit.FreeBSD.org/ports/commit/?id=af36765e17ba36d0e86e95d4476b67f894209468 commit af36765e17ba36d0e86e95d4476b67f894209468 Author: Pietro Cerutti AuthorDate: 2024-07-01 06:39:47 +0000 Commit: Pietro Cerutti CommitDate: 2024-07-01 06:49:49 +0000 devel/tclxml: fix build with libxml2 >= 2.12 Version 2.12 of libxml2 introduced a backwards incompatible change in the signature of some functions, notably the second argument to xmlStructuredErrorFunc has gained a const qualifier, changing from `xmlError *error` to `const xmlError *error`. To make the signatures compatible with both pre- and post-2.12, I have introduced a check on LIBXML_VERSION. PR: 279968 Reported by: dizzy --- devel/tclxml/Makefile | 2 +- devel/tclxml/files/patch-Makefile.in | 13 ++++++++- devel/tclxml/files/patch-configure | 19 ++++++++++--- devel/tclxml/files/patch-docObj.c | 19 +++++++++++++ ...ch-include_tclxml-libxml2_tclxml-libxml2Decls.h | 31 ++++++++++++++++++++++ devel/tclxml/files/patch-tclxml.c | 11 ++++++++ 6 files changed, 90 insertions(+), 5 deletions(-) diff --git a/devel/tclxml/Makefile b/devel/tclxml/Makefile index 5a8b0cc25bf3..5e4a3caeb2a4 100644 --- a/devel/tclxml/Makefile +++ b/devel/tclxml/Makefile @@ -1,6 +1,6 @@ PORTNAME= tclxml PORTVERSION= 3.3 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= devel tcl MASTER_SITES= LOCAL/bf SF/tclxml/TclXML/${PORTVERSION} diff --git a/devel/tclxml/files/patch-Makefile.in b/devel/tclxml/files/patch-Makefile.in index 60196004f4ba..48402ef0711f 100644 --- a/devel/tclxml/files/patch-Makefile.in +++ b/devel/tclxml/files/patch-Makefile.in @@ -1,6 +1,17 @@ --- Makefile.in.orig 2013-03-30 17:17:07 UTC +++ Makefile.in -@@ -423,13 +423,15 @@ +@@ -136,10 +136,6 @@ TCLLIBPATH = $(top_builddir) + EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) + #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) + TCLLIBPATH = $(top_builddir) +-TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ +- @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ +- PATH="$(EXTRA_PATH):$(PATH)" \ +- TCLLIBPATH="$(TCLLIBPATH)" + # TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` + + TCLSH_PROG = @TCLSH_PROG@ +@@ -423,13 +419,15 @@ install-lib-binaries: @mkdir -p $(DESTDIR)$(pkglibdir) @list='$(lib_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ diff --git a/devel/tclxml/files/patch-configure b/devel/tclxml/files/patch-configure index c001f6a49e71..7ec514208aa8 100644 --- a/devel/tclxml/files/patch-configure +++ b/devel/tclxml/files/patch-configure @@ -1,7 +1,11 @@ ---- configure.orig 2022-03-16 21:59:50 UTC +--- configure.orig 2013-03-30 17:17:07 UTC +++ configure -@@ -8580,14 +8580,14 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } - FreeBSD-*|DragonFly-*) +@@ -8577,17 +8577,17 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; +- FreeBSD-*) ++ FreeBSD-*|DragonFly-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" @@ -18,3 +22,12 @@ if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` +@@ -9267,7 +9267,7 @@ fi + ;; + IRIX*) + ;; +- NetBSD-*|FreeBSD-*) ++ NetBSD-*|FreeBSD-*|DragonFly-*) + ;; + Darwin-*) + ;; diff --git a/devel/tclxml/files/patch-docObj.c b/devel/tclxml/files/patch-docObj.c new file mode 100644 index 000000000000..59f57bf2fedf --- /dev/null +++ b/devel/tclxml/files/patch-docObj.c @@ -0,0 +1,19 @@ +--- docObj.c.orig 2013-03-30 17:17:07 UTC ++++ docObj.c +@@ -1852,9 +1852,13 @@ void + } + + void +-TclXML_libxml2_ErrorHandler (ctx, error) +- void *ctx; /* ignore - depends on context */ +- xmlErrorPtr error; ++TclXML_libxml2_ErrorHandler (void *ctx, ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error ++#else ++ xmlError *error ++#endif ++ ) + { + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_Obj *objPtr; diff --git a/devel/tclxml/files/patch-include_tclxml-libxml2_tclxml-libxml2Decls.h b/devel/tclxml/files/patch-include_tclxml-libxml2_tclxml-libxml2Decls.h new file mode 100644 index 000000000000..2e8371bf6421 --- /dev/null +++ b/devel/tclxml/files/patch-include_tclxml-libxml2_tclxml-libxml2Decls.h @@ -0,0 +1,31 @@ +--- include/tclxml-libxml2/tclxml-libxml2Decls.h.orig 2013-03-30 17:17:07 UTC ++++ include/tclxml-libxml2/tclxml-libxml2Decls.h +@@ -55,7 +55,12 @@ EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_(( + TclXML_libxml2_DocumentHandling keep)); + /* 10 */ + EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_((void * ctx, +- xmlErrorPtr error)); ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error)); ++#else ++ xmlError *error)); ++#endif ++ + /* 11 */ + EXTERN void TclXML_libxml2_ResetError _ANSI_ARGS_(( + Tcl_Interp * interp)); +@@ -93,7 +98,13 @@ typedef struct Tclxml_libxml2Stubs { + int (*tclXML_libxml2_GetTclDocFromNode) _ANSI_ARGS_((Tcl_Interp * interp, xmlNodePtr nodePtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 7 */ + void (*tclXML_libxml2_DestroyDocument) _ANSI_ARGS_((TclXML_libxml2_Document * tDocPtr)); /* 8 */ + void (*tclXML_libxml2_DocKeep) _ANSI_ARGS_((Tcl_Obj * objPtr, TclXML_libxml2_DocumentHandling keep)); /* 9 */ +- void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, xmlErrorPtr error)); /* 10 */ ++ void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, ++#if LIBXML_VERSION >= 21200 ++ const xmlError * error ++#else ++ xmlError * error ++#endif ++ )); /* 10 */ + void (*tclXML_libxml2_ResetError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 11 */ + Tcl_Obj * (*tclXML_libxml2_GetErrorObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 12 */ + void (*tclXML_libxml2_SetErrorNodeFunc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_ErrorNodeHandlerProc * proc)); /* 13 */ diff --git a/devel/tclxml/files/patch-tclxml.c b/devel/tclxml/files/patch-tclxml.c new file mode 100644 index 000000000000..bb461a274c7b --- /dev/null +++ b/devel/tclxml/files/patch-tclxml.c @@ -0,0 +1,11 @@ +--- tclxml.c.orig 2013-03-30 17:17:07 UTC ++++ tclxml.c +@@ -20,6 +20,8 @@ + #include + #include + ++int Tcldom_libxml2_Init ( Tcl_Interp *interp ); ++ + #define TCL_DOES_STUBS \ + (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \ + (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))