textproc/libxslt: sync with upstream

Taken from: HardenedBSD
This commit is contained in:
Franco Fichtner 2019-11-17 04:12:29 +01:00
parent 37c98f113e
commit 250056f648
11 changed files with 5 additions and 164 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libxslt
PORTVERSION= 1.1.33
DISTVERSION= 1.1.34
CATEGORIES?= textproc gnome
MASTER_SITES= http://xmlsoft.org/sources/ \
https://mirror.umd.edu/xbmc/build-deps/sources/

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1562883477
SHA256 (gnome2/libxslt-1.1.33.tar.gz) = 8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8
SIZE (gnome2/libxslt-1.1.33.tar.gz) = 3444093
TIMESTAMP = 1572803425
SHA256 (gnome2/libxslt-1.1.34.tar.gz) = 98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
SIZE (gnome2/libxslt-1.1.34.tar.gz) = 3552258

View File

@ -1,12 +0,0 @@
--- Makefile.in.orig 2012-10-22 16:13:46.000000000 +0000
+++ Makefile.in 2012-10-22 16:14:29.000000000 +0000
@@ -327,8 +327,7 @@
libexslt \
xsltproc \
doc \
- $(PYTHON_SUBDIR) \
- tests
+ $(PYTHON_SUBDIR)
DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests
confexecdir = $(libdir)

View File

@ -1,25 +0,0 @@
--- configure.orig 2009-09-18 15:31:26.000000000 -0400
+++ configure 2009-09-18 15:35:31.000000000 -0400
@@ -4770,7 +4770,7 @@ fi
if test "${with_html_subdir+set}" = set; then
withval=$with_html_subdir; test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"
else
- HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"
+ HTML_DIR="$HTML_DIR/\$(PACKAGE)"
fi
@@ -15572,11 +15572,12 @@ except: print 0"`
fi
if test "$PYTHON_VERSION" != ""
then
+ with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
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'
+ PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
else
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
then

View File

@ -1,26 +0,0 @@
--- libxslt/keys.c.orig 2017-12-02 03:58:51.000000000 -0500
+++ libxslt/keys.c 2019-06-12 08:38:40.214472000 -0400
@@ -629,6 +629,7 @@ xsltInitCtxtKey(xsltTransformContextPtr ctxt, xsltDocu
xmlNodePtr oldContextNode;
xsltDocumentPtr oldDocInfo;
int oldXPPos, oldXPSize;
+ xmlNodePtr oldXPNode;
xmlDocPtr oldXPDoc;
int oldXPNsNr;
xmlNsPtr *oldXPNamespaces;
@@ -667,6 +668,7 @@ fprintf(stderr, "xsltInitCtxtKey %s : %d\n", keyDef->n
oldDocInfo = ctxt->document;
oldContextNode = ctxt->node;
+ oldXPNode = xpctxt->node;
oldXPDoc = xpctxt->doc;
oldXPPos = xpctxt->proximityPosition;
oldXPSize = xpctxt->contextSize;
@@ -865,6 +867,7 @@ error:
/*
* Restore context state.
*/
+ xpctxt->node = oldXPNode;
xpctxt->doc = oldXPDoc;
xpctxt->nsNr = oldXPNsNr;
xpctxt->namespaces = oldXPNamespaces;

View File

@ -1,8 +0,0 @@
--- libxslt/xsltconfig.h.in.orig Mon Mar 26 20:55:08 2001
+++ libxslt/xsltconfig.h.in Thu Apr 19 22:20:46 2001
@@ -23,3 +23,5 @@
#ifdef __GNUC__
+#ifndef __FreeBSD__
#include <ansidecl.h>
+#endif
#ifndef ATTRIBUTE_UNUSED

View File

@ -1,34 +0,0 @@
--- libxslt/documents.c.orig 2015-05-10 14:11:29 UTC
+++ libxslt/documents.c
@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const x
int res;
res = xsltCheckRead(ctxt->sec, ctxt, URI);
- if (res == 0) {
- xsltTransformError(ctxt, NULL, NULL,
- "xsltLoadDocument: read rights for %s denied\n",
- URI);
+ if (res <= 0) {
+ if (res == 0)
+ xsltTransformError(ctxt, NULL, NULL,
+ "xsltLoadDocument: read rights for %s denied\n",
+ URI);
return(NULL);
}
}
@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const x
int res;
res = xsltCheckRead(sec, NULL, URI);
- if (res == 0) {
- xsltTransformError(NULL, NULL, NULL,
- "xsltLoadStyleDocument: read rights for %s denied\n",
- URI);
+ if (res <= 0) {
+ if (res == 0)
+ xsltTransformError(NULL, NULL, NULL,
+ "xsltLoadStyleDocument: read rights for %s denied\n",
+ URI);
return(NULL);
}
}

View File

@ -1,18 +0,0 @@
--- libxslt/imports.c.orig 2015-09-28 01:15:21 UTC
+++ libxslt/imports.c
@@ -131,10 +131,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xml
int secres;
secres = xsltCheckRead(sec, NULL, URI);
- if (secres == 0) {
- xsltTransformError(NULL, NULL, NULL,
- "xsl:import: read rights for %s denied\n",
- URI);
+ if (secres <= 0) {
+ if (secres == 0)
+ xsltTransformError(NULL, NULL, NULL,
+ "xsl:import: read rights for %s denied\n",
+ URI);
goto error;
}
}

View File

@ -1,18 +0,0 @@
--- libxslt/transform.c.orig 2017-10-30 07:49:55 UTC
+++ libxslt/transform.c
@@ -3485,10 +3485,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNode
*/
if (ctxt->sec != NULL) {
ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
- if (ret == 0) {
- xsltTransformError(ctxt, NULL, inst,
- "xsltDocumentElem: write rights for %s denied\n",
- filename);
+ if (ret <= 0) {
+ if (ret == 0)
+ xsltTransformError(ctxt, NULL, inst,
+ "xsltDocumentElem: write rights for %s denied\n",
+ filename);
xmlFree(URL);
xmlFree(filename);
return;

View File

@ -1,18 +0,0 @@
--- libxslt/xslt.c.orig 2017-10-26 07:55:47 UTC
+++ libxslt/xslt.c
@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
int res;
res = xsltCheckRead(sec, NULL, filename);
- if (res == 0) {
- xsltTransformError(NULL, NULL, NULL,
- "xsltParseStylesheetFile: read rights for %s denied\n",
- filename);
+ if (res <= 0) {
+ if (res == 0)
+ xsltTransformError(NULL, NULL, NULL,
+ "xsltParseStylesheetFile: read rights for %s denied\n",
+ filename);
return(NULL);
}
}

View File

@ -31,7 +31,7 @@ lib/libexslt.so.0.8.20
lib/libxslt.a
lib/libxslt.so
lib/libxslt.so.1
lib/libxslt.so.1.1.33
lib/libxslt.so.1.1.34
lib/xsltConf.sh
libdata/pkgconfig/libexslt.pc
libdata/pkgconfig/libxslt.pc