* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2020-07-29 20:55 Matt Turner
0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2020-07-29 20:55 UTC (permalink / raw
To: gentoo-commits
commit: e1b0137912c4e66c2aba2b4354fe92e733f7f7f8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 27 08:41:26 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Jul 29 20:55:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1b01379
dev-libs/libxslt: rename patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
....32-simplify-python.patch => libxslt-1.1.32-simplify-python.patch} | 0
dev-libs/libxslt/libxslt-1.1.33-r1.ebuild | 4 ++--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dev-libs/libxslt/files/1.1.32-simplify-python.patch b/dev-libs/libxslt/files/libxslt-1.1.32-simplify-python.patch
similarity index 100%
rename from dev-libs/libxslt/files/1.1.32-simplify-python.patch
rename to dev-libs/libxslt/files/libxslt-1.1.32-simplify-python.patch
diff --git a/dev-libs/libxslt/libxslt-1.1.33-r1.ebuild b/dev-libs/libxslt/libxslt-1.1.33-r1.ebuild
index 66a2d1b8dbd..26cde21e982 100644
--- a/dev-libs/libxslt/libxslt-1.1.33-r1.ebuild
+++ b/dev-libs/libxslt/libxslt-1.1.33-r1.ebuild
@@ -43,9 +43,9 @@ src_prepare() {
# Simplify python setup
# https://bugzilla.gnome.org/show_bug.cgi?id=758095
- eapply "${FILESDIR}"/1.1.32-simplify-python.patch
+ eapply "${FILESDIR}"/${PN}-1.1.32-simplify-python.patch
eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
- eapply "${DISTDIR}"/libxslt-1.1.33-CVE-2019-11068.patch
+ eapply "${DISTDIR}"/${PN}-1.1.33-CVE-2019-11068.patch
eautoreconf
# If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2024-07-04 0:29 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2024-07-04 0:29 UTC (permalink / raw
To: gentoo-commits
commit: 8b5c0d83b88e109650baeeb1f31068205196a8e9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 4 00:23:57 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 4 00:28:12 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b5c0d83
dev-libs/libxslt: add 1.1.41
I did backport patches to help work with older libxml2 but the
tests don't build (implicit func decls) and then I saw Nick mention
in a bug [0] that 2.13 is required to fix all known problems anyway,
so let's require that (sorry).
[0] https://gitlab.gnome.org/GNOME/libxslt/-/issues/116#note_2155804
Closes: https://bugs.gentoo.org/935151
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/libxslt/Manifest | 1 +
...-1.1.41-deprecated-xmlCharEncodingHandler.patch | 93 +++++++++++
...extensions-xmlCheckFilename-older-libxml2.patch | 40 +++++
.../files/libxslt-1.1.41-libxml2-2.13.patch | 171 +++++++++++++++++++++
.../{libxslt-9999.ebuild => libxslt-1.1.41.ebuild} | 15 +-
dev-libs/libxslt/libxslt-9999.ebuild | 15 +-
6 files changed, 329 insertions(+), 6 deletions(-)
diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index 0c049556676a..b10e3d3f68d3 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1 +1,2 @@
DIST libxslt-1.1.39.tar.xz 1578216 BLAKE2B 7c87b769d345fc99a966bea6b4e94533fa211dc3a987ce013a03eefb05dde73ef75526bdecf7d32d8c77112232096fb22d8ec4f0a781b9f59d0422a2db75df01 SHA512 c0c99dc63f8b2acb6cc3ad7ad684ffa2a427ee8d1740495cbf8a7c9b9c8679f96351b4b676c73ccc191014db4cb4ab42b9a0070f6295565f39dbc665c5c16f89
+DIST libxslt-1.1.41.tar.xz 1573868 BLAKE2B 2228a4074f257edd4fa0ebb2a713b035b780b19398ba9208dedb0d0cec6777129c9bb08a80494b657a4238bea228bd752761118a0022f56d71cc1302838b1733 SHA512 b9f94d1c00dfb9f731c6c424a0d3f07fb0a37935048b26618e5405c3890d1d40c832420117de4d5363a90ab4809f77f6e566013ce7858cc88e0905709ca0f6fe
diff --git a/dev-libs/libxslt/files/libxslt-1.1.41-deprecated-xmlCharEncodingHandler.patch b/dev-libs/libxslt/files/libxslt-1.1.41-deprecated-xmlCharEncodingHandler.patch
new file mode 100644
index 000000000000..86c779c3c7cf
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.41-deprecated-xmlCharEncodingHandler.patch
@@ -0,0 +1,93 @@
+https://gitlab.gnome.org/GNOME/libxslt/-/commit/8d456f03b6b6661edfb0a3f1bc5abdc9597f60e7
+
+From 8d456f03b6b6661edfb0a3f1bc5abdc9597f60e7 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Tue, 2 Jul 2024 22:27:02 +0200
+Subject: [PATCH] utils: Don't use deprecated xmlCharEncodingHandler member
+
+---
+ libxslt/xsltutils.c | 44 ++++++++++++++++++++------------------------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
+diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c
+index 3705d28f..d493905b 100644
+--- a/libxslt/xsltutils.c
++++ b/libxslt/xsltutils.c
+@@ -1750,13 +1750,12 @@ xsltSaveResultToFilename(const char *URL, xmlDocPtr result,
+
+ XSLT_GET_IMPORT_PTR(encoding, style, encoding)
+ if (encoding != NULL) {
+- xmlCharEncodingHandlerPtr encoder;
++ xmlCharEncodingHandlerPtr encoder = NULL;
+
+- encoder = xmlFindCharEncodingHandler((char *)encoding);
+- if ((encoder != NULL) &&
+- (xmlStrEqual((const xmlChar *)encoder->name,
+- (const xmlChar *) "UTF-8")))
+- encoder = NULL;
++ /* Don't use UTF-8 dummy encoder */
++ if ((xmlStrcasecmp(encoding, BAD_CAST "UTF-8") != 0) &&
++ (xmlStrcasecmp(encoding, BAD_CAST "UTF8") != 0))
++ encoder = xmlFindCharEncodingHandler((char *) encoding);
+ buf = xmlOutputBufferCreateFilename(URL, encoder, compression);
+ } else {
+ buf = xmlOutputBufferCreateFilename(URL, NULL, compression);
+@@ -1793,13 +1792,12 @@ xsltSaveResultToFile(FILE *file, xmlDocPtr result, xsltStylesheetPtr style) {
+
+ XSLT_GET_IMPORT_PTR(encoding, style, encoding)
+ if (encoding != NULL) {
+- xmlCharEncodingHandlerPtr encoder;
++ xmlCharEncodingHandlerPtr encoder = NULL;
+
+- encoder = xmlFindCharEncodingHandler((char *)encoding);
+- if ((encoder != NULL) &&
+- (xmlStrEqual((const xmlChar *)encoder->name,
+- (const xmlChar *) "UTF-8")))
+- encoder = NULL;
++ /* Don't use UTF-8 dummy encoder */
++ if ((xmlStrcasecmp(encoding, BAD_CAST "UTF-8") != 0) &&
++ (xmlStrcasecmp(encoding, BAD_CAST "UTF8") != 0))
++ encoder = xmlFindCharEncodingHandler((char *) encoding);
+ buf = xmlOutputBufferCreateFile(file, encoder);
+ } else {
+ buf = xmlOutputBufferCreateFile(file, NULL);
+@@ -1837,13 +1835,12 @@ xsltSaveResultToFd(int fd, xmlDocPtr result, xsltStylesheetPtr style) {
+
+ XSLT_GET_IMPORT_PTR(encoding, style, encoding)
+ if (encoding != NULL) {
+- xmlCharEncodingHandlerPtr encoder;
++ xmlCharEncodingHandlerPtr encoder = NULL;
+
+- encoder = xmlFindCharEncodingHandler((char *)encoding);
+- if ((encoder != NULL) &&
+- (xmlStrEqual((const xmlChar *)encoder->name,
+- (const xmlChar *) "UTF-8")))
+- encoder = NULL;
++ /* Don't use UTF-8 dummy encoder */
++ if ((xmlStrcasecmp(encoding, BAD_CAST "UTF-8") != 0) &&
++ (xmlStrcasecmp(encoding, BAD_CAST "UTF8") != 0))
++ encoder = xmlFindCharEncodingHandler((char *) encoding);
+ buf = xmlOutputBufferCreateFd(fd, encoder);
+ } else {
+ buf = xmlOutputBufferCreateFd(fd, NULL);
+@@ -1880,13 +1877,12 @@ xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len,
+
+ XSLT_GET_IMPORT_PTR(encoding, style, encoding)
+ if (encoding != NULL) {
+- xmlCharEncodingHandlerPtr encoder;
++ xmlCharEncodingHandlerPtr encoder = NULL;
+
+- encoder = xmlFindCharEncodingHandler((char *)encoding);
+- if ((encoder != NULL) &&
+- (xmlStrEqual((const xmlChar *)encoder->name,
+- (const xmlChar *) "UTF-8")))
+- encoder = NULL;
++ /* Don't use UTF-8 dummy encoder */
++ if ((xmlStrcasecmp(encoding, BAD_CAST "UTF-8") != 0) &&
++ (xmlStrcasecmp(encoding, BAD_CAST "UTF8") != 0))
++ encoder = xmlFindCharEncodingHandler((char *) encoding);
+ buf = xmlAllocOutputBuffer(encoder);
+ if (buf == NULL)
+ xmlCharEncCloseFunc(encoder);
+--
+GitLab
diff --git a/dev-libs/libxslt/files/libxslt-1.1.41-extensions-xmlCheckFilename-older-libxml2.patch b/dev-libs/libxslt/files/libxslt-1.1.41-extensions-xmlCheckFilename-older-libxml2.patch
new file mode 100644
index 000000000000..bdf39460af2a
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.41-extensions-xmlCheckFilename-older-libxml2.patch
@@ -0,0 +1,40 @@
+https://gitlab.gnome.org/GNOME/libxslt/-/commit/a85bd17ec52793b33074f0f785c3d989feb20170
+
+From a85bd17ec52793b33074f0f785c3d989feb20170 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Fri, 21 Jun 2024 15:07:18 +0200
+Subject: [PATCH] extensions: Readd call to xmlCheckFilename with older libxml2
+
+Fix spurious warning with libxml2 before 2.13.0 caused by 014b2892.
+
+Fixes #113.
+---
+ libxslt/extensions.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/libxslt/extensions.c b/libxslt/extensions.c
+index 05cdf354..d3d61543 100644
+--- a/libxslt/extensions.c
++++ b/libxslt/extensions.c
+@@ -415,6 +415,19 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
+ module_filename, URI);
+ #endif
+
++#if LIBXML_VERSION < 21300
++ if (1 != xmlCheckFilename(module_filename)) {
++
++#ifdef WITH_XSLT_DEBUG_EXTENSIONS
++ xsltGenericDebug(xsltGenericDebugContext,
++ "xmlCheckFilename failed for plugin: %s\n", module_filename);
++#endif
++
++ xmlFree(ext_name);
++ return (-1);
++ }
++#endif
++
+ /* attempt to open the module */
+ m = xmlModuleOpen(module_filename, 0);
+ if (NULL == m) {
+--
+GitLab
diff --git a/dev-libs/libxslt/files/libxslt-1.1.41-libxml2-2.13.patch b/dev-libs/libxslt/files/libxslt-1.1.41-libxml2-2.13.patch
new file mode 100644
index 000000000000..99b89ae08f74
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.41-libxml2-2.13.patch
@@ -0,0 +1,171 @@
+https://gitlab.gnome.org/GNOME/libxslt/-/issues/116
+https://gitlab.gnome.org/GNOME/libxslt/-/commit/081cd6e97a620d035ed7df35e998e2d288bc7862
+
+From 081cd6e97a620d035ed7df35e998e2d288bc7862 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 1 Jul 2024 13:21:14 +0200
+Subject: [PATCH] transform: Handle filesystem paths after libxml2 changes
+
+After changes in libxml2 2.13, base URIs and resolved URIs can be
+filesystem paths.
+
+Check for invalid URIs and remove fragment before resolving URI in
+xsltDocumentFunction.
+
+Handle filesystem paths in xsltCheckRead.
+
+Should fix #116.
+---
+ libxslt/functions.c | 64 ++++++++++++++++++++++++++-------------------
+ libxslt/security.c | 13 +++++++++
+ 2 files changed, 50 insertions(+), 27 deletions(-)
+
+diff --git a/libxslt/functions.c b/libxslt/functions.c
+index 0c9dec43..d54f8f48 100644
+--- a/libxslt/functions.c
++++ b/libxslt/functions.c
+@@ -96,11 +96,10 @@ xsltXPathFunctionLookup (void *vctxt,
+ ************************************************************************/
+
+ static void
+-xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
++xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt,
++ const xmlChar* URI, const xmlChar *fragment)
+ {
+ xsltTransformContextPtr tctxt;
+- xmlURIPtr uri;
+- xmlChar *fragment = NULL;
+ xsltDocumentPtr idoc; /* document info */
+ xmlDocPtr doc;
+ xmlXPathContextPtr xptrctxt = NULL;
+@@ -115,26 +114,7 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
+ goto out_fragment;
+ }
+
+- uri = xmlParseURI((const char *) URI);
+- if (uri == NULL) {
+- xsltTransformError(tctxt, NULL, NULL,
+- "document() : failed to parse URI\n");
+- goto out_fragment;
+- }
+-
+- /*
+- * check for and remove fragment identifier
+- */
+- fragment = (xmlChar *)uri->fragment;
+- if (fragment != NULL) {
+- xmlChar *newURI;
+- uri->fragment = NULL;
+- newURI = xmlSaveUri(uri);
+- idoc = xsltLoadDocument(tctxt, newURI);
+- xmlFree(newURI);
+- } else
+- idoc = xsltLoadDocument(tctxt, URI);
+- xmlFreeURI(uri);
++ idoc = xsltLoadDocument(tctxt, URI);
+
+ if (idoc == NULL) {
+ if ((URI == NULL) ||
+@@ -194,7 +174,6 @@ out_fragment:
+ if (resObj == NULL)
+ resObj = xmlXPathNewNodeSet(NULL);
+ valuePush(ctxt, resObj);
+- xmlFree(fragment);
+ }
+
+ /**
+@@ -210,7 +189,8 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
+ {
+ xmlXPathObjectPtr obj, obj2 = NULL;
+ xmlChar *base = NULL, *URI;
+-
++ xmlChar *newURI = NULL;
++ xmlChar *fragment = NULL;
+
+ if ((nargs < 1) || (nargs > 2)) {
+ xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
+@@ -292,7 +272,32 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
+ valuePush(ctxt, xmlXPathNewNodeSet(NULL));
+ } else {
+ xsltTransformContextPtr tctxt;
++ xmlURIPtr uri;
++ const xmlChar *url;
++
+ tctxt = xsltXPathGetTransformContext(ctxt);
++
++ url = obj->stringval;
++
++ uri = xmlParseURI((const char *) url);
++ if (uri == NULL) {
++ xsltTransformError(tctxt, NULL, NULL,
++ "document() : failed to parse URI '%s'\n", url);
++ valuePush(ctxt, xmlXPathNewNodeSet(NULL));
++ goto error;
++ }
++
++ /*
++ * check for and remove fragment identifier
++ */
++ fragment = (xmlChar *)uri->fragment;
++ if (fragment != NULL) {
++ uri->fragment = NULL;
++ newURI = xmlSaveUri(uri);
++ url = newURI;
++ }
++ xmlFreeURI(uri);
++
+ if ((obj2 != NULL) && (obj2->nodesetval != NULL) &&
+ (obj2->nodesetval->nodeNr > 0) &&
+ IS_XSLT_REAL_NODE(obj2->nodesetval->nodeTab[0])) {
+@@ -313,7 +318,8 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
+ (xmlNodePtr) tctxt->style->doc);
+ }
+ }
+- URI = xmlBuildURI(obj->stringval, base);
++
++ URI = xmlBuildURI(url, base);
+ if (base != NULL)
+ xmlFree(base);
+ if (URI == NULL) {
+@@ -326,10 +332,14 @@ xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
+ valuePush(ctxt, xmlXPathNewNodeSet(NULL));
+ }
+ } else {
+- xsltDocumentFunctionLoadDocument( ctxt, URI );
++ xsltDocumentFunctionLoadDocument(ctxt, URI, fragment);
+ xmlFree(URI);
+ }
+ }
++
++error:
++ xmlFree(newURI);
++ xmlFree(fragment);
+ xmlXPathFreeObject(obj);
+ if (obj2 != NULL)
+ xmlXPathFreeObject(obj2);
+diff --git a/libxslt/security.c b/libxslt/security.c
+index 001ee6e4..3a66594f 100644
+--- a/libxslt/security.c
++++ b/libxslt/security.c
+@@ -422,6 +422,19 @@ xsltCheckRead(xsltSecurityPrefsPtr sec,
+ xmlURIPtr uri;
+ xsltSecurityCheck check;
+
++ if (xmlStrstr(URL, BAD_CAST "://") == NULL) {
++ check = xsltGetSecurityPrefs(sec, XSLT_SECPREF_READ_FILE);
++ if (check != NULL) {
++ ret = check(sec, ctxt, (const char *) URL);
++ if (ret == 0) {
++ xsltTransformError(ctxt, NULL, NULL,
++ "Local file read for %s refused\n", URL);
++ return(0);
++ }
++ }
++ return(1);
++ }
++
+ uri = xmlParseURI((const char *)URL);
+ if (uri == NULL) {
+ xsltTransformError(ctxt, NULL, NULL,
+--
+GitLab
diff --git a/dev-libs/libxslt/libxslt-9999.ebuild b/dev-libs/libxslt/libxslt-1.1.41.ebuild
similarity index 87%
copy from dev-libs/libxslt/libxslt-9999.ebuild
copy to dev-libs/libxslt/libxslt-1.1.41.ebuild
index 22acdc53723a..57f23538af3d 100644
--- a/dev-libs/libxslt/libxslt-9999.ebuild
+++ b/dev-libs/libxslt/libxslt-1.1.41.ebuild
@@ -25,9 +25,12 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
BDEPEND=">=virtual/pkgconfig-1"
RDEPEND="
- >=dev-libs/libxml2-2.9.11:2[${MULTILIB_USEDEP}]
- crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
+ >=dev-libs/libxml2-2.13:2[${MULTILIB_USEDEP}]
+ crypt? ( >=dev-libs/libgcrypt-1.5.3:=[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/libxml2-2.13:2[${MULTILIB_USEDEP},python,${PYTHON_USEDEP}]
+ )
"
DEPEND="${RDEPEND}"
@@ -39,6 +42,12 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libxslt/xsltconfig.h
)
+PATCHES=(
+ "${FILESDIR}"/${P}-extensions-xmlCheckFilename-older-libxml2.patch
+ "${FILESDIR}"/${P}-libxml2-2.13.patch
+ "${FILESDIR}"/${P}-deprecated-xmlCharEncodingHandler.patch
+)
+
src_prepare() {
default
diff --git a/dev-libs/libxslt/libxslt-9999.ebuild b/dev-libs/libxslt/libxslt-9999.ebuild
index 22acdc53723a..57f23538af3d 100644
--- a/dev-libs/libxslt/libxslt-9999.ebuild
+++ b/dev-libs/libxslt/libxslt-9999.ebuild
@@ -25,9 +25,12 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
BDEPEND=">=virtual/pkgconfig-1"
RDEPEND="
- >=dev-libs/libxml2-2.9.11:2[${MULTILIB_USEDEP}]
- crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
- python? ( ${PYTHON_DEPS} )
+ >=dev-libs/libxml2-2.13:2[${MULTILIB_USEDEP}]
+ crypt? ( >=dev-libs/libgcrypt-1.5.3:=[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/libxml2-2.13:2[${MULTILIB_USEDEP},python,${PYTHON_USEDEP}]
+ )
"
DEPEND="${RDEPEND}"
@@ -39,6 +42,12 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libxslt/xsltconfig.h
)
+PATCHES=(
+ "${FILESDIR}"/${P}-extensions-xmlCheckFilename-older-libxml2.patch
+ "${FILESDIR}"/${P}-libxml2-2.13.patch
+ "${FILESDIR}"/${P}-deprecated-xmlCharEncodingHandler.patch
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2022-04-17 16:44 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-04-17 16:44 UTC (permalink / raw
To: gentoo-commits
commit: e06a4aed9969ad025d82fadde2da1f4f7b98d2fd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 16:34:42 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 16:34:42 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e06a4aed
dev-libs/libxslt: drop 1.1.34-r2
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/libxslt/Manifest | 2 -
.../files/libxslt-1.1.34-CVE-2021-30560.patch | 194 ---------------------
.../files/libxslt-1.1.34-libxml2-2.9.12.patch | 120 -------------
dev-libs/libxslt/libxslt-1.1.34-r2.ebuild | 72 --------
4 files changed, 388 deletions(-)
diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index 4a8fc6108e27..e925f79f8190 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1,3 +1 @@
-DIST libxslt-1.1.34.tar.gz 3552258 BLAKE2B f043a0357e0705ab68041adf4031a6b3e0b5c3d396691c988a34963a0ee0ebe3bede2d1d7a0c5f0c42c046183653c94f4b51e10e35980a039c8cad446e84ad86 SHA512 1516a11ad608b04740674060d2c5d733b88889de5e413b9a4e8bf8d1a90d712149df6d2b1345b615f529d7c7d3fa6dae12e544da828b39c7d415e54c0ee0776b
-DIST libxslt-1.1.34.tar.gz.asc 488 BLAKE2B fff407ab2c2bbafa804e5a1f84ca447c706d75fd7489c99ac6040b625d0417a0e6c189be3457e6cc6ecd6b7860829875ea95a132fef24f8a532156361f8a5308 SHA512 9b155d4571daede99cdbf2813a85fb04812737b5e23d3f7c9840225b38f3dbf171623a21645daaee190e7ff9ba38bde932922e96a2a2312c203ffa9917c3baea
DIST libxslt-1.1.35.tar.xz 1827548 BLAKE2B 9667a93e61f50098a512c1351bce2ee937fc5d29488d010b525122d28ffedc73e0930402f3df2d378161a031dc016a15f0f03bdc343f0c4aa5d0b5c454f8002d SHA512 9dd4a699235f50ae9b75b25137e387471635b4b2da0a4e4380879cd49f1513470fcfbfd775269b066eac513a1ffa6860c77ec42747168e2348248f09f60c8c96
diff --git a/dev-libs/libxslt/files/libxslt-1.1.34-CVE-2021-30560.patch b/dev-libs/libxslt/files/libxslt-1.1.34-CVE-2021-30560.patch
deleted file mode 100644
index dcda176c513a..000000000000
--- a/dev-libs/libxslt/files/libxslt-1.1.34-CVE-2021-30560.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxslt/-/issues/56
-https://gitlab.gnome.org/GNOME/libxslt/-/commit/50f9c9cd3b7dfe9b3c8c795247752d1fdcadcac8
-https://gitlab.gnome.org/GNOME/libxslt/-/issues/51
-https://bugs.gentoo.org/790218
-
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Sat, 12 Jun 2021 20:02:53 +0200
-Subject: [PATCH] Fix use-after-free in xsltApplyTemplates
-
-xsltApplyTemplates without a select expression could delete nodes in
-the source document.
-
-1. Text nodes with strippable whitespace
-
-Whitespace from input documents is already stripped, so there's no
-need to strip it again. Under certain circumstances, xsltApplyTemplates
-could be fooled into deleting text nodes that are still referenced,
-resulting in a use-after-free.
-
-2. The DTD
-
-The DTD was only unlinked, but there's no good reason to do this just
-now. Maybe it was meant as a micro-optimization.
-
-3. Unknown nodes
-
-Useless and dangerous as well, especially with XInclude nodes.
-See https://gitlab.gnome.org/GNOME/libxml2/-/issues/268
-
-Simply stop trying to uselessly delete nodes when applying a template.
-This part of the code is probably a leftover from a time where
-xsltApplyStripSpaces wasn't implemented yet. Also note that
-xsltApplyTemplates with a select expression never tried to delete
-nodes.
-
-Also stop xsltDefaultProcessOneNode from deleting nodes for the same
-reasons.
-
-This fixes CVE-2021-30560.
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -1895,7 +1895,7 @@ static void
- xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
- xsltStackElemPtr params) {
- xmlNodePtr copy;
-- xmlNodePtr delete = NULL, cur;
-+ xmlNodePtr cur;
- int nbchild = 0, oldSize;
- int childno = 0, oldPos;
- xsltTemplatePtr template;
-@@ -1968,54 +1968,13 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node,
- return;
- }
- /*
-- * Handling of Elements: first pass, cleanup and counting
-+ * Handling of Elements: first pass, counting
- */
- cur = node->children;
- while (cur != NULL) {
-- switch (cur->type) {
-- case XML_TEXT_NODE:
-- case XML_CDATA_SECTION_NODE:
-- case XML_DOCUMENT_NODE:
-- case XML_HTML_DOCUMENT_NODE:
-- case XML_ELEMENT_NODE:
-- case XML_PI_NODE:
-- case XML_COMMENT_NODE:
-- nbchild++;
-- break;
-- case XML_DTD_NODE:
-- /* Unlink the DTD, it's still reachable using doc->intSubset */
-- if (cur->next != NULL)
-- cur->next->prev = cur->prev;
-- if (cur->prev != NULL)
-- cur->prev->next = cur->next;
-- break;
-- default:
--#ifdef WITH_XSLT_DEBUG_PROCESS
-- XSLT_TRACE(ctxt,XSLT_TRACE_PROCESS_NODE,xsltGenericDebug(xsltGenericDebugContext,
-- "xsltDefaultProcessOneNode: skipping node type %d\n",
-- cur->type));
--#endif
-- delete = cur;
-- }
-+ if (IS_XSLT_REAL_NODE(cur))
-+ nbchild++;
- cur = cur->next;
-- if (delete != NULL) {
--#ifdef WITH_XSLT_DEBUG_PROCESS
-- XSLT_TRACE(ctxt,XSLT_TRACE_PROCESS_NODE,xsltGenericDebug(xsltGenericDebugContext,
-- "xsltDefaultProcessOneNode: removing ignorable blank node\n"));
--#endif
-- xmlUnlinkNode(delete);
-- xmlFreeNode(delete);
-- delete = NULL;
-- }
-- }
-- if (delete != NULL) {
--#ifdef WITH_XSLT_DEBUG_PROCESS
-- XSLT_TRACE(ctxt,XSLT_TRACE_PROCESS_NODE,xsltGenericDebug(xsltGenericDebugContext,
-- "xsltDefaultProcessOneNode: removing ignorable blank node\n"));
--#endif
-- xmlUnlinkNode(delete);
-- xmlFreeNode(delete);
-- delete = NULL;
- }
-
- /*
-@@ -4864,7 +4823,7 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
- xsltStylePreCompPtr comp = (xsltStylePreCompPtr) castedComp;
- #endif
- int i;
-- xmlNodePtr cur, delNode = NULL, oldContextNode;
-+ xmlNodePtr cur, oldContextNode;
- xmlNodeSetPtr list = NULL, oldList;
- xsltStackElemPtr withParams = NULL;
- int oldXPProximityPosition, oldXPContextSize;
-@@ -4998,73 +4957,9 @@ xsltApplyTemplates(xsltTransformContextPtr ctxt, xmlNodePtr node,
- else
- cur = NULL;
- while (cur != NULL) {
-- switch (cur->type) {
-- case XML_TEXT_NODE:
-- if ((IS_BLANK_NODE(cur)) &&
-- (cur->parent != NULL) &&
-- (cur->parent->type == XML_ELEMENT_NODE) &&
-- (ctxt->style->stripSpaces != NULL)) {
-- const xmlChar *val;
--
-- if (cur->parent->ns != NULL) {
-- val = (const xmlChar *)
-- xmlHashLookup2(ctxt->style->stripSpaces,
-- cur->parent->name,
-- cur->parent->ns->href);
-- if (val == NULL) {
-- val = (const xmlChar *)
-- xmlHashLookup2(ctxt->style->stripSpaces,
-- BAD_CAST "*",
-- cur->parent->ns->href);
-- }
-- } else {
-- val = (const xmlChar *)
-- xmlHashLookup2(ctxt->style->stripSpaces,
-- cur->parent->name, NULL);
-- }
-- if ((val != NULL) &&
-- (xmlStrEqual(val, (xmlChar *) "strip"))) {
-- delNode = cur;
-- break;
-- }
-- }
-- /* Intentional fall-through */
-- case XML_ELEMENT_NODE:
-- case XML_DOCUMENT_NODE:
-- case XML_HTML_DOCUMENT_NODE:
-- case XML_CDATA_SECTION_NODE:
-- case XML_PI_NODE:
-- case XML_COMMENT_NODE:
-- xmlXPathNodeSetAddUnique(list, cur);
-- break;
-- case XML_DTD_NODE:
-- /* Unlink the DTD, it's still reachable
-- * using doc->intSubset */
-- if (cur->next != NULL)
-- cur->next->prev = cur->prev;
-- if (cur->prev != NULL)
-- cur->prev->next = cur->next;
-- break;
-- case XML_NAMESPACE_DECL:
-- break;
-- default:
--#ifdef WITH_XSLT_DEBUG_PROCESS
-- XSLT_TRACE(ctxt,XSLT_TRACE_APPLY_TEMPLATES,xsltGenericDebug(xsltGenericDebugContext,
-- "xsltApplyTemplates: skipping cur type %d\n",
-- cur->type));
--#endif
-- delNode = cur;
-- }
-+ if (IS_XSLT_REAL_NODE(cur))
-+ xmlXPathNodeSetAddUnique(list, cur);
- cur = cur->next;
-- if (delNode != NULL) {
--#ifdef WITH_XSLT_DEBUG_PROCESS
-- XSLT_TRACE(ctxt,XSLT_TRACE_APPLY_TEMPLATES,xsltGenericDebug(xsltGenericDebugContext,
-- "xsltApplyTemplates: removing ignorable blank cur\n"));
--#endif
-- xmlUnlinkNode(delNode);
-- xmlFreeNode(delNode);
-- delNode = NULL;
-- }
- }
- }
-
-GitLab
diff --git a/dev-libs/libxslt/files/libxslt-1.1.34-libxml2-2.9.12.patch b/dev-libs/libxslt/files/libxslt-1.1.34-libxml2-2.9.12.patch
deleted file mode 100644
index 635fb576d3de..000000000000
--- a/dev-libs/libxslt/files/libxslt-1.1.34-libxml2-2.9.12.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxslt/-/commit/9ae2f94df1721e002941b40665efb762aefcea1a
-https://gitlab.gnome.org/GNOME/libxslt/-/commit/824657768aea2cce9c23e72ba8085cb5e44350c7
-https://gitlab.gnome.org/GNOME/libxslt/-/commit/77c26bad0433541f486b1e7ced44ca9979376908
-
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Mon, 17 Aug 2020 03:42:11 +0200
-Subject: [PATCH] Stop using maxParserDepth XPath limit
-
-This will be removed again from libxml2.
---- a/tests/fuzz/fuzz.c
-+++ b/tests/fuzz/fuzz.c
-@@ -183,8 +183,7 @@ xsltFuzzXPathInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
- xpctxt = tctxt->xpathCtxt;
-
- /* Resource limits to avoid timeouts and call stack overflows */
-- xpctxt->maxParserDepth = 15;
-- xpctxt->maxDepth = 100;
-+ xpctxt->maxDepth = 500;
- xpctxt->opLimit = 500000;
-
- /* Test namespaces used in xpath.xml */
-@@ -317,8 +316,7 @@ xsltFuzzXsltInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
-
- static void
- xsltSetXPathResourceLimits(xmlXPathContextPtr ctxt) {
-- ctxt->maxParserDepth = 15;
-- ctxt->maxDepth = 100;
-+ ctxt->maxDepth = 200;
- ctxt->opLimit = 100000;
- }
-
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Mon, 17 Aug 2020 04:27:13 +0200
-Subject: [PATCH] Transfer XPath limits to XPtr context
-
-Expressions like document('doc.xml#xpointer(evil_expr)') ignored the
-XPath limits.
---- a/libxslt/functions.c
-+++ b/libxslt/functions.c
-@@ -178,10 +178,22 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
- goto out_fragment;
- }
-
-+#if LIBXML_VERSION >= 20911 || \
-+ defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
-+ xptrctxt->opLimit = ctxt->context->opLimit;
-+ xptrctxt->opCount = ctxt->context->opCount;
-+ xptrctxt->maxDepth = ctxt->context->maxDepth - ctxt->context->depth;
-+
-+ resObj = xmlXPtrEval(fragment, xptrctxt);
-+
-+ ctxt->context->opCount = xptrctxt->opCount;
-+#else
- resObj = xmlXPtrEval(fragment, xptrctxt);
-- xmlXPathFreeContext(xptrctxt);
- #endif
-
-+ xmlXPathFreeContext(xptrctxt);
-+#endif /* LIBXML_XPTR_ENABLED */
-+
- if (resObj == NULL)
- goto out_fragment;
-
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Wed, 26 Aug 2020 00:34:38 +0200
-Subject: [PATCH] Don't set maxDepth in XPath contexts
-
-The maximum recursion depth is hardcoded in libxml2 now.
---- a/libxslt/functions.c
-+++ b/libxslt/functions.c
-@@ -182,7 +182,7 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
- defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
- xptrctxt->opLimit = ctxt->context->opLimit;
- xptrctxt->opCount = ctxt->context->opCount;
-- xptrctxt->maxDepth = ctxt->context->maxDepth - ctxt->context->depth;
-+ xptrctxt->depth = ctxt->context->depth;
-
- resObj = xmlXPtrEval(fragment, xptrctxt);
-
---- a/tests/fuzz/fuzz.c
-+++ b/tests/fuzz/fuzz.c
-@@ -183,7 +183,6 @@ xsltFuzzXPathInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
- xpctxt = tctxt->xpathCtxt;
-
- /* Resource limits to avoid timeouts and call stack overflows */
-- xpctxt->maxDepth = 500;
- xpctxt->opLimit = 500000;
-
- /* Test namespaces used in xpath.xml */
-@@ -314,12 +313,6 @@ xsltFuzzXsltInit(int *argc_p ATTRIBUTE_UNUSED, char ***argv_p,
- return 0;
- }
-
--static void
--xsltSetXPathResourceLimits(xmlXPathContextPtr ctxt) {
-- ctxt->maxDepth = 200;
-- ctxt->opLimit = 100000;
--}
--
- xmlChar *
- xsltFuzzXslt(const char *data, size_t size) {
- xmlDocPtr xsltDoc;
-@@ -349,7 +342,7 @@ xsltFuzzXslt(const char *data, size_t size) {
- xmlFreeDoc(xsltDoc);
- return NULL;
- }
-- xsltSetXPathResourceLimits(sheet->xpathCtxt);
-+ sheet->xpathCtxt->opLimit = 100000;
- sheet->xpathCtxt->opCount = 0;
- if (xsltParseStylesheetUser(sheet, xsltDoc) != 0) {
- xsltFreeStylesheet(sheet);
-@@ -361,7 +354,7 @@ xsltFuzzXslt(const char *data, size_t size) {
- xsltSetCtxtSecurityPrefs(sec, ctxt);
- ctxt->maxTemplateDepth = 100;
- ctxt->opLimit = 20000;
-- xsltSetXPathResourceLimits(ctxt->xpathCtxt);
-+ ctxt->xpathCtxt->opLimit = 100000;
- ctxt->xpathCtxt->opCount = sheet->xpathCtxt->opCount;
-
- result = xsltApplyStylesheetUser(sheet, doc, NULL, NULL, NULL, ctxt);
diff --git a/dev-libs/libxslt/libxslt-1.1.34-r2.ebuild b/dev-libs/libxslt/libxslt-1.1.34-r2.ebuild
deleted file mode 100644
index 5239f0691623..000000000000
--- a/dev-libs/libxslt/libxslt-1.1.34-r2.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/danielveillard.asc
-inherit libtool multilib-minimal verify-sig
-
-# Note: Please bump this in sync with dev-libs/libxml2.
-DESCRIPTION="XSLT libraries and tools"
-HOMEPAGE="http://www.xmlsoft.org/ https://gitlab.gnome.org/GNOME/libxslt"
-SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
-SRC_URI+=" verify-sig? ( ftp://xmlsoft.org/${PN}/${P}.tar.gz.asc )"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="crypt debug examples static-libs"
-
-BDEPEND=">=virtual/pkgconfig-1
- verify-sig? ( sec-keys/openpgp-keys-danielveillard )"
-RDEPEND="
- >=dev-libs/libxml2-2.9.11:2[${MULTILIB_USEDEP}]
- crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/xslt-config
-)
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libxslt/xsltconfig.h
-)
-
-PATCHES=(
- "${FILESDIR}"/${P}-libxml2-2.9.12.patch
- "${FILESDIR}"/${P}-CVE-2021-30560.patch
-)
-
-src_prepare() {
- default
-
- DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
-
- # Prefix always needs elibtoolize if not eautoreconf'd.
- elibtoolize
-}
-
-multilib_src_configure() {
- # Python bindings were dropped as they were Python 2 only at the time
- ECONF_SOURCE="${S}" econf \
- --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
- --with-html-subdir=html \
- --without-python \
- $(use_with crypt crypto) \
- $(use_with debug) \
- $(use_with debug mem-debug) \
- $(use_enable static-libs static) \
- "$@"
-}
-
-multilib_src_install() {
- # "default" does not work here - docs are installed by multilib_src_install_all
- emake DESTDIR="${D}" install
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- find "${ED}" -type f -name "*.la" -delete || die
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2020-07-29 20:55 Matt Turner
0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2020-07-29 20:55 UTC (permalink / raw
To: gentoo-commits
commit: 239dd8d12a0181dc4a9b162a96deef14aa7889b7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 27 08:34:22 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Jul 29 20:55:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=239dd8d1
dev-libs/libxslt: security bump to 1.1.34
Note that we need the new dev-libs/libxml-2.9.10:2 in order for tests to
build successfully.
Let's require it in general because upstream may have written their code
expecting other properties which didn't show up during testing.
Bug: https://bugs.gentoo.org/700386
Closes: https://bugs.gentoo.org/703274
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
dev-libs/libxslt/Manifest | 1 +
.../files/libxslt-1.1.34-simplify-python.patch | 239 +++++++++++++++++++++
dev-libs/libxslt/libxslt-1.1.34.ebuild | 125 +++++++++++
3 files changed, 365 insertions(+)
diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index 83895cac52e..c2c9495a149 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1,2 +1,3 @@
DIST libxslt-1.1.33-CVE-2019-11068.patch 3965 BLAKE2B eb3a0741ac9f464e31e8edd276fec4d837c63676a56a446ad42a0e251508bacb0129cbe18783de305336eaa32b189ffc23e95e03cfd5f940d4dee376f1fa0f8c SHA512 9a97c5038809aaf64cb4eb7d67b95acc4b62236d7613a5f753e2a0f4c9e707c22cd07bda2e518d3f36a40b9ed5aa93496b743998c7adadb84ca147e045e35948
DIST libxslt-1.1.33.tar.gz 3444093 BLAKE2B 3457e5b62328ccbc48fbc5f71bf8a54c195c0059dd18afa38e6916e74c57e72601970446210c7584d5410b956e3bbb8cd4b852ec71e0a13c4441e6de095d86d1 SHA512 ebbe438a38bf6355950167d3b580edc22baa46a77068c18c42445c1c9c716d42bed3b30c5cd5bec359ab32d03843224dae458e9e32dc61693e7cf4bab23536e0
+DIST libxslt-1.1.34.tar.gz 3552258 BLAKE2B f043a0357e0705ab68041adf4031a6b3e0b5c3d396691c988a34963a0ee0ebe3bede2d1d7a0c5f0c42c046183653c94f4b51e10e35980a039c8cad446e84ad86 SHA512 1516a11ad608b04740674060d2c5d733b88889de5e413b9a4e8bf8d1a90d712149df6d2b1345b615f529d7c7d3fa6dae12e544da828b39c7d415e54c0ee0776b
diff --git a/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch b/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch
new file mode 100644
index 00000000000..ff7e263aca4
--- /dev/null
+++ b/dev-libs/libxslt/files/libxslt-1.1.34-simplify-python.patch
@@ -0,0 +1,239 @@
+From aa0f7a8d59a9bbd646203d3f14e39e217961f725 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 11 Nov 2015 17:49:07 +0100
+Subject: [PATCH] Simplify python setup in autoconf
+
+AM_PATH_PYTHON does most of the job without using pkg-config as expected
+from the rest of the autoconf script.
+diff --git a/Makefile.am b/Makefile.am
+index 2c417d0..a65a2b7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,9 +2,14 @@ SUBDIRS = \
+ libxslt \
+ libexslt \
+ xsltproc \
+- doc \
+- $(PYTHON_SUBDIR) \
+- tests
++ doc
++
++
++if WITH_PYTHON
++ SUBDIRS += python
++endif
++
++SUBDIRS += tests
+
+ DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests
+
+@@ -52,7 +57,9 @@ tests: dummy
+ @echo '## Running the regression test suite'
+ @(cd tests ; $(MAKE) -s tests)
+ @(cd xsltproc ; $(MAKE) -s tests)
+- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; $(MAKE) -s tests ; fi)
++if WITH_PYTHON
++ @(cd python ; $(MAKE) -s tests)
++endif
+
+ valgrind:
+ @echo '## Running the regression tests under Valgrind'
+diff --git a/configure.ac b/configure.ac
+index 325a7be..ee1eabd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -227,90 +227,37 @@ dnl
+ dnl check for python
+ dnl
+
+-PYTHON_VERSION=
+-PYTHON_INCLUDES=
+-PYTHON_SITE_PACKAGES=
+-pythondir=
+-AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found])
+-if test "$with_python" != "no" ; then
+- if test -x "$with_python/bin/python"
+- then
+- echo Found python in $with_python/bin/python
+- PYTHON="$with_python/bin/python"
+- else
+- if test -x "$with_python"
+- then
+- echo Found python in $with_python
+- PYTHON="$with_python"
+- else
+- if test -x "$PYTHON"
+- then
+- echo Found python in environment PYTHON=$PYTHON
+- with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
+- else
+- AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
+- fi
+- fi
+- fi
+- if test "$PYTHON" != ""
+- then
+- echo "PYTHON is pointing at $PYTHON"
+- PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
+- echo Found Python version $PYTHON_VERSION
+- LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
+-except: print 0"`
+- if test "$LIBXML2_PYTHON" = "1"
+- then
+- echo Found libxml2-python module
+- else
+- echo Warning: Missing libxml2-python
+- fi
+- fi
+- if test "$PYTHON_VERSION" != ""
+- then
+- if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
+- -d $with_python/lib/python$PYTHON_VERSION/site-packages
+- then
+- PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
+- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+- else
+- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+- then
+- PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
+- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+- else
+- if test -r /usr/include/python$PYTHON_VERSION/Python.h
+- then
+- PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
+- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+- else
+- echo could not find python$PYTHON_VERSION/Python.h
+- fi
+- fi
+- if test ! -d "$PYTHON_SITE_PACKAGES"
+- then
+- PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
+- fi
+- fi
+- PYTHON_LIBS=`python$PYTHON_VERSION-config --libs`
+- fi
+- if test "$with_python" != ""
+- then
+- pythondir='$(PYTHON_SITE_PACKAGES)'
+- else
+- pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+- fi
+-fi
+-AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
+-if test "$PYTHON_INCLUDES" != ""
+-then
+- PYTHON_SUBDIR=python
+-else
+- PYTHON_SUBDIR=
+-fi
+-AC_SUBST(pythondir)
+-AC_SUBST(PYTHON_SUBDIR)
+-AC_SUBST(PYTHON_LIBS)
++AC_ARG_WITH([python],
++ AS_HELP_STRING([--with-python], [Build Python bindings if found])
++)
++
++AS_IF([test "$with_python" = "yes"],
++ [AM_PATH_PYTHON
++ AC_PATH_TOOL([PYTHON_CONFIG], [python$PYTHON_VERSION-config], [no])
++ AS_IF([test "$PYTHON_CONFIG" = "no"],
++ [AC_PATH_TOOL([PYTHON_CONFIG], [python-config], [no])])
++ AS_IF([test "$PYTHON_CONFIG" != "no"],
++ [PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags`
++ PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
++ PYTHON_LIBS=`$PYTHON_CONFIG --libs`],
++ [AC_MSG_ERROR([Missing python development files.])])
++ AC_MSG_CHECKING([libxml2 module in $PYTHON])
++ LIBXML2_PYTHON=`$PYTHON -c "import sys;
++try:
++ import libxml2
++ sys.stdout.write('1')
++except:
++ sys.stdout.write('0')"`
++ AS_IF([test "$LIBXML2_PYTHON" = "1"],
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_RESULT([no])
++ AC_MSG_WARN([libxml2 python module not found, expect runtime errors])])
++ ])
++
++AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
++AC_SUBST([PYTHON_CFLAGS])
++AC_SUBST([PYTHON_LDFLAGS])
++AC_SUBST([PYTHON_LIBS])
+
+ AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
+ WITH_CRYPTO=0
+@@ -634,10 +581,6 @@ AC_SUBST(PYTHONSODV)
+ AC_SUBST(XML_CONFIG)
+ AC_SUBST(LIBXML_LIBS)
+ AC_SUBST(LIBXML_CFLAGS)
+-AC_SUBST(PYTHON)
+-AC_SUBST(PYTHON_VERSION)
+-AC_SUBST(PYTHON_INCLUDES)
+-AC_SUBST(PYTHON_SITE_PACKAGES)
+
+ XSLT_LIBDIR='-L${libdir}'
+ XSLT_INCLUDEDIR='-I${includedir}'
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 17a0d17..1c57a63 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -5,7 +5,7 @@ SUBDIRS= . tests
+
+ AM_CFLAGS = $(LIBXML_CFLAGS)
+
+-DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
++docsdir = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
+ # libxsltclass.txt is generated
+ DOCS=
+
+@@ -16,10 +16,7 @@ EXTRA_DIST = \
+ libxml_wrap.h \
+ libxslt_wrap.h \
+ libxsl.py \
+- libxslt-python-api.xml \
+- $(DOCS)
+-
+-libxsltmod_la_LDFLAGS = -module -avoid-version
++ libxslt-python-api.xml
+
+ if WITH_PYTHON
+ mylibs = \
+@@ -28,31 +25,22 @@ mylibs = \
+
+ all-local: libxslt.py
+
+-python_LTLIBRARIES = libxsltmod.la
++python_PYTHON = libxslt.py
++pyexec_LTLIBRARIES = libxsltmod.la
+
+ libxsltmod_la_CPPFLAGS = \
+- -I$(PYTHON_INCLUDES) \
+ -I$(top_srcdir)/libxslt \
+ -I$(top_srcdir) \
+- -I../libexslt
++ -I$(top_srcdir)/libexslt \
++ $(PYTHON_CFLAGS)
+ libxsltmod_la_SOURCES = libxslt.c types.c
+ nodist_libxsltmod_la_SOURCES = libxslt-py.c
+ libxsltmod_la_LIBADD = $(mylibs) $(PYTHON_LIBS)
++libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
+
+ libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
+ cat $(srcdir)/libxsl.py libxsltclass.py > $@
+
+-install-data-local:
+- $(MKDIR_P) $(DESTDIR)$(pythondir)
+- $(INSTALL) -m 0644 libxslt.py $(DESTDIR)$(pythondir)
+- $(MKDIR_P) $(DESTDIR)$(DOCS_DIR)
+- @(for doc in $(DOCS) ; \
+- do $(INSTALL) -m 0644 $(srcdir)/$$doc $(DESTDIR)$(DOCS_DIR) ; done)
+-
+-uninstall-local:
+- rm -f $(DESTDIR)$(pythondir)/libxslt.py
+- rm -rf $(DESTDIR)$(DOCS_DIR)
+-
+ GENERATE = generator.py
+ API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml
+ GENERATED= libxsltclass.py \
diff --git a/dev-libs/libxslt/libxslt-1.1.34.ebuild b/dev-libs/libxslt/libxslt-1.1.34.ebuild
new file mode 100644
index 00000000000..27eaf8ce921
--- /dev/null
+++ b/dev-libs/libxslt/libxslt-1.1.34.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit autotools multilib-minimal python-r1 toolchain-funcs
+
+DESCRIPTION="XSLT libraries and tools"
+HOMEPAGE="http://www.xmlsoft.org/"
+SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt debug examples python static-libs elibc_Darwin"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=dev-libs/libxml2-2.9.10:2[${MULTILIB_USEDEP}]
+ crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/libxml2:2[python,${PYTHON_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/xslt-config
+)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libxslt/xsltconfig.h
+)
+
+src_prepare() {
+ default
+
+ DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
+
+ # Simplify python setup
+ # https://bugzilla.gnome.org/show_bug.cgi?id=758095
+ eapply "${FILESDIR}"/${PN}-1.1.34-simplify-python.patch
+ eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
+
+ eautoreconf
+ # If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
+ # and it is propably otherwise too if upstream generated with new
+ # autoconf
+# epunt_cxx
+ # But Prefix always needs elibtoolize if not eautoreconf'd.
+# elibtoolize
+}
+
+multilib_src_configure() {
+ libxslt_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-html-subdir=html \
+ $(use_with crypt crypto) \
+ $(use_with debug) \
+ $(use_with debug mem-debug) \
+ $(use_enable static-libs static) \
+ "$@"
+ }
+
+ libxslt_py_configure() {
+ mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
+ run_in_build_dir libxslt_configure --with-python
+ }
+
+ libxslt_configure --without-python # build python bindings separately
+
+ if multilib_is_native_abi && use python; then
+ python_foreach_impl libxslt_py_configure
+ fi
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake all
+}
+
+multilib_src_test() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake test
+}
+
+multilib_src_install() {
+ # "default" does not work here - docs are installed by multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python; then
+ libxslt_foreach_py_emake \
+ DESTDIR="${D}" \
+ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+ EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
+ install
+ python_foreach_impl python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if ! use examples && use python; then
+ rm -r "${ED}"/usr/share/doc/${PF}/python/examples || die
+ fi
+
+ find "${ED}" -type f -name "*.la" -delete || die
+}
+
+libxslt_foreach_py_emake() {
+ libxslt_py_emake() {
+ pushd "${BUILD_DIR}/python" > /dev/null || die
+ emake "$@"
+ popd > /dev/null
+ }
+ local native_builddir=${BUILD_DIR}
+ python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2018-03-02 17:07 Mart Raudsepp
0 siblings, 0 replies; 6+ messages in thread
From: Mart Raudsepp @ 2018-03-02 17:07 UTC (permalink / raw
To: gentoo-commits
commit: 6b84cea1d4bcf7efd30689dda626e31117dbca60
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 2 17:05:21 2018 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Fri Mar 2 17:07:02 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b84cea1
dev-libs/libxslt: security cleanup
Package-Manager: Portage-2.3.19, Repoman-2.3.6
dev-libs/libxslt/Manifest | 1 -
.../files/libxslt-1.1.28-simplify-python.patch | 250 ---------------------
dev-libs/libxslt/files/libxslt-1.1.29-cygwin.patch | 29 ---
dev-libs/libxslt/libxslt-1.1.29-r1.ebuild | 130 -----------
4 files changed, 410 deletions(-)
diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index 7c4fd3bf5ed..12817c52ce2 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1,2 +1 @@
-DIST libxslt-1.1.29.tar.gz 3428524 BLAKE2B e37cc4a79223c2c2b78dc2bbc0bdb502e7c9ac0e5e1f6dc1ad15a14fda3c26d5c92e7354141763eeb97f489b64af99a2c7da320405b6011195a95c11705e7f2a SHA512 a1ce555a74a9dabe65e8f64bb66e27e77760fd76940d88f2d59f58dd63ca73c8ae59f3fcbd8e76c8f92ff992fb0c09328528c20ea38ccac83e63252106bf5f31
DIST libxslt-1.1.30.tar.gz 3444029 BLAKE2B 668371393a11c0c16d1549fe771fef7dea96a7208f359578b773c9e7d4c6c4accbe43500e960d58e8f2275682a839582f1f40c1bd984745b8e3944a1d9a97582 SHA512 d24e37398503b6bc29245a993738df51bf3948c4a8f052eedd7eac0a9fcff2d5b54220f37070c46f763e073c34bdb3153c9f129aa0df60c3d7cf7eadbbf15986
diff --git a/dev-libs/libxslt/files/libxslt-1.1.28-simplify-python.patch b/dev-libs/libxslt/files/libxslt-1.1.28-simplify-python.patch
deleted file mode 100644
index 7cbaaf69e09..00000000000
--- a/dev-libs/libxslt/files/libxslt-1.1.28-simplify-python.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From f8aeca1dca05c7053532c576add6ab4a472c5e4e Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 11 Nov 2015 17:49:07 +0100
-Subject: [PATCH] Simplify python setup in autoconf
-
-AM_PATH_PYTHON does most of the job without using pkg-config as expected
-from the rest of the autoconf script.
----
- Makefile.am | 14 +++++--
- configure.in | 119 ++++++++++++++---------------------------------------
- python/Makefile.am | 28 ++++---------
- 3 files changed, 49 insertions(+), 112 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index e357f19..c396913 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,9 +2,13 @@ SUBDIRS = \
- libxslt \
- libexslt \
- xsltproc \
-- doc \
-- $(PYTHON_SUBDIR) \
-- tests
-+ doc
-+
-+if WITH_PYTHON
-+SUBDIRS += python
-+endif
-+
-+SUBDIRS += tests
-
- DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests
-
-@@ -51,7 +55,9 @@ tests: dummy
- @echo '## Running the regression test suite'
- @(cd tests ; $(MAKE) tests)
- @(cd xsltproc ; $(MAKE) tests)
-- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; $(MAKE) tests ; fi)
-+if WITH_PYTHON
-+ @(cd python ; $(MAKE) tests)
-+endif
-
- valgrind:
- @echo '## Running the regression tests under Valgrind'
-diff --git a/configure.in b/configure.in
-index e84ad4f..102c733 100644
---- a/configure.in
-+++ b/configure.in
-@@ -291,90 +291,37 @@ dnl
- dnl check for python
- dnl
-
--PYTHON_VERSION=
--PYTHON_INCLUDES=
--PYTHON_SITE_PACKAGES=
--pythondir=
--AC_ARG_WITH(python, [ --with-python[=DIR] Build Python bindings if found])
--if test "$with_python" != "no" ; then
-- if test -x "$with_python/bin/python"
-- then
-- echo Found python in $with_python/bin/python
-- PYTHON="$with_python/bin/python"
-- else
-- if test -x "$with_python"
-- then
-- echo Found python in $with_python
-- PYTHON="$with_python"
-- else
-- if test -x "$PYTHON"
-- then
-- echo Found python in environment PYTHON=$PYTHON
-- with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
-- else
-- AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
-- fi
-- fi
-- fi
-- if test "$PYTHON" != ""
-- then
-- echo "PYTHON is pointing at $PYTHON"
-- PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
-- echo Found Python version $PYTHON_VERSION
-- LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
--except: print 0"`
-- if test "$LIBXML2_PYTHON" = "1"
-- then
-- echo Found libxml2-python module
-- else
-- echo Warning: Missing libxml2-python
-- fi
-- fi
-- if test "$PYTHON_VERSION" != ""
-- then
-- if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
-- -d $with_python/lib/python$PYTHON_VERSION/site-packages
-- then
-- PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
-- else
-- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
-- then
-- PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
-- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
-- else
-- if test -r /usr/include/python$PYTHON_VERSION/Python.h
-- then
-- PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
-- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
-- else
-- echo could not find python$PYTHON_VERSION/Python.h
-- fi
-- fi
-- if test ! -d "$PYTHON_SITE_PACKAGES"
-- then
-- PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
-- fi
-- fi
-- PYTHON_LIBS=`python$PYTHON_VERSION-config --libs`
-- fi
-- if test "$with_python" != ""
-- then
-- pythondir='$(PYTHON_SITE_PACKAGES)'
-- else
-- pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
-- fi
--fi
--AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
--if test "$PYTHON_INCLUDES" != ""
--then
-- PYTHON_SUBDIR=python
--else
-- PYTHON_SUBDIR=
--fi
--AC_SUBST(pythondir)
--AC_SUBST(PYTHON_SUBDIR)
--AC_SUBST(PYTHON_LIBS)
-+AC_ARG_WITH([python],
-+ AS_HELP_STRING([--with-python], [Build Python bindings if found])
-+)
-+
-+AS_IF([test "$with_python" = "yes"],
-+ [AM_PATH_PYTHON
-+ AC_PATH_TOOL([PYTHON_CONFIG], [python$PYTHON_VERSION-config], [no])
-+ AS_IF([test "$PYTHON_CONFIG" = "no"],
-+ [AC_PATH_TOOL([PYTHON_CONFIG], [python-config], [no])])
-+ AS_IF([test "$PYTHON_CONFIG" != "no"],
-+ [PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags`
-+ PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
-+ PYTHON_LIBS=`$PYTHON_CONFIG --libs`],
-+ [AC_MSG_ERROR([Missing python development files.])])
-+ AC_MSG_CHECKING([libxml2 module in $PYTHON])
-+ LIBXML2_PYTHON=`$PYTHON -c "import sys;
-+try:
-+ import libxml2
-+ sys.stdout.write('1')
-+except:
-+ sys.stdout.write('0')"`
-+ AS_IF([test "$LIBXML2_PYTHON" = "1"],
-+ [AC_MSG_RESULT([yes])],
-+ [AC_MSG_RESULT([no])
-+ AC_MSG_WARN([libxml2 python module not found, expect runtime errors])])
-+ ])
-+
-+AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
-+AC_SUBST([PYTHON_CFLAGS])
-+AC_SUBST([PYTHON_LDFLAGS])
-+AC_SUBST([PYTHON_LIBS])
-
- AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
- WITH_CRYPTO=0
-@@ -644,10 +591,6 @@ AC_SUBST(PYTHONSODV)
- AC_SUBST(XML_CONFIG)
- AC_SUBST(LIBXML_LIBS)
- AC_SUBST(LIBXML_CFLAGS)
--AC_SUBST(PYTHON)
--AC_SUBST(PYTHON_VERSION)
--AC_SUBST(PYTHON_INCLUDES)
--AC_SUBST(PYTHON_SITE_PACKAGES)
-
- XSLT_LIBDIR='-L${libdir}'
- XSLT_INCLUDEDIR='-I${includedir}'
-diff --git a/python/Makefile.am b/python/Makefile.am
-index fa58b78..3a5ecd6 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -5,9 +5,9 @@ SUBDIRS= . tests
-
- AM_CFLAGS = $(LIBXML_CFLAGS)
-
--DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
-+docsdir = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
- # libxsltclass.txt is generated
--DOCS = TODO
-+dist_docs_DATA = TODO
-
- EXTRA_DIST = \
- libxslt.c \
-@@ -16,10 +16,7 @@ EXTRA_DIST = \
- libxml_wrap.h \
- libxslt_wrap.h \
- libxsl.py \
-- libxslt-python-api.xml \
-- $(DOCS)
--
--libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version
-+ libxslt-python-api.xml
-
- if WITH_PYTHON
- mylibs = \
-@@ -28,31 +25,22 @@ mylibs = \
-
- all-local: libxslt.py
-
--python_LTLIBRARIES = libxsltmod.la
-+python_PYTHON = libxslt.py
-+pyexec_LTLIBRARIES = libxsltmod.la
-
- libxsltmod_la_CPPFLAGS = \
-- -I$(PYTHON_INCLUDES) \
- -I$(top_srcdir)/libxslt \
- -I$(top_srcdir) \
-- -I../libexslt
-+ -I$(top_srcdir)/libexslt \
-+ $(PYTHON_CFLAGS)
- libxsltmod_la_SOURCES = libxslt.c types.c
- nodist_libxsltmod_la_SOURCES = libxslt-py.c
- libxsltmod_la_LIBADD = $(mylibs) $(PYTHON_LIBS)
-+libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) $(PYTHON_LDFLAGS) -module -avoid-version
-
- libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
- cat $(srcdir)/libxsl.py libxsltclass.py > $@
-
--install-data-local:
-- $(MKDIR_P) $(DESTDIR)$(pythondir)
-- $(INSTALL) -m 0644 libxslt.py $(DESTDIR)$(pythondir)
-- $(MKDIR_P) $(DESTDIR)$(DOCS_DIR)
-- @(for doc in $(DOCS) ; \
-- do $(INSTALL) -m 0644 $(srcdir)/$$doc $(DESTDIR)$(DOCS_DIR) ; done)
--
--uninstall-local:
-- rm -f $(DESTDIR)$(pythondir)/libxslt.py
-- rm -rf $(DESTDIR)$(DOCS_DIR)
--
- GENERATE = generator.py
- API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml
- GENERATED= libxsltclass.py \
---
-2.6.3
-
diff --git a/dev-libs/libxslt/files/libxslt-1.1.29-cygwin.patch b/dev-libs/libxslt/files/libxslt-1.1.29-cygwin.patch
deleted file mode 100644
index 221da9a55da..00000000000
--- a/dev-libs/libxslt/files/libxslt-1.1.29-cygwin.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2fbf5b1f440534a46b7b440a487768620cfb039c Mon Sep 17 00:00:00 2001
-From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
-Date: Wed, 13 Jul 2016 13:31:05 +0200
-Subject: Add WIN32_EXTRA_LDFLAGS to tests/plugins/Makefile.am
-
-Fixes a compilation problem with Cygwin.
-
-Fixes bug #766669:
-https://bugzilla.gnome.org/show_bug.cgi?id=766669
----
- tests/plugins/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am
-index e0736ab..0f8c378 100644
---- a/tests/plugins/Makefile.am
-+++ b/tests/plugins/Makefile.am
-@@ -21,7 +21,7 @@ plugindir = $(abs_builddir)/.libs
- xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
- xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
- xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
--xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version -rpath $(plugindir)
-+xmlsoft_org_xslt_testplugin_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version -rpath $(plugindir)
-
- test-logall:
- @echo '## Running plugin tests'
---
-cgit v0.12
-
diff --git a/dev-libs/libxslt/libxslt-1.1.29-r1.ebuild b/dev-libs/libxslt/libxslt-1.1.29-r1.ebuild
deleted file mode 100644
index 75eb8487331..00000000000
--- a/dev-libs/libxslt/libxslt-1.1.29-r1.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="xml"
-
-inherit autotools ltprune python-r1 toolchain-funcs multilib-minimal
-
-DESCRIPTION="XSLT libraries and tools"
-HOMEPAGE="http://www.xmlsoft.org/"
-SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="arm64 m68k s390 sh"
-
-IUSE="crypt debug examples python static-libs"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="
- >=dev-libs/libxml2-2.9.1-r5:2[${MULTILIB_USEDEP}]
- crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
- python? (
- ${PYTHON_DEPS}
- dev-libs/libxml2:2[python,${PYTHON_USEDEP}] )
-"
-DEPEND="${RDEPEND}"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/xslt-config
-)
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/libxslt/xsltconfig.h
-)
-
-src_prepare() {
- default
-
- DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
-
- # https://bugzilla.gnome.org/show_bug.cgi?id=684621
- eapply "${FILESDIR}"/${PN}.m4-${PN}-1.1.26.patch
- # https://bugzilla.gnome.org/show_bug.cgi?id=766669
- eapply "${FILESDIR}"/${PN}-1.1.29-cygwin.patch
-
- # Simplify python setup
- eapply "${FILESDIR}"/${PN}-1.1.28-simplify-python.patch
- eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
-
- mv configure.{in,ac} || die
-
- eautoreconf
- # If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
- # and it is propably otherwise too if upstream generated with new
- # autoconf
-# epunt_cxx
- # But Prefix always needs elibtoolize if not eautoreconf'd.
-# elibtoolize
-}
-
-multilib_src_configure() {
- libxslt_configure() {
- ECONF_SOURCE="${S}" econf \
- --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
- --with-html-subdir=html \
- $(use_with crypt crypto) \
- $(use_with debug) \
- $(use_with debug mem-debug) \
- $(use_enable static-libs static) \
- "$@"
- }
-
- libxslt_py_configure() {
- mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
- run_in_build_dir libxslt_configure --with-python
- }
-
- libxslt_configure --without-python # build python bindings separately
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl libxslt_py_configure
- fi
-}
-
-multilib_src_compile() {
- default
- multilib_is_native_abi && use python && libxslt_foreach_py_emake all
-}
-
-multilib_src_test() {
- default
- multilib_is_native_abi && use python && libxslt_foreach_py_emake test
-}
-
-multilib_src_install() {
- # "default" does not work here - docs are installed by multilib_src_install_all
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use python; then
- libxslt_foreach_py_emake \
- DESTDIR="${D}" \
- docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
- EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
- install
- python_foreach_impl python_optimize
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- if ! use examples; then
- rm -rf "${ED}"/usr/share/doc/${PF}/examples
- rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
- fi
-
- prune_libtool_files --modules
-}
-
-libxslt_foreach_py_emake() {
- libxslt_py_emake() {
- pushd "${BUILD_DIR}/python" > /dev/null || die
- emake "$@"
- popd > /dev/null
- }
- local native_builddir=${BUILD_DIR}
- python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/
@ 2017-09-12 22:04 Gilles Dartiguelongue
0 siblings, 0 replies; 6+ messages in thread
From: Gilles Dartiguelongue @ 2017-09-12 22:04 UTC (permalink / raw
To: gentoo-commits
commit: 69d42e2e58df1596567edca2c6bc6c2bacdf89c2
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 21:50:20 2017 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 22:03:02 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69d42e2e
dev-libs/libxslt: fix xslt-config, bug #630784
Closes: https://bugs.gentoo.org/630784
Package-Manager: Portage-2.3.8, Repoman-2.3.3
.../libxslt/files/1.1.30-unbreak-xslt-config.patch | 37 ++++++
dev-libs/libxslt/libxslt-1.1.30-r1.ebuild | 133 +++++++++++++++++++++
2 files changed, 170 insertions(+)
diff --git a/dev-libs/libxslt/files/1.1.30-unbreak-xslt-config.patch b/dev-libs/libxslt/files/1.1.30-unbreak-xslt-config.patch
new file mode 100644
index 00000000000..6e367f97691
--- /dev/null
+++ b/dev-libs/libxslt/files/1.1.30-unbreak-xslt-config.patch
@@ -0,0 +1,37 @@
+From 9608d20739b36087f0e6865cc924769d3b286188 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Tue, 12 Sep 2017 23:44:35 +0200
+Subject: [PATCH] Move XML_CONFIG assignment to unbreak xslt-config
+
+Bug: https://bugs.gentoo.org/630784
+---
+ configure.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e6f649cd..49e6b6cf 100644
+--- a/configure.in
++++ b/configure.in
+@@ -518,9 +518,6 @@ else
+ LIBXML_MANUAL_SEARCH=yes
+ fi
+
+-if test "x$LIBXML_MANUAL_SEARCH" != "xno"
+-then
+-
+ dnl
+ dnl where is xml2-config
+ dnl
+@@ -534,6 +531,9 @@ else
+ AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false])
+ fi
+
++if test "x$LIBXML_MANUAL_SEARCH" != "xno"
++then
++
+ dnl
+ dnl imported from libxml2, c.f. #77827
+ dnl
+--
+2.14.1
+
diff --git a/dev-libs/libxslt/libxslt-1.1.30-r1.ebuild b/dev-libs/libxslt/libxslt-1.1.30-r1.ebuild
new file mode 100644
index 00000000000..739f5be1305
--- /dev/null
+++ b/dev-libs/libxslt/libxslt-1.1.30-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit autotools ltprune python-r1 toolchain-funcs multilib-minimal
+
+DESCRIPTION="XSLT libraries and tools"
+HOMEPAGE="http://www.xmlsoft.org/"
+SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt debug examples python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=dev-libs/libxml2-2.9.1-r5:2[${MULTILIB_USEDEP}]
+ crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/libxml2:2[python,${PYTHON_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/xslt-config
+)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/libxslt/xsltconfig.h
+)
+
+src_prepare() {
+ default
+
+ DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO )
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=684621
+ eapply "${FILESDIR}"/${PN}.m4-${PN}-1.1.26.patch
+
+ # Simplify python setup
+ # https://bugzilla.gnome.org/show_bug.cgi?id=758095
+ eapply "${FILESDIR}"/${PN}-1.1.30-simplify-python.patch
+ eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch
+
+ # Fix xslt-config
+ # https://bugs.gentoo.org/630784
+ eapply "${FILESDIR}"/1.1.30-unbreak-xslt-config.patch
+
+ mv configure.{in,ac} || die
+
+ eautoreconf
+ # If eautoreconf'd with new autoconf, then epunt_cxx is not necessary
+ # and it is propably otherwise too if upstream generated with new
+ # autoconf
+# epunt_cxx
+ # But Prefix always needs elibtoolize if not eautoreconf'd.
+# elibtoolize
+}
+
+multilib_src_configure() {
+ libxslt_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --with-html-dir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-html-subdir=html \
+ $(use_with crypt crypto) \
+ $(use_with debug) \
+ $(use_with debug mem-debug) \
+ $(use_enable static-libs static) \
+ "$@"
+ }
+
+ libxslt_py_configure() {
+ mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
+ run_in_build_dir libxslt_configure --with-python
+ }
+
+ libxslt_configure --without-python # build python bindings separately
+
+ if multilib_is_native_abi && use python; then
+ python_foreach_impl libxslt_py_configure
+ fi
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake all
+}
+
+multilib_src_test() {
+ default
+ multilib_is_native_abi && use python && libxslt_foreach_py_emake test
+}
+
+multilib_src_install() {
+ # "default" does not work here - docs are installed by multilib_src_install_all
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python; then
+ libxslt_foreach_py_emake \
+ DESTDIR="${D}" \
+ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+ EXAMPLE_DIR="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
+ install
+ python_foreach_impl python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if ! use examples; then
+ rm -rf "${ED}"/usr/share/doc/${PF}/examples
+ rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
+ fi
+
+ prune_libtool_files --modules
+}
+
+libxslt_foreach_py_emake() {
+ libxslt_py_emake() {
+ pushd "${BUILD_DIR}/python" > /dev/null || die
+ emake "$@"
+ popd > /dev/null
+ }
+ local native_builddir=${BUILD_DIR}
+ python_foreach_impl libxslt_py_emake top_builddir="${native_builddir}" "$@"
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-04 0:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-29 20:55 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/files/, dev-libs/libxslt/ Matt Turner
-- strict thread matches above, loose matches on Subject: below --
2024-07-04 0:29 Sam James
2022-04-17 16:44 Sam James
2020-07-29 20:55 Matt Turner
2018-03-02 17:07 Mart Raudsepp
2017-09-12 22:04 Gilles Dartiguelongue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox