diff options
Diffstat (limited to 'textproc/libxml2')
-rw-r--r-- | textproc/libxml2/Makefile | 74 | ||||
-rw-r--r-- | textproc/libxml2/distinfo | 10 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-CMakeLists.txt | 33 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-python_libxml.c | 35 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-uri.c | 25 | ||||
-rw-r--r-- | textproc/libxml2/pkg-plist | 82 |
6 files changed, 54 insertions, 205 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 2537d749d3ff..7f2922589d85 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -1,50 +1,55 @@ -PORTNAME= libxml2 -DISTVERSION= 2.11.9 +PORTNAME?= libxml2 +DISTVERSION= 2.14.4 PORTREVISION?= 0 CATEGORIES?= textproc gnome -MASTER_SITES= GNOME/sources/${PORTNAME}/${DISTVERSION:R}/ +MASTER_SITES= GNOME +DISTNAME= libxml2-${DISTVERSION} DIST_SUBDIR= gnome +PATCH_SITES= https://gitlab.gnome.org/GNOME/libxml2/-/commit/ +PATCHFILES= cf52139b4170be13b51b62da11c208dc66e6eff0.patch:-p1 \ + 356542324fa439de544b5e419b91ae68d42c306c.patch:-p1 + MAINTAINER= desktop@FreeBSD.org COMMENT?= XML parser library for GNOME WWW= http://xmlsoft.org/ LICENSE= MIT -USES+= cmake:testing cpe iconv localbase:ldflags pathfix \ - pkgconfig tar:xz +# Upstream recommends autotools on Unix-like systems +USES+= cpe gmake iconv libtool localbase pathfix pkgconfig tar:xz CPE_VENDOR= xmlsoft USE_LDCONFIG= yes +GNU_CONFIGURE= yes # Don't build with Python support unless requested -CMAKE_${LIBXML2_SLAVE:DON:UOFF}=LIBXML2_WITH_PYTHON - -# Many symbols in the linker version script libxml2.syms are only defined when -# --with-xptr-locs is enabled at configure time. Suppress errors with lld >= 17 -# due to these undefined symbols. -LDFLAGS+= -Wl,--undefined-version - -CMAKE_TESTING_ON= LIBXML2_WITH_TESTS - -CMAKE_ARGS= -DCMAKE_INSTALL_SYSCONFDIR=share -CMAKE_OFF+= LIBXML2_WITH_TESTS +CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/share/ \ + --with-lzma=/usr \ + --${LIBXML2_SLAVE:Dwith:Uwithout}-python${LIBXML2_SLAVE:D=${PYTHON_CMD}:U} -PLIST_SUB+= LIBVERSION=${DISTVERSION} +INSTALL_TARGET= install-strip +TEST_TARGET= check -OPTIONS_DEFINE= DOCS ICU MEM_DEBUG READLINE THREAD_ALLOC -OPTIONS_DEFAULT= READLINE +OPTIONS_DEFINE= DOCS ICU READLINE STATIC THREAD_ALLOC +OPTIONS_GROUP= LEGACY +OPTIONS_GROUP_LEGACY= HTTP LZMA ZLIB +OPTIONS_DEFAULT= HTTP LZMA READLINE STATIC ZLIB OPTIONS_SUB= yes -MEM_DEBUG_DESC= Memory debugging (DEVELOPERS ONLY!) +HTTP_DESC= HTTP support +LEGACY_DESC= Enable legacy API compatibility READLINE_DESC= History for xmllint THREAD_ALLOC_DESC= Per-thread memory (DEVELOPERS ONLY!) -ICU_LIB_DEPENDS= libicudata.so:devel/icu -ICU_CMAKE_BOOL= LIBXML2_WITH_ICU -MEM_DEBUG_CONFIGURE_WITH= LIBXML2_WITH_MEM_DEBUG +HTTP_CONFIGURE_WITH= http +ICU_LIB_DEPENDS= libicuuc.so:devel/icu +ICU_CONFIGURE_WITH= icu +LZMA_CONFIGURE_WITH= lzma READLINE_LIB_DEPENDS= libreadline.so:devel/readline -READLINE_CMAKE_OFF= -DHAVE_LIBHISTORY=false \ - -DHAVE_LIBREADLINE=false -THREAD_ALLOC_CMAKE_BOOL= LIBXML2_WITH_THREAD_ALLOC +READLINE_CONFIGURE_WITH= history \ + readline +STATIC_CONFIGURE_ENABLE= static +THREAD_ALLOC_CONFIGURE_WITH= thread-alloc +ZLIB_CONFIGURE_WITH= zlib post-patch: @${REINPLACE_CMD} -e \ @@ -53,14 +58,15 @@ post-patch: ${WRKSRC}/doc/xmllint.1 post-install: -.if defined(LIBXML2_SLAVE) - ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/site-packages/libxml2mod.so - ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ - -f -d ${PYTHONPREFIX_SITELIBDIR} \ - ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ - -f -d ${PYTHONPREFIX_SITELIBDIR} \ - ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +.if !defined(LIBXML2_SLAVE) +# Documentation should be in DOCSDIR + @${MV} ${STAGEDIR}${PREFIX}/share/gtk-doc/html/libxml2 \ + ${STAGEDIR}${DOCSDIR}/devhelp + @${RM} -r ${STAGEDIR}${PREFIX}/share/gtk-doc +# Install remaining documentation that's not connected to autotools + ${INSTALL_MAN} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR} +.else + ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/site-packages/libxml2mod${PYTHON_SOABI}.so .endif .include <bsd.port.mk> diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo index 4ea4340dc6f1..ef0292e239d7 100644 --- a/textproc/libxml2/distinfo +++ b/textproc/libxml2/distinfo @@ -1,3 +1,7 @@ -TIMESTAMP = 1725749707 -SHA256 (gnome/libxml2-2.11.9.tar.xz) = 780157a1efdb57188ec474dca87acaee67a3a839c2525b2214d318228451809f -SIZE (gnome/libxml2-2.11.9.tar.xz) = 2627500 +TIMESTAMP = 1751123750 +SHA256 (gnome/libxml2-2.14.4.tar.xz) = 24175ec30a97cfa86bdf9befb7ccf4613f8f4b2713c5103e0dd0bc9c711a2773 +SIZE (gnome/libxml2-2.14.4.tar.xz) = 2325848 +SHA256 (gnome/cf52139b4170be13b51b62da11c208dc66e6eff0.patch) = 2bfdc80a1adc089776a0ce687dd88e3e6e1ab711e6d3cf4182f2034d4be85a83 +SIZE (gnome/cf52139b4170be13b51b62da11c208dc66e6eff0.patch) = 1380 +SHA256 (gnome/356542324fa439de544b5e419b91ae68d42c306c.patch) = 59c182721e7c2d1cea77246115dd092ac29201b4699bd82892ed1e9cd25f2471 +SIZE (gnome/356542324fa439de544b5e419b91ae68d42c306c.patch) = 745 diff --git a/textproc/libxml2/files/patch-CMakeLists.txt b/textproc/libxml2/files/patch-CMakeLists.txt deleted file mode 100644 index 6926e72e1e54..000000000000 --- a/textproc/libxml2/files/patch-CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ ---- CMakeLists.txt.orig 2023-08-11 18:59:11 UTC -+++ CMakeLists.txt -@@ -395,13 +395,17 @@ if(LIBXML2_WITH_ICU) - if(WIN32) - set(ICU_LIBS "-licudt -licuin -licuuc") - else() -- set(ICU_LIBS "-licudata -licui18n -licuuc") -+ set(ICU_LIBS_DIR "${ICU_INCLUDE_DIRS}") -+ STRING(REGEX REPLACE "include" "lib" ICU_LIBS_DIR ${ICU_LIBS_DIR}) -+ set(ICU_LIBS "-L${ICU_LIBS_DIR} -licudata -licui18n -licuuc") - endif() - endif() - - if(LIBXML2_WITH_LZMA) - target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) -- set(LZMA_LIBS "-llzma") -+ set(LZMA_LIBS_DIR "${LIBLZMA_INCLUDE_DIRS}") -+ STRING(REGEX REPLACE "include" "lib" LZMA_LIBS_DIR ${LZMA_LIBS_DIR}) -+ set(LZMA_LIBS "-L${LZMA_LIBS_DIR} -llzma") - endif() - - if(LIBXML2_WITH_THREADS) -@@ -411,7 +415,9 @@ endif() - - if(LIBXML2_WITH_ZLIB) - target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) -- set(Z_LIBS "-lz") -+ set(Z_LIBS_DIR "${ZLIB_INCLUDE_DIRS}") -+ STRING(REGEX REPLACE "include" "lib" Z_LIBS_DIR ${Z_LIBS_DIR}) -+ set(Z_LIBS "-L${Z_LIBS_DIR} -lz") - endif() - - set_target_properties( diff --git a/textproc/libxml2/files/patch-python_libxml.c b/textproc/libxml2/files/patch-python_libxml.c deleted file mode 100644 index 7bbc98d75033..000000000000 --- a/textproc/libxml2/files/patch-python_libxml.c +++ /dev/null @@ -1,35 +0,0 @@ ---- python/libxml.c.orig 2023-08-11 20:30:35 UTC -+++ python/libxml.c -@@ -1606,12 +1606,19 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, - PyObject *message; - PyObject *result; - char str[1000]; -+ unsigned char *ptr = (unsigned char *)str; - - #ifdef DEBUG_ERROR - printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); - #endif - -+#if PY_MAJOR_VERSION >= 3 -+ /* Ensure the error string doesn't start at UTF8 continuation. */ -+ while (*ptr && (*ptr & 0xc0) == 0x80) -+ ptr++; -+#endif - -+ - if (libxml_xmlPythonErrorFuncHandler == NULL) { - va_start(ap, msg); - vfprintf(stderr, msg, ap); -@@ -1625,9 +1632,11 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, - list = PyTuple_New(2); - PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); - Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); -- message = libxml_charPtrConstWrap(str); -+ message = libxml_charPtrConstWrap(ptr); - PyTuple_SetItem(list, 1, message); - result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list); -+ /* Forget any errors caused in the error handler. */ -+ PyErr_Clear(); - Py_XDECREF(list); - Py_XDECREF(result); - } diff --git a/textproc/libxml2/files/patch-uri.c b/textproc/libxml2/files/patch-uri.c deleted file mode 100644 index 82b06581c80e..000000000000 --- a/textproc/libxml2/files/patch-uri.c +++ /dev/null @@ -1,25 +0,0 @@ -Revert the following commit, it makes the freebsd doc chain fail. - -From 8eb55d782a2b9afacc7938694891cc6fad7b42a5 Mon Sep 17 00:00:00 2001 -From: Dennis Filder <d.filder@web.de> -Date: Fri, 13 Jun 2014 14:56:14 +0800 -Subject: xmlSaveUri() incorrectly recomposes URIs with rootless paths - -For https://bugzilla.gnome.org/show_bug.cgi?id=731063 - -xmlSaveUri() of libxml2 (snapshot 2014-05-31 and earlier) returns -bogus values when called with URIs that have rootless paths -(e.g. "urx:b:b" becomes "urx://b%3Ab" where "urx:b%3Ab" would be -correct) - ---- uri.c.orig 2019-10-22 18:46:01 UTC -+++ uri.c -@@ -1201,6 +1201,8 @@ xmlSaveUri(xmlURIPtr uri) { - if (temp == NULL) goto mem_error; - ret = temp; - } -+ ret[len++] = '/'; -+ ret[len++] = '/'; - } - if (uri->path != NULL) { - p = uri->path; diff --git a/textproc/libxml2/pkg-plist b/textproc/libxml2/pkg-plist index 8d53acb96cd1..bfc48e35b5ff 100644 --- a/textproc/libxml2/pkg-plist +++ b/textproc/libxml2/pkg-plist @@ -47,18 +47,12 @@ include/libxml2/libxml/xmlwriter.h include/libxml2/libxml/xpath.h include/libxml2/libxml/xpathInternals.h include/libxml2/libxml/xpointer.h -lib/cmake/libxml2-%%LIBVERSION%%/libxml2-config-version.cmake -lib/cmake/libxml2-%%LIBVERSION%%/libxml2-config.cmake -lib/cmake/libxml2-%%LIBVERSION%%/libxml2-export-%%CMAKE_BUILD_TYPE%%.cmake -lib/cmake/libxml2-%%LIBVERSION%%/libxml2-export.cmake +lib/cmake/libxml2/libxml2-config.cmake +%%STATIC%%lib/libxml2.a lib/libxml2.so -lib/libxml2.so.2 -lib/libxml2.so.%%LIBVERSION%% +lib/libxml2.so.16 +lib/libxml2.so.16.0.4 libdata/pkgconfig/libxml-2.0.pc -share/man/man1/xml2-config.1.gz -share/man/man1/xmlcatalog.1.gz -share/man/man1/xmllint.1.gz -share/aclocal/libxml.m4 %%PORTDOCS%%%%DOCSDIR%%/devhelp/general.html %%PORTDOCS%%%%DOCSDIR%%/devhelp/home.png %%PORTDOCS%%%%DOCSDIR%%/devhelp/index.html @@ -113,70 +107,8 @@ share/aclocal/libxml.m4 %%PORTDOCS%%%%DOCSDIR%%/devhelp/right.png %%PORTDOCS%%%%DOCSDIR%%/devhelp/style.css %%PORTDOCS%%%%DOCSDIR%%/devhelp/up.png -%%PORTDOCS%%%%DOCSDIR%%/examples/index.html -%%PORTDOCS%%%%DOCSDIR%%/examples/io1.c -%%PORTDOCS%%%%DOCSDIR%%/examples/io2.c -%%PORTDOCS%%%%DOCSDIR%%/examples/parse1.c -%%PORTDOCS%%%%DOCSDIR%%/examples/parse2.c -%%PORTDOCS%%%%DOCSDIR%%/examples/parse3.c -%%PORTDOCS%%%%DOCSDIR%%/examples/parse4.c -%%PORTDOCS%%%%DOCSDIR%%/examples/reader1.c -%%PORTDOCS%%%%DOCSDIR%%/examples/reader2.c -%%PORTDOCS%%%%DOCSDIR%%/examples/reader3.c -%%PORTDOCS%%%%DOCSDIR%%/examples/reader4.c -%%PORTDOCS%%%%DOCSDIR%%/examples/testWriter.c -%%PORTDOCS%%%%DOCSDIR%%/examples/tree1.c -%%PORTDOCS%%%%DOCSDIR%%/examples/tree2.c -%%PORTDOCS%%%%DOCSDIR%%/examples/xpath1.c -%%PORTDOCS%%%%DOCSDIR%%/examples/xpath2.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apa.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apb.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apc.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apd.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ape.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apf.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/apg.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/aph.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/api.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s02.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s03.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s04.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s05.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s06.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s07.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s08.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s09.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/blank.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/1.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/10.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/2.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/3.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/4.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/5.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/6.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/7.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/8.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/9.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/caution.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/draft.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/home.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/important.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/next.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/note.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/prev.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/tip.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-blank.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-minus.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-plus.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/up.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/warning.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeaddattribute.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeaddkeyword.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeconvert.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includegetattribute.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includekeyword.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/includexpath.c -%%PORTDOCS%%%%DOCSDIR%%/tutorial/index.html -%%PORTDOCS%%%%DOCSDIR%%/tutorial/ix01.html %%PORTDOCS%%%%DOCSDIR%%/xmlcatalog.html %%PORTDOCS%%%%DOCSDIR%%/xmllint.html +share/man/man1/xml2-config.1.gz +share/man/man1/xmlcatalog.1.gz +share/man/man1/xmllint.1.gz |