diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2021-05-05 00:11:31 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2021-05-05 00:17:11 +0000 |
commit | cd8e694917d3c39e6e52daca283b597a8e1c6ff2 (patch) | |
tree | 404665ea0d2b406a0eec231d8334ef64c88bc107 | |
parent | 4e07c747f64cc5b0adf3934e85f3ed979e5a9c75 (diff) | |
download | ports-cd8e694917d3c39e6e52daca283b597a8e1c6ff2.tar.gz ports-cd8e694917d3c39e6e52daca283b597a8e1c6ff2.zip |
textproc/libxml2: fix build with VALIDATION option off
Grab two commits from upstream that fix the build when
--no-valid is passed to configure; in the ports build
that translates to the VALIDATION option turned off.
These come straight from GNOME GitLab, although I've
bunged them into one patch-* file.
Not bumping PORTREVISION, since with this option off
it would never have built, and with the option on
the resulting package is unchanged.
PR: 253596
-rw-r--r-- | textproc/libxml2/Makefile | 7 | ||||
-rw-r--r-- | textproc/libxml2/files/patch-git-106757e8c1e26ad9b8c924c7f304074b79e082c5 | 39 |
2 files changed, 39 insertions, 7 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 8feafcd98017..366bb9f46f5e 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -7,13 +7,6 @@ CATEGORIES?= textproc gnome MASTER_SITES= http://xmlsoft.org/sources/ DIST_SUBDIR= gnome2 -# CVE-2019-20388, CVE-2020-7595, CVE-2020-24977, Python 3.9 support -#PATCH_SITES= https://gitlab.gnome.org/GNOME/libxml2/commit/ -#PATCHFILES= 7ffcd44d7e6c46704f8af0321d9314cd26e0e18a.patch:-p1 \ -# 0e1a49c8907645d2e155f0d89d4d9895ac5112b5.patch:-p1 \ -# 50f06b3efb638efb0abd95dc62dca05ae67882c2.patch:-p1 \ -# edc7b6abb0c125eeb888748c334897f60aab0854.patch:-p1 - MAINTAINER?= desktop@FreeBSD.org COMMENT?= XML parser library for GNOME diff --git a/textproc/libxml2/files/patch-git-106757e8c1e26ad9b8c924c7f304074b79e082c5 b/textproc/libxml2/files/patch-git-106757e8c1e26ad9b8c924c7f304074b79e082c5 new file mode 100644 index 000000000000..f4b1f8c56d0f --- /dev/null +++ b/textproc/libxml2/files/patch-git-106757e8c1e26ad9b8c924c7f304074b79e082c5 @@ -0,0 +1,39 @@ +commit 106757e8c1e26ad9b8c924c7f304074b79e082c5 +Author: Daniel Cheng <dcheng@google.com> +Date: Fri Apr 10 14:52:03 2020 -0700 + + Guard new calls to xmlValidatePopElement in xml_reader.c + + Closes #154. + +commit 386fb27654b93d9fb2880e03fb508d618a2e66f1 +Author: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> +Date: Tue Apr 28 17:00:37 2020 +0200 + + Add LIBXML_VALID_ENABLED to xmlreader + + There are already LIBXML_VALID_ENABLED in this file to guard against + "--without-valid" at "./configure" step, but here they were missing. +diff --git xmlreader.c xmlreader.c +index 687c8b3c..3fd9aa4c 100644 +--- xmlreader.c ++++ xmlreader.c +@@ -2260,14 +2260,18 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { + if (reader->ctxt != NULL) { + if (reader->dict == reader->ctxt->dict) + reader->dict = NULL; ++#ifdef LIBXML_VALID_ENABLED + if ((reader->ctxt->vctxt.vstateTab != NULL) && + (reader->ctxt->vctxt.vstateMax > 0)){ ++#ifdef LIBXML_REGEXP_ENABLED + while (reader->ctxt->vctxt.vstateNr > 0) + xmlValidatePopElement(&reader->ctxt->vctxt, NULL, NULL, NULL); ++#endif /* LIBXML_REGEXP_ENABLED */ + xmlFree(reader->ctxt->vctxt.vstateTab); + reader->ctxt->vctxt.vstateTab = NULL; + reader->ctxt->vctxt.vstateMax = 0; + } ++#endif /* LIBXML_VALID_ENABLED */ + if (reader->ctxt->myDoc != NULL) { + if (reader->preserve == 0) + xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc); |