View | Details | Raw Unified | Return to bug 279705 | Differences between
and this patch

Collapse All | Expand All

(-)b/textproc/libxml2/Makefile (-4 / +5 lines)
Lines 1-5 Link Here
1
PORTNAME=	libxml2
1
PORTNAME=	libxml2
2
DISTVERSION=	2.11.8
2
DISTVERSION=	2.13.1
3
PORTREVISION?=	0
3
PORTREVISION?=	0
4
CATEGORIES?=	textproc gnome
4
CATEGORIES?=	textproc gnome
5
MASTER_SITES=	GNOME/sources/${PORTNAME}/${DISTVERSION:R}/
5
MASTER_SITES=	GNOME/sources/${PORTNAME}/${DISTVERSION:R}/
Lines 27-46 CMAKE_TESTING_ON= LIBXML2_WITH_TESTS Link Here
27
27
28
CMAKE_ARGS=	-DCMAKE_INSTALL_SYSCONFDIR=share
28
CMAKE_ARGS=	-DCMAKE_INSTALL_SYSCONFDIR=share
29
CMAKE_OFF+=	LIBXML2_WITH_TESTS
29
CMAKE_OFF+=	LIBXML2_WITH_TESTS
30
CMAKE_ON+=	LIBXML2_WITH_HTTP \
31
		LIBXML2_WITH_LZMA \
32
		LIBXML2_WITH_ZLIB
30
33
31
PLIST_SUB+=	LIBVERSION=${DISTVERSION}
34
PLIST_SUB+=	LIBVERSION=${DISTVERSION}
32
35
33
OPTIONS_DEFINE=	DOCS ICU MEM_DEBUG READLINE THREAD_ALLOC
36
OPTIONS_DEFINE=	DOCS ICU READLINE THREAD_ALLOC
34
OPTIONS_DEFAULT=	READLINE
37
OPTIONS_DEFAULT=	READLINE
35
OPTIONS_SUB=		yes
38
OPTIONS_SUB=		yes
36
39
37
MEM_DEBUG_DESC=		Memory debugging (DEVELOPERS ONLY!)
38
READLINE_DESC=		History for xmllint
40
READLINE_DESC=		History for xmllint
39
THREAD_ALLOC_DESC=	Per-thread memory (DEVELOPERS ONLY!)
41
THREAD_ALLOC_DESC=	Per-thread memory (DEVELOPERS ONLY!)
40
42
41
ICU_LIB_DEPENDS=		libicudata.so:devel/icu
43
ICU_LIB_DEPENDS=		libicudata.so:devel/icu
42
ICU_CMAKE_BOOL=			LIBXML2_WITH_ICU
44
ICU_CMAKE_BOOL=			LIBXML2_WITH_ICU
43
MEM_DEBUG_CONFIGURE_WITH=	LIBXML2_WITH_MEM_DEBUG
44
READLINE_LIB_DEPENDS=		libreadline.so:devel/readline
45
READLINE_LIB_DEPENDS=		libreadline.so:devel/readline
45
READLINE_CMAKE_OFF=		-DHAVE_LIBHISTORY=false \
46
READLINE_CMAKE_OFF=		-DHAVE_LIBHISTORY=false \
46
				-DHAVE_LIBREADLINE=false
47
				-DHAVE_LIBREADLINE=false
(-)b/textproc/libxml2/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1715748402
1
TIMESTAMP = 1718904742
2
SHA256 (gnome/libxml2-2.11.8.tar.xz) = 53961af1721b72246180cd844b7ddae36ea8e1e4e27b683567990a1ee78b02c1
2
SHA256 (gnome/libxml2-2.13.1.tar.xz) = 25239263dc37f5f55a5393eff27b35f0b7d9ea4b2a7653310598ea8299e3b741
3
SIZE (gnome/libxml2-2.11.8.tar.xz) = 2628212
3
SIZE (gnome/libxml2-2.13.1.tar.xz) = 2579424
(-)a/textproc/libxml2/files/patch-CMakeLists.txt (-33 lines)
Removed Link Here
1
--- CMakeLists.txt.orig	2023-08-11 18:59:11 UTC
2
+++ CMakeLists.txt
3
@@ -395,13 +395,17 @@ if(LIBXML2_WITH_ICU)
4
 	if(WIN32)
5
 		set(ICU_LIBS "-licudt -licuin -licuuc")
6
 	else()
7
-		set(ICU_LIBS "-licudata -licui18n -licuuc")
8
+		set(ICU_LIBS_DIR "${ICU_INCLUDE_DIRS}")
9
+		STRING(REGEX REPLACE "include" "lib" ICU_LIBS_DIR ${ICU_LIBS_DIR})
10
+		set(ICU_LIBS "-L${ICU_LIBS_DIR} -licudata -licui18n -licuuc")
11
 	endif()
12
 endif()
13
 
14
 if(LIBXML2_WITH_LZMA)
15
 	target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA)
16
-	set(LZMA_LIBS "-llzma")
17
+	set(LZMA_LIBS_DIR "${LIBLZMA_INCLUDE_DIRS}")
18
+	STRING(REGEX REPLACE "include" "lib" LZMA_LIBS_DIR ${LZMA_LIBS_DIR})
19
+	set(LZMA_LIBS "-L${LZMA_LIBS_DIR} -llzma")
20
 endif()
21
 
22
 if(LIBXML2_WITH_THREADS)
23
@@ -411,7 +415,9 @@ endif()
24
 
25
 if(LIBXML2_WITH_ZLIB)
26
 	target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB)
27
-	set(Z_LIBS "-lz")
28
+	set(Z_LIBS_DIR "${ZLIB_INCLUDE_DIRS}")
29
+	STRING(REGEX REPLACE "include" "lib" Z_LIBS_DIR ${Z_LIBS_DIR})
30
+	set(Z_LIBS "-L${Z_LIBS_DIR} -lz")
31
 endif()
32
 
33
 set_target_properties(
(-)b/textproc/libxml2/files/patch-python_libxml.c (-13 / +10 lines)
Lines 1-26 Link Here
1
--- python/libxml.c.orig	2023-08-11 20:30:35 UTC
1
--- python/libxml.c.orig	2024-06-12 11:17:43 UTC
2
+++ python/libxml.c
2
+++ python/libxml.c
3
@@ -1606,12 +1606,19 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
3
@@ -1491,6 +1491,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
4
     PyObject *message;
4
     PyObject *message;
5
     PyObject *result;
5
     PyObject *result;
6
     char str[1000];
6
     char str[1000];
7
+    unsigned char *ptr = (unsigned char *)str;
7
+    unsigned char *ptr = (unsigned char *)str;
8
 
8
 
9
 #ifdef DEBUG_ERROR
9
     if (libxml_xmlPythonErrorFuncHandler == NULL) {
10
     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
10
         va_start(ap, msg);
11
 #endif
11
@@ -1502,12 +1503,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
12
 	    str[999] = 0;
13
         va_end(ap);
12
 
14
 
13
+#if PY_MAJOR_VERSION >= 3
15
+#if PY_MAJOR_VERSION >= 3
14
+    /* Ensure the error string doesn't start at UTF8 continuation. */
16
+        /* Ensure the error string doesn't start at UTF8 continuation. */
15
+    while (*ptr && (*ptr & 0xc0) == 0x80)
17
+        while (*ptr && (*ptr & 0xc0) == 0x80)
16
+        ptr++;
18
+            ptr++;
17
+#endif
19
+#endif
18
 
19
+
20
+
20
     if (libxml_xmlPythonErrorFuncHandler == NULL) {
21
         va_start(ap, msg);
22
         vfprintf(stderr, msg, ap);
23
@@ -1625,9 +1632,11 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
24
         list = PyTuple_New(2);
21
         list = PyTuple_New(2);
25
         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
22
         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
26
         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
23
         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
(-)b/textproc/libxml2/pkg-plist (-65 / +2 lines)
Lines 110-182 share/aclocal/libxml.m4 Link Here
110
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2-xpathInternals.html
110
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2-xpathInternals.html
111
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2-xpointer.html
111
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2-xpointer.html
112
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2.devhelp2
112
%%PORTDOCS%%%%DOCSDIR%%/devhelp/libxml2.devhelp2
113
%%PORTDOCS%%%%DOCSDIR%%/devhelp/meson.build
113
%%PORTDOCS%%%%DOCSDIR%%/devhelp/right.png
114
%%PORTDOCS%%%%DOCSDIR%%/devhelp/right.png
114
%%PORTDOCS%%%%DOCSDIR%%/devhelp/style.css
115
%%PORTDOCS%%%%DOCSDIR%%/devhelp/style.css
115
%%PORTDOCS%%%%DOCSDIR%%/devhelp/up.png
116
%%PORTDOCS%%%%DOCSDIR%%/devhelp/up.png
116
%%PORTDOCS%%%%DOCSDIR%%/examples/index.html
117
%%PORTDOCS%%%%DOCSDIR%%/meson.build
117
%%PORTDOCS%%%%DOCSDIR%%/examples/io1.c
118
%%PORTDOCS%%%%DOCSDIR%%/examples/io2.c
119
%%PORTDOCS%%%%DOCSDIR%%/examples/parse1.c
120
%%PORTDOCS%%%%DOCSDIR%%/examples/parse2.c
121
%%PORTDOCS%%%%DOCSDIR%%/examples/parse3.c
122
%%PORTDOCS%%%%DOCSDIR%%/examples/parse4.c
123
%%PORTDOCS%%%%DOCSDIR%%/examples/reader1.c
124
%%PORTDOCS%%%%DOCSDIR%%/examples/reader2.c
125
%%PORTDOCS%%%%DOCSDIR%%/examples/reader3.c
126
%%PORTDOCS%%%%DOCSDIR%%/examples/reader4.c
127
%%PORTDOCS%%%%DOCSDIR%%/examples/testWriter.c
128
%%PORTDOCS%%%%DOCSDIR%%/examples/tree1.c
129
%%PORTDOCS%%%%DOCSDIR%%/examples/tree2.c
130
%%PORTDOCS%%%%DOCSDIR%%/examples/xpath1.c
131
%%PORTDOCS%%%%DOCSDIR%%/examples/xpath2.c
132
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apa.html
133
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apb.html
134
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apc.html
135
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apd.html
136
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ape.html
137
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apf.html
138
%%PORTDOCS%%%%DOCSDIR%%/tutorial/apg.html
139
%%PORTDOCS%%%%DOCSDIR%%/tutorial/aph.html
140
%%PORTDOCS%%%%DOCSDIR%%/tutorial/api.html
141
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s02.html
142
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s03.html
143
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s04.html
144
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s05.html
145
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s06.html
146
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s07.html
147
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s08.html
148
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ar01s09.html
149
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/blank.png
150
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/1.png
151
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/10.png
152
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/2.png
153
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/3.png
154
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/4.png
155
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/5.png
156
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/6.png
157
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/7.png
158
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/8.png
159
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/callouts/9.png
160
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/caution.png
161
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/draft.png
162
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/home.png
163
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/important.png
164
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/next.png
165
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/note.png
166
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/prev.png
167
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/tip.png
168
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-blank.png
169
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-minus.png
170
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/toc-plus.png
171
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/up.png
172
%%PORTDOCS%%%%DOCSDIR%%/tutorial/images/warning.png
173
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeaddattribute.c
174
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeaddkeyword.c
175
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includeconvert.c
176
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includegetattribute.c
177
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includekeyword.c
178
%%PORTDOCS%%%%DOCSDIR%%/tutorial/includexpath.c
179
%%PORTDOCS%%%%DOCSDIR%%/tutorial/index.html
180
%%PORTDOCS%%%%DOCSDIR%%/tutorial/ix01.html
181
%%PORTDOCS%%%%DOCSDIR%%/xmlcatalog.html
118
%%PORTDOCS%%%%DOCSDIR%%/xmlcatalog.html
182
%%PORTDOCS%%%%DOCSDIR%%/xmllint.html
119
%%PORTDOCS%%%%DOCSDIR%%/xmllint.html
(-)b/textproc/py-libxml2/Makefile (-8 / +3 lines)
Lines 3-28 CATEGORIES= textproc gnome python Link Here
3
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
3
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
4
4
5
COMMENT=	Python interface for XML parser library for GNOME
5
COMMENT=	Python interface for XML parser library for GNOME
6
MASTERDIR=	${.CURDIR}/../libxml2
6
7
7
USES+=		gnome python shebangfix
8
USES+=		gnome python shebangfix
8
USE_GNOME=	libxml2
9
USE_GNOME=	libxml2
9
USE_PYTHON=	flavors
10
USE_PYTHON=	flavors
10
SHEBANG_FILES=	*.py doc/*.py python/*.py python/tests/*.py
11
SHEBANG_FILES=	*.py doc/*.py python/*.py python/tests/*.py
11
12
12
# Help CMake determine the correct version of Python if
13
# Tell master port we're a slave port
13
# multiple versions are installed
14
LIBXML2_SLAVE=	python
14
CMAKE_ARGS=	-DPython_EXECUTABLE=${PYTHON_CMD}
15
16
MASTERDIR=	${.CURDIR}/../libxml2
17
15
18
DESCR=		${.CURDIR}/pkg-descr
16
DESCR=		${.CURDIR}/pkg-descr
19
PLIST=		${.CURDIR}/pkg-plist
17
PLIST=		${.CURDIR}/pkg-plist
20
18
21
OPTIONS_EXCLUDE=	${OPTIONS_DEFINE}
19
OPTIONS_EXCLUDE=	${OPTIONS_DEFINE}
22
20
23
# Tell master port we're a slave port
24
LIBXML2_SLAVE=	python
25
26
do-install:
21
do-install:
27
		${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
22
		${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
28
		${INSTALL_SCRIPT} ${WRKSRC}/python/drv_libxml2.py ${STAGEDIR}${PYTHON_SITELIBDIR}
23
		${INSTALL_SCRIPT} ${WRKSRC}/python/drv_libxml2.py ${STAGEDIR}${PYTHON_SITELIBDIR}

Return to bug 279705