From 25f593892db59aaec438f91be4c711503dd7b177 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 28 May 2018 08:35:25 +0200 Subject: [PATCH 1/2] dev-libs/libxml2: Support installing version of libxml2 without support for XML catalogs. Bug: https://bugs.gentoo.org/653078 --- .../libxml2-2.9.8-catalogless-generated.patch | 498 ++++++++++++++++++ .../files/libxml2-2.9.8-catalogless.patch | 381 ++++++++++++++ dev-libs/libxml2/libxml2-2.9.8-r1.ebuild | 247 +++++++++ dev-libs/libxml2/metadata.xml | 3 + 4 files changed, 1129 insertions(+) create mode 100644 dev-libs/libxml2/files/libxml2-2.9.8-catalogless-generated.patch create mode 100644 dev-libs/libxml2/files/libxml2-2.9.8-catalogless.patch create mode 100644 dev-libs/libxml2/libxml2-2.9.8-r1.ebuild diff --git a/dev-libs/libxml2/files/libxml2-2.9.8-catalogless-generated.patch b/dev-libs/libxml2/files/libxml2-2.9.8-catalogless-generated.patch new file mode 100644 index 00000000000..d396388af2d --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.9.8-catalogless-generated.patch @@ -0,0 +1,498 @@ +Regeneration of libxml2.syms: +1. Apply libxml2-VERSION-catalogless.patch +2. Run xsltproc tool (provided by libxslt): + xsltproc -o libxml2.syms doc/syms.xsl doc/symbols.xml + +--- /libxml2.syms ++++ /libxml2.syms +@@ -1,18 +1,18 @@ + # + # Officially exported symbols, for which header +-# file definitions are installed in /usr/include/libxml2 ++# file definitions are installed in /usr/include/libxml2-catalogless + # + # Automatically generated from symbols.xml and syms.xsl + # + # Versions here are *fixed* to match the libxml2 version + # at which the symbol was introduced. This ensures that + # a new client app requiring symbol foo() can't accidentally +-# run with old libxml2.so not providing foo() - the global ++# run with old libxml2-catalogless.so not providing foo() - the global + # soname version info can't enforce this since we never + # change the soname + # + +-LIBXML2_2.4.30 { ++LIBXML2_CATALOGLESS_2.4.30 { + global: + + # debugXML +@@ -1256,7 +1256,7 @@ + xmlUTF8Strsub; + } ; + +-LIBXML2_2.5.0 { ++LIBXML2_CATALOGLESS_2.5.0 { + global: + + # globals +@@ -1293,9 +1293,9 @@ + xmlValidatePopElement; + xmlValidatePushCData; + xmlValidatePushElement; +-} LIBXML2_2.4.30; ++} LIBXML2_CATALOGLESS_2.4.30; + +-LIBXML2_2.5.2 { ++LIBXML2_CATALOGLESS_2.5.2 { + global: + + # tree +@@ -1329,9 +1329,9 @@ + + # relaxng + # xmlRelaxNGValidateStream; removed in 2.5.5 +-} LIBXML2_2.5.0; ++} LIBXML2_CATALOGLESS_2.5.0; + +-LIBXML2_2.5.4 { ++LIBXML2_CATALOGLESS_2.5.4 { + global: + + # uri +@@ -1345,23 +1345,23 @@ + xmlValidateNCName; + xmlValidateNMToken; + xmlValidateQName; +-} LIBXML2_2.5.2; ++} LIBXML2_CATALOGLESS_2.5.2; + +-LIBXML2_2.5.5 { ++LIBXML2_CATALOGLESS_2.5.5 { + global: + + # nanoftp + xmlNanoFTPDele; +-} LIBXML2_2.5.4; ++} LIBXML2_CATALOGLESS_2.5.4; + +-LIBXML2_2.5.6 { ++LIBXML2_CATALOGLESS_2.5.6 { + global: + + # xpath + xmlXPathOrderDocElems; +-} LIBXML2_2.5.5; ++} LIBXML2_CATALOGLESS_2.5.5; + +-LIBXML2_2.5.7 { ++LIBXML2_CATALOGLESS_2.5.7 { + global: + + # HTMLparser +@@ -1396,9 +1396,9 @@ + xmlTextReaderNext; + xmlTextReaderRelaxNGSetSchema; + xmlTextReaderRelaxNGValidate; +-} LIBXML2_2.5.6; ++} LIBXML2_CATALOGLESS_2.5.6; + +-LIBXML2_2.5.8 { ++LIBXML2_CATALOGLESS_2.5.8 { + global: + + # globals +@@ -1456,9 +1456,9 @@ + xmlThrDefSetGenericErrorFunc; + xmlThrDefSubstituteEntitiesDefaultValue; + xmlThrDefTreeIndentString; +-} LIBXML2_2.5.7; ++} LIBXML2_CATALOGLESS_2.5.7; + +-LIBXML2_2.5.9 { ++LIBXML2_CATALOGLESS_2.5.9 { + global: + + # xmlmemory +@@ -1477,9 +1477,9 @@ + + # xinclude + xmlXIncludeProcessTree; +-} LIBXML2_2.5.8; ++} LIBXML2_CATALOGLESS_2.5.8; + +-LIBXML2_2.6.0 { ++LIBXML2_CATALOGLESS_2.6.0 { + global: + + # SAX2 +@@ -1723,16 +1723,16 @@ + # xmlSAX2GlobalNamespace; removed in 2.6.10 + # xmlSAX2NamespaceDecl; removed in 2.6.10 + # xmlSAX2SetNamespace; removed in 2.6.10 +-} LIBXML2_2.5.9; ++} LIBXML2_CATALOGLESS_2.5.9; + +-LIBXML2_2.6.1 { ++LIBXML2_CATALOGLESS_2.6.1 { + global: + + # parser + xmlCtxtResetPush; +-} LIBXML2_2.6.0; ++} LIBXML2_CATALOGLESS_2.6.0; + +-LIBXML2_2.6.2 { ++LIBXML2_CATALOGLESS_2.6.2 { + global: + + # parserInternals +@@ -1748,9 +1748,9 @@ + xmlXIncludeFreeContext; + xmlXIncludeNewContext; + xmlXIncludeProcessNode; +-} LIBXML2_2.6.1; ++} LIBXML2_CATALOGLESS_2.6.1; + +-LIBXML2_2.6.3 { ++LIBXML2_CATALOGLESS_2.6.3 { + global: + + # pattern +@@ -1805,9 +1805,9 @@ + xmlXIncludeProcessFlags; + xmlXIncludeProcessTreeFlags; + xmlXIncludeSetFlags; +-} LIBXML2_2.6.2; ++} LIBXML2_CATALOGLESS_2.6.2; + +-LIBXML2_2.6.5 { ++LIBXML2_CATALOGLESS_2.6.5 { + global: + + # xmlmemory +@@ -1828,9 +1828,9 @@ + + # xpath + xmlXPathCtxtCompile; +-} LIBXML2_2.6.3; ++} LIBXML2_CATALOGLESS_2.6.3; + +-LIBXML2_2.6.6 { ++LIBXML2_CATALOGLESS_2.6.6 { + global: + + # tree +@@ -1841,17 +1841,17 @@ + + # xmlreader + xmlTextReaderSetStructuredErrorHandler; +-} LIBXML2_2.6.5; ++} LIBXML2_CATALOGLESS_2.6.5; + +-LIBXML2_2.6.7 { ++LIBXML2_CATALOGLESS_2.6.7 { + global: + + # xmlwriter + xmlTextWriterEndComment; + xmlTextWriterStartComment; +-} LIBXML2_2.6.6; ++} LIBXML2_CATALOGLESS_2.6.6; + +-LIBXML2_2.6.8 { ++LIBXML2_CATALOGLESS_2.6.8 { + global: + + # xmlsave +@@ -1868,9 +1868,9 @@ + xmlTextWriterEndDTDElement; + xmlTextWriterEndDTDEntity; + xmlTextWriterWriteDTDExternalEntityContents; +-} LIBXML2_2.6.7; ++} LIBXML2_CATALOGLESS_2.6.7; + +-LIBXML2_2.6.10 { ++LIBXML2_CATALOGLESS_2.6.10 { + global: + + # xmlIO +@@ -1880,9 +1880,9 @@ + # xmlsave + xmlSaveSetAttrEscape; + xmlSaveSetEscape; +-} LIBXML2_2.6.8; ++} LIBXML2_CATALOGLESS_2.6.8; + +-LIBXML2_2.6.11 { ++LIBXML2_CATALOGLESS_2.6.11 { + global: + + # uri +@@ -1905,9 +1905,9 @@ + xmlSchemaGetBuiltInType; + xmlSchemaIsBuiltInTypeFacet; + xmlSchemaValidateListSimpleTypeFacet; +-} LIBXML2_2.6.10; ++} LIBXML2_CATALOGLESS_2.6.10; + +-LIBXML2_2.6.12 { ++LIBXML2_CATALOGLESS_2.6.12 { + global: + + # parser +@@ -1921,9 +1921,9 @@ + # xmlschemas + xmlSchemaGetParserErrors; + xmlSchemaGetValidErrors; +-} LIBXML2_2.6.11; ++} LIBXML2_CATALOGLESS_2.6.11; + +-LIBXML2_2.6.14 { ++LIBXML2_CATALOGLESS_2.6.14 { + global: + + # xmlautomata +@@ -1937,9 +1937,9 @@ + xmlSchemaSetValidOptions; + xmlSchemaValidateOneElement; + xmlSchemaValidCtxtGetOptions; +-} LIBXML2_2.6.12; ++} LIBXML2_CATALOGLESS_2.6.12; + +-LIBXML2_2.6.15 { ++LIBXML2_CATALOGLESS_2.6.15 { + global: + + # debugXML +@@ -1954,9 +1954,9 @@ + xmlTextReaderConstXmlVersion; + xmlTextReaderIsNamespaceDecl; + xmlTextReaderStandalone; +-} LIBXML2_2.6.14; ++} LIBXML2_CATALOGLESS_2.6.14; + +-LIBXML2_2.6.16 { ++LIBXML2_CATALOGLESS_2.6.16 { + global: + + # xmlmemory +@@ -1964,9 +1964,9 @@ + + # relaxng + xmlRelaxNGInitTypes; +-} LIBXML2_2.6.15; ++} LIBXML2_CATALOGLESS_2.6.15; + +-LIBXML2_2.6.17 { ++LIBXML2_CATALOGLESS_2.6.17 { + global: + + # dict +@@ -1988,9 +1988,9 @@ + # xmlreader + xmlTextReaderGetParserColumnNumber; + xmlTextReaderGetParserLineNumber; +-} LIBXML2_2.6.16; ++} LIBXML2_CATALOGLESS_2.6.16; + +-LIBXML2_2.6.18 { ++LIBXML2_CATALOGLESS_2.6.18 { + global: + + # valid +@@ -2023,18 +2023,18 @@ + + # xmlreader + xmlTextReaderByteConsumed; +-} LIBXML2_2.6.17; ++} LIBXML2_CATALOGLESS_2.6.17; + +-LIBXML2_2.6.19 { ++LIBXML2_CATALOGLESS_2.6.19 { + global: + + # xmlschemastypes + xmlSchemaGetValType; + xmlSchemaValidateFacetWhtsp; + xmlSchemaValidateLengthFacetWhtsp; +-} LIBXML2_2.6.18; ++} LIBXML2_CATALOGLESS_2.6.18; + +-LIBXML2_2.6.20 { ++LIBXML2_CATALOGLESS_2.6.20 { + global: + + # tree +@@ -2061,9 +2061,9 @@ + # xmlreader + xmlTextReaderSchemaValidate; + xmlTextReaderSetSchema; +-} LIBXML2_2.6.19; ++} LIBXML2_CATALOGLESS_2.6.19; + +-LIBXML2_2.6.21 { ++LIBXML2_CATALOGLESS_2.6.21 { + global: + + # xmlautomata +@@ -2117,9 +2117,9 @@ + xmlSchematronNewValidCtxt; + xmlSchematronParse; + xmlSchematronValidateDoc; +-} LIBXML2_2.6.20; ++} LIBXML2_CATALOGLESS_2.6.20; + +-LIBXML2_2.6.23 { ++LIBXML2_CATALOGLESS_2.6.23 { + global: + + # HTMLtree +@@ -2141,9 +2141,9 @@ + + # xmlreader + xmlTextReaderSchemaValidateCtxt; +-} LIBXML2_2.6.21; ++} LIBXML2_CATALOGLESS_2.6.21; + +-LIBXML2_2.6.24 { ++LIBXML2_CATALOGLESS_2.6.24 { + global: + + # tree +@@ -2151,16 +2151,16 @@ + + # relaxng + xmlRelaxNGSetParserStructuredErrors; +-} LIBXML2_2.6.23; ++} LIBXML2_CATALOGLESS_2.6.23; + +-LIBXML2_2.6.25 { ++LIBXML2_CATALOGLESS_2.6.25 { + global: + + # xpath + xmlXPathContextSetCache; +-} LIBXML2_2.6.24; ++} LIBXML2_CATALOGLESS_2.6.24; + +-LIBXML2_2.6.27 { ++LIBXML2_CATALOGLESS_2.6.27 { + global: + + # HTMLparser +@@ -2174,30 +2174,30 @@ + + # xpath + xmlXPathCompiledEvalToBoolean; +-} LIBXML2_2.6.25; ++} LIBXML2_CATALOGLESS_2.6.25; + +-LIBXML2_2.6.28 { ++LIBXML2_CATALOGLESS_2.6.28 { + global: + + # xmlreader + xmlTextReaderSetup; +-} LIBXML2_2.6.27; ++} LIBXML2_CATALOGLESS_2.6.27; + +-LIBXML2_2.6.29 { ++LIBXML2_CATALOGLESS_2.6.29 { + global: + + # threads + xmlDllMain; +-} LIBXML2_2.6.28; ++} LIBXML2_CATALOGLESS_2.6.28; + +-LIBXML2_2.6.32 { ++LIBXML2_CATALOGLESS_2.6.32 { + global: + + # schematron + xmlSchematronSetValidStructuredErrors; +-} LIBXML2_2.6.29; ++} LIBXML2_CATALOGLESS_2.6.29; + +-LIBXML2_2.7.0 { ++LIBXML2_CATALOGLESS_2.7.0 { + global: + + # xmlmemory +@@ -2208,9 +2208,9 @@ + + # xmlschemas + xmlSchemaValidCtxtGetParserCtxt; +-} LIBXML2_2.6.32; ++} LIBXML2_CATALOGLESS_2.6.32; + +-LIBXML2_2.7.3 { ++LIBXML2_CATALOGLESS_2.7.3 { + global: + + # tree +@@ -2219,9 +2219,9 @@ + xmlLastElementChild; + xmlNextElementSibling; + xmlPreviousElementSibling; +-} LIBXML2_2.7.0; ++} LIBXML2_CATALOGLESS_2.7.0; + +-LIBXML2_2.7.4 { ++LIBXML2_CATALOGLESS_2.7.4 { + global: + + # globals +@@ -2229,9 +2229,9 @@ + + # xinclude + xmlXIncludeProcessTreeFlagsData; +-} LIBXML2_2.7.3; ++} LIBXML2_CATALOGLESS_2.7.3; + +-LIBXML2_2.8.0 { ++LIBXML2_CATALOGLESS_2.8.0 { + global: + + # xmlreader +@@ -2242,9 +2242,9 @@ + + # dict + xmlInitializeDict; +-} LIBXML2_2.7.4; ++} LIBXML2_CATALOGLESS_2.7.4; + +-LIBXML2_2.9.0 { ++LIBXML2_CATALOGLESS_2.9.0 { + global: + + # tree +@@ -2269,13 +2269,24 @@ + + # xmlwriter + xmlTextWriterSetQuoteChar; +-} LIBXML2_2.8.0; ++} LIBXML2_CATALOGLESS_2.8.0; + +-LIBXML2_2.9.1 { ++LIBXML2_CATALOGLESS_2.9.1 { + global: + + # xpath + xmlXPathNodeEval; + xmlXPathSetContextNode; +-} LIBXML2_2.9.0; ++} LIBXML2_CATALOGLESS_2.9.0; + ++LIBXML2_CATALOGLESS_2.9.8 { ++ global: ++ ++# hash ++ xmlHashDefaultDeallocator; ++} LIBXML2_CATALOGLESS_2.9.1; ++ ++LIBXML2_CATALOGLESS { ++ global: ++ *; ++}; diff --git a/dev-libs/libxml2/files/libxml2-2.9.8-catalogless.patch b/dev-libs/libxml2/files/libxml2-2.9.8-catalogless.patch new file mode 100644 index 00000000000..dde9f9fd561 --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.9.8-catalogless.patch @@ -0,0 +1,381 @@ +Install version of libxml2 without support for XML catalogs. + +libxml2.so library is renamed to libxml2-catalogless.so. +Versions of global defined symbols are renamed from LIBXML2* to LIBXML2_CATALOGLESS*. + +xmlcatalog executable is not built. +xmllint executable is built, but is not installed. + +xml2-config script is renamed to xml2-catalogless-config. +libxml2 cmake module is renamed to libxml2-catalogless. +libxml-2.0.pc pkg-config file is renamed to libxml-2.0-catalogless.pc. +xml2Conf.sh file is renamed to xml2CataloglessConf.sh. + +Location of installed headers is renamed from ${includedir}/libxml2/libxml to ${includedir}/libxml2-catalogless/libxml +due to content of xmlversion.h header being dependent on presence of support for XML catalogs. + +--- /Makefile.am ++++ /Makefile.am +@@ -15,12 +15,12 @@ + testReader testapi testModule runtest runsuite testchar \ + testdict runxmlconf testrecurse testlimits + +-bin_PROGRAMS = xmllint xmlcatalog ++noinst_PROGRAMS = xmllint + +-bin_SCRIPTS=xml2-config ++bin_SCRIPTS=xml2-catalogless-config + +-lib_LTLIBRARIES = libxml2.la +-libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) ++lib_LTLIBRARIES = libxml2-catalogless.la ++libxml2_catalogless_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) + + if USE_VERSION_SCRIPT + LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms +@@ -28,7 +28,7 @@ + LIBXML2_VERSION_SCRIPT = + endif + +-libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ ++libxml2_catalogless_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ + -version-info $(LIBXML_VERSION_INFO) \ + $(MODULE_PLATFORM_LIBS) +@@ -45,7 +45,7 @@ + trio_sources = + endif + +-libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ ++libxml2_catalogless_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ + parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ + valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ + xpointer.c xinclude.c nanohttp.c nanoftp.c \ +@@ -57,8 +57,8 @@ + xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \ + xmlmodule.c schematron.c xzlib.c + +-DEPS = $(top_builddir)/libxml2.la +-LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) ++DEPS = $(top_builddir)/libxml2-catalogless.la ++LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2-catalogless.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) + + + man_MANS = xml2-config.1 libxml.3 +@@ -111,11 +111,6 @@ + testHTML_DEPENDENCIES = $(DEPS) + testHTML_LDADD= $(LDADDS) + +-xmlcatalog_SOURCES=xmlcatalog.c +-xmlcatalog_LDFLAGS = +-xmlcatalog_DEPENDENCIES = $(DEPS) +-xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS) +- + testXPath_SOURCES=testXPath.c + testXPath_LDFLAGS = + testXPath_DEPENDENCIES = $(DEPS) +@@ -668,7 +663,9 @@ + rm result.$$name result.$$name.err ; \ + fi ; fi ; done) + +-Catatests : xmlcatalog$(EXEEXT) ++Catatests : ++ @echo "## Catalog support disabled" ++ @false + @(echo > .memdump) + @echo "## Catalog regression tests" + -@(for i in $(srcdir)/test/catalogs/*.script ; do \ +@@ -1224,25 +1221,25 @@ + rpm: cleanup cleantar + @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz) + +-## We create xml2Conf.sh here and not from configure because we want ++## We create xml2CataloglessConf.sh here and not from configure because we want + ## to get the paths expanded correctly. Macros like srcdir are given + ## the value NONE in configure if the user doesn't specify them (this + ## is an autoconf feature, not a bug). + +-xml2Conf.sh: xml2Conf.sh.in Makefile ++xml2CataloglessConf.sh: xml2Conf.sh.in Makefile + ## Use sed and then mv to avoid problems if the user interrupts. + sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \ + -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \ + -e 's?\@VERSION\@?$(VERSION)?g' \ + -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \ + < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \ +- && mv xml2Conf.tmp xml2Conf.sh ++ && mv xml2Conf.tmp xml2CataloglessConf.sh + +-CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res ++CLEANFILES = runxmlconf.log test.out xml2CataloglessConf.sh *.gcda *.gcno *.res + DISTCLEANFILES = COPYING missing.lst + + confexecdir=$(libdir) +-confexec_DATA = xml2Conf.sh ++confexec_DATA = xml2CataloglessConf.sh + CVS_EXTRA_DIST= + EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ + libxml.m4 Copyright check-xml-test-suite.py gentest.py \ +@@ -1261,10 +1258,10 @@ + + + pkgconfigdir = $(libdir)/pkgconfig +-pkgconfig_DATA = libxml-2.0.pc ++pkgconfig_DATA = libxml-2.0-catalogless.pc + +-cmakedir = $(libdir)/cmake/libxml2 +-cmake_DATA = libxml2-config.cmake ++cmakedir = $(libdir)/cmake/libxml2-catalogless ++cmake_DATA = libxml2-catalogless-config.cmake + + # + # Install the tests program sources as examples +@@ -1292,7 +1289,7 @@ + rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) + + tst: tst.c +- $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma ++ $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2-catalogless.a -lpthread -lm -lz -llzma + + sparse: clean + $(MAKE) CC=cgcc +--- /configure.ac ++++ /configure.ac +@@ -103,8 +103,6 @@ + + AC_ARG_WITH(c14n, + [ --with-c14n add the Canonicalization support (on)]) +-AC_ARG_WITH(catalog, +-[ --with-catalog add the Catalog support (on)]) + AC_ARG_WITH(debug, + [ --with-debug add the debugging module (on)]) + AC_ARG_WITH(docbook, +@@ -248,10 +246,6 @@ + then + with_c14n=no + fi +- if test "$with_catalog" = "" +- then +- with_catalog=no +- fi + echo So far so good! + if test "$with_debug" = "" + then +@@ -733,7 +727,7 @@ + [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])])) + + XML_LIBDIR='-L${libdir}' +-XML_INCLUDEDIR='-I${includedir}/libxml2' ++XML_INCLUDEDIR='-I${includedir}/libxml2-catalogless' + + dnl + dnl Extra flags +@@ -1269,16 +1263,10 @@ + AC_SUBST(TEST_VALID) + AC_SUBST(TEST_VTIME) + +-if test "$with_catalog" = "no" ; then +- echo Disabling Catalog support +- WITH_CATALOG=0 +- CATALOG_OBJ= +- TEST_CATALOG= +-else +- WITH_CATALOG=1 +- CATALOG_OBJ="catalog.o" +- TEST_CATALOG=Catatests +-fi ++echo Disabling Catalog support ++WITH_CATALOG=0 ++CATALOG_OBJ= ++TEST_CATALOG= + AC_SUBST(WITH_CATALOG) + AC_SUBST(CATALOG_OBJ) + AC_SUBST(TEST_CATALOG) +@@ -1533,8 +1521,8 @@ + WITH_ICU=1 + fi + fi +-XML_LIBS="-lxml2 $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS" +-XML_LIBTOOLLIBS="libxml2.la" ++XML_LIBS="-lxml2-catalogless $Z_LIBS $LZMA_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS" ++XML_LIBTOOLLIBS="libxml2-catalogless.la" + AC_SUBST(WITH_ICU) + + WITH_ISO8859X=1 +@@ -1695,9 +1683,9 @@ + ln -s $srcdir/Copyright COPYING + + # keep on one line for cygwin c.f. #130896 +-AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake]) ++AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0-catalogless.pc:libxml-2.0.pc.in libxml-2.0-catalogless-uninstalled.pc:libxml-2.0-uninstalled.pc.in libxml2-catalogless-config.cmake:libxml2-config.cmake.in]) + AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py]) +-AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config]) ++AC_CONFIG_FILES([xml2-catalogless-config:xml2-config.in], [chmod +x xml2-catalogless-config]) + AC_OUTPUT + + echo Done configuring +--- /doc/examples/Makefile.am ++++ /doc/examples/Makefile.am +@@ -5,7 +5,7 @@ + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include + AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +-LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) ++LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2-catalogless.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) + + CLEANFILES = *.tmp + +--- /doc/examples/index.py ++++ /doc/examples/index.py +@@ -227,7 +227,7 @@ + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include + AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +-LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) ++LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2-catalogless.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) + + CLEANFILES = *.tmp + +--- /doc/syms.xsl ++++ /doc/syms.xsl +@@ -8,26 +8,31 @@ + + # + # Officially exported symbols, for which header +-# file definitions are installed in /usr/include/libxml2 ++# file definitions are installed in /usr/include/libxml2-catalogless + # + # Automatically generated from symbols.xml and syms.xsl + # + # Versions here are *fixed* to match the libxml2 version + # at which the symbol was introduced. This ensures that + # a new client app requiring symbol foo() can't accidentally +-# run with old libxml2.so not providing foo() - the global ++# run with old libxml2-catalogless.so not providing foo() - the global + # soname version info can't enforce this since we never + # change the soname + # + + + ++ LIBXML2_CATALOGLESS { ++ global: ++ *; ++}; ++ + + + + +- LIBXML2_ ++ LIBXML2_CATALOGLESS_ + + { + global: +@@ -46,7 +51,7 @@ + + } + +- LIBXML2_ ++ LIBXML2_CATALOGLESS_ + + + ; +--- /example/Makefile.am ++++ /example/Makefile.am +@@ -2,6 +2,6 @@ + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include + AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) +-LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) ++LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2-catalogless.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD) + + gjobread_SOURCES=gjobread.c +--- /include/libxml/Makefile.am ++++ /include/libxml/Makefile.am +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-xmlincdir = $(includedir)/libxml2/libxml ++xmlincdir = $(includedir)/libxml2-catalogless/libxml + + xmlinc_HEADERS = \ + SAX.h \ +--- /libxml-2.0-uninstalled.pc.in ++++ /libxml-2.0-uninstalled.pc.in +@@ -4,9 +4,9 @@ + includedir=${pcfiledir}/include + + +-Name: libXML ++Name: libXML-catalogless + Version: @VERSION@ +-Description: libXML library version2. ++Description: libXML library version2 without Catalog support. + Requires: +-Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@ ++Libs: -L${libdir} -lxml2-catalogless @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@ + Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@ +--- /libxml-2.0.pc.in ++++ /libxml-2.0.pc.in +@@ -4,10 +4,10 @@ + includedir=@includedir@ + modules=@WITH_MODULES@ + +-Name: libXML ++Name: libXML-catalogless + Version: @VERSION@ +-Description: libXML library version2. ++Description: libXML library version2 without Catalog support. + Requires: +-Libs: -L${libdir} -lxml2 ++Libs: -L${libdir} -lxml2-catalogless + Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@ + Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ +--- /libxml2-config.cmake.in ++++ /libxml2-config.cmake.in +@@ -1,7 +1,7 @@ +-# libxml2-config.cmake ++# libxml2-catalogless-config.cmake + # -------------------- + # +-# Libxml2 cmake module. ++# Libxml2-catalogless cmake module. + # THis module sets the following variables: + # + # :: +@@ -21,9 +21,9 @@ + set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@) + set(LIBXML2_VERSION_STRING "@VERSION@") + set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir}) +-set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include ${_libxml2_rootdir}/include/libxml2) ++set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include ${_libxml2_rootdir}/include/libxml2-catalogless) + set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib) +-set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2) ++set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2-catalogless) + + if(@WITH_THREADS@) + find_package(Threads REQUIRED) +--- /python/Makefile.am ++++ /python/Makefile.am +@@ -25,7 +25,7 @@ + + libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c + libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ +- $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) ++ $(top_builddir)/libxml2-catalogless.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) + + BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c + +--- /xml2-config.in ++++ /xml2-config.in +@@ -8,7 +8,7 @@ + usage() + { + cat < /dev/null || die + eapply "${FILESDIR}"/${P}-catalogless.patch + eapply "${FILESDIR}"/${P}-catalogless-generated.patch + eautoreconf + popd > /dev/null || die + fi +} + +multilib_src_configure() { + # filter seemingly problematic CFLAGS (#26320) + filter-flags -fprefetch-loop-arrays -funroll-loops + + # USE zlib support breaks gnome2 + # (libgnomeprint for instance fails to compile with + # fresh install, and existing) - (22 Dec 2002). + + # The meaning of the 'debug' USE flag does not apply to the --with-debug + # switch (enabling the libxml2 debug module). See bug #100898. + + # --with-mem-debug causes unusual segmentation faults (bug #105120). + + libxml2_configure() { + ECONF_SOURCE="${ECONF_SOURCE-${S}}" econf \ + --with-html-subdir=${PF}/html \ + $(use_with debug run-debug) \ + $(use_with icu) \ + $(use_with lzma) \ + $(use_enable ipv6) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with readline) \ + $(multilib_native_use_with readline history) \ + "$@" + } + + libxml2_py_configure() { + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist + run_in_build_dir libxml2_configure "--with-python=${ROOT%/}${PYTHON}" # odd build system, also see bug #582130 + } + + libxml2_configure --without-python # build python bindings separately + + if use catalogless; then + mkdir -p "$(pwd)-catalogless" || die + pushd "$(pwd)-catalogless" > /dev/null || die + ECONF_SOURCE="${S}-catalogless" libxml2_configure --without-python + popd > /dev/null || die + fi + + if multilib_is_native_abi && use python; then + python_foreach_impl libxml2_py_configure + fi +} + +multilib_src_compile() { + default + + if use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + default + popd > /dev/null || die + fi + + if multilib_is_native_abi && use python; then + local native_builddir=${BUILD_DIR} + python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all + fi +} + +multilib_src_test() { + emake check + + if use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + emake check + popd > /dev/null || die + fi + + multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test +} + +multilib_src_install() { + emake DESTDIR="${D}" \ + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + + if use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + emake DESTDIR="${D}" \ + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + popd > /dev/null || die + fi + + if multilib_is_native_abi && use python; then + python_foreach_impl libxml2_py_emake \ + DESTDIR="${D}" \ + docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \ + exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \ + install + python_foreach_impl python_optimize + fi +} + +multilib_src_install_all() { + # on windows, xmllint is installed by interix libxml2 in parent prefix. + # this is the version to use. the native winnt version does not support + # symlinks, which makes repoman fail if the portage tree is linked in + # from another location (which is my default). -- mduft + if [[ ${CHOST} == *-winnt* ]]; then + rm -rf "${ED}"/usr/bin/xmllint + rm -rf "${ED}"/usr/bin/xmlcatalog + fi + + rm -rf "${ED}"/usr/share/doc/${P} + 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 +} + +pkg_postinst() { + # We don't want to do the xmlcatalog during stage1, as xmlcatalog will not + # be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887. + if [[ "${ROOT}" != "/" ]]; then + elog "Skipping XML catalog creation for stage building (bug #208887)." + else + # need an XML catalog, so no-one writes to a non-existent one + CATALOG="${EROOT}etc/xml/catalog" + + # we dont want to clobber an existing catalog though, + # only ensure that one is there + # + if [[ ! -e ${CATALOG} ]]; then + [[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml" + "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}" + einfo "Created XML catalog in ${CATALOG}" + fi + fi +} + +libxml2_py_emake() { + pushd "${BUILD_DIR}/python" > /dev/null || die + emake "$@" + popd > /dev/null +} diff --git a/dev-libs/libxml2/metadata.xml b/dev-libs/libxml2/metadata.xml index 137e67bdbf9..a9ba54bdb0d 100644 --- a/dev-libs/libxml2/metadata.xml +++ b/dev-libs/libxml2/metadata.xml @@ -5,6 +5,9 @@ gnome@gentoo.org Gentoo GNOME Desktop + + Install additional version of libxml2 without support for XML catalogs + cpe:/a:xmlsoft:libxml2 -- 2.17.0 From 8bc5d0233c23ff3557d43ba68cc9bd2665b7d43c Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 28 May 2018 08:55:56 +0200 Subject: [PATCH 2/2] dev-libs/libxslt: Support installing version of libxslt without support for XML catalogs. Bug: https://bugs.gentoo.org/653078 --- ...libxslt-1.1.32-catalogless-generated.patch | 294 ++++++++++++++ .../files/libxslt-1.1.32-catalogless.patch | 378 ++++++++++++++++++ dev-libs/libxslt/libxslt-1.1.32-r1.ebuild | 165 ++++++++ dev-libs/libxslt/metadata.xml | 3 + 4 files changed, 840 insertions(+) create mode 100644 dev-libs/libxslt/files/libxslt-1.1.32-catalogless-generated.patch create mode 100644 dev-libs/libxslt/files/libxslt-1.1.32-catalogless.patch create mode 100644 dev-libs/libxslt/libxslt-1.1.32-r1.ebuild diff --git a/dev-libs/libxslt/files/libxslt-1.1.32-catalogless-generated.patch b/dev-libs/libxslt/files/libxslt-1.1.32-catalogless-generated.patch new file mode 100644 index 00000000000..93572945954 --- /dev/null +++ b/dev-libs/libxslt/files/libxslt-1.1.32-catalogless-generated.patch @@ -0,0 +1,294 @@ +Regeneration of libxslt/libxslt.syms: +1. Apply libxslt-VERSION-catalogless.patch +2. Run xsltproc tool (provided by libxslt): + xsltproc -o libxslt/libxslt.syms doc/syms.xsl doc/symbols.xml + +--- /libxslt/libxslt.syms ++++ /libxslt/libxslt.syms +@@ -7,12 +7,12 @@ + # Versions here are *fixed* to match the libxslt version + # at which the symbol was introduced. This ensures that + # a new client app requiring symbol foo() can't accidentally +-# run with old libxslt.so not providing foo() - the global ++# run with old libxslt-catalogless.so not providing foo() - the global + # soname version info can't enforce this since we never + # change the soname + # + +-LIBXML2_1.0.11 { ++LIBXML2_CATALOGLESS_1.0.11 { + global: + + # attributes +@@ -210,42 +210,39 @@ + + # xslt + xsltCleanupGlobals; +- +- local: +- *; + } ; + +-LIBXML2_1.0.12 { ++LIBXML2_CATALOGLESS_1.0.12 { + global: + + # xsltInternals + xsltAllocateExtraCtxt; + xsltAllocateExtra; +-} LIBXML2_1.0.11; ++} LIBXML2_CATALOGLESS_1.0.11; + +-LIBXML2_1.0.13 { ++LIBXML2_CATALOGLESS_1.0.13 { + global: + + # extensions + xsltExtModuleElementPreComputeLookup; + xsltXPathGetTransformContext; +-} LIBXML2_1.0.12; ++} LIBXML2_CATALOGLESS_1.0.12; + +-LIBXML2_1.0.16 { ++LIBXML2_CATALOGLESS_1.0.16 { + global: + + # attributes + xsltResolveStylesheetAttributeSet; +-} LIBXML2_1.0.13; ++} LIBXML2_CATALOGLESS_1.0.13; + +-LIBXML2_1.0.17 { ++LIBXML2_CATALOGLESS_1.0.17 { + global: + + # transform + xsltRunStylesheetUser; +-} LIBXML2_1.0.16; ++} LIBXML2_CATALOGLESS_1.0.16; + +-LIBXML2_1.0.18 { ++LIBXML2_CATALOGLESS_1.0.18 { + global: + + # extensions +@@ -253,9 +250,9 @@ + + # xsltutils + xsltSaveResultToString; +-} LIBXML2_1.0.17; ++} LIBXML2_CATALOGLESS_1.0.17; + +-LIBXML2_1.0.22 { ++LIBXML2_CATALOGLESS_1.0.22 { + global: + + # templates +@@ -282,9 +279,9 @@ + # xsltutils + xsltSetTransformErrorFunc; + xsltTransformError; +-} LIBXML2_1.0.18; ++} LIBXML2_CATALOGLESS_1.0.18; + +-LIBXML2_1.0.24 { ++LIBXML2_CATALOGLESS_1.0.24 { + global: + + # xsltutils +@@ -318,9 +315,9 @@ + # xsltutils + xsltSetCtxtSortFunc; + xsltSetSortFunc; +-} LIBXML2_1.0.22; ++} LIBXML2_CATALOGLESS_1.0.22; + +-LIBXML2_1.0.30 { ++LIBXML2_CATALOGLESS_1.0.30 { + global: + + # xsltInternals +@@ -328,9 +325,9 @@ + xsltFreeRVTs; + xsltRegisterPersistRVT; + xsltRegisterTmpRVT; +-} LIBXML2_1.0.24; ++} LIBXML2_CATALOGLESS_1.0.24; + +-LIBXML2_1.0.32 { ++LIBXML2_CATALOGLESS_1.0.32 { + global: + + # transform +@@ -338,39 +335,39 @@ + + # extensions + xsltGetExtInfo; +-} LIBXML2_1.0.30; ++} LIBXML2_CATALOGLESS_1.0.30; + +-LIBXML2_1.0.33 { ++LIBXML2_CATALOGLESS_1.0.33 { + global: + + # pattern + xsltNormalizeCompSteps; +-} LIBXML2_1.0.32; ++} LIBXML2_CATALOGLESS_1.0.32; + +-LIBXML2_1.1.0 { ++LIBXML2_CATALOGLESS_1.1.0 { + global: + + # xsltutils + xsltGetDebuggerStatus; + xsltSetDebuggerStatus; +-} LIBXML2_1.0.33; ++} LIBXML2_CATALOGLESS_1.0.33; + +-LIBXML2_1.1.1 { ++LIBXML2_CATALOGLESS_1.1.1 { + global: + + # xsltutils + xsltDebugGetDefaultTrace; + xsltDebugSetDefaultTrace; +-} LIBXML2_1.1.0; ++} LIBXML2_CATALOGLESS_1.1.0; + +-LIBXML2_1.1.2 { ++LIBXML2_CATALOGLESS_1.1.2 { + global: + + # xsltutils + xsltSetCtxtParseOptions; +-} LIBXML2_1.1.1; ++} LIBXML2_CATALOGLESS_1.1.1; + +-LIBXML2_1.1.3 { ++LIBXML2_CATALOGLESS_1.1.3 { + global: + + # xsltInternals +@@ -382,31 +379,31 @@ + xsltGetCNsProp; + xsltSplitQName; + xsltXPathCompile; +-} LIBXML2_1.1.2; ++} LIBXML2_CATALOGLESS_1.1.2; + +-LIBXML2_1.1.5 { ++LIBXML2_CATALOGLESS_1.1.5 { + global: + + # xsltutils + xsltGetQNameURI2; +-} LIBXML2_1.1.3; ++} LIBXML2_CATALOGLESS_1.1.3; + +-LIBXML2_1.1.7 { ++LIBXML2_CATALOGLESS_1.1.7 { + global: + + # namespaces + xsltGetPlainNamespace; +-} LIBXML2_1.1.5; ++} LIBXML2_CATALOGLESS_1.1.5; + +-LIBXML2_1.1.9 { ++LIBXML2_CATALOGLESS_1.1.9 { + global: + + # documents + xsltDocDefaultLoader; # variable + xsltSetLoaderFunc; +-} LIBXML2_1.1.7; ++} LIBXML2_CATALOGLESS_1.1.7; + +-LIBXML2_1.1.18 { ++LIBXML2_CATALOGLESS_1.1.18 { + global: + + # xsltInternals +@@ -437,31 +434,31 @@ + # xsltTransStorageRemove; removed in 1.1.28 + xsltUninit; + # xsltXSLTAttrMarker; requires switch REFACTORED +-} LIBXML2_1.1.9; ++} LIBXML2_CATALOGLESS_1.1.9; + +-LIBXML2_1.1.20 { ++LIBXML2_CATALOGLESS_1.1.20 { + global: + + # transform + xsltLocalVariablePop; + xsltLocalVariablePush; +-} LIBXML2_1.1.18; ++} LIBXML2_CATALOGLESS_1.1.18; + +-LIBXML2_1.1.23 { ++LIBXML2_CATALOGLESS_1.1.23 { + global: + + # xsltInternals + xsltInitAllDocKeys; +-} LIBXML2_1.1.20; ++} LIBXML2_CATALOGLESS_1.1.20; + +-LIBXML2_1.1.24 { ++LIBXML2_CATALOGLESS_1.1.24 { + global: + + # extensions + xsltCheckExtURI; +-} LIBXML2_1.1.23; ++} LIBXML2_CATALOGLESS_1.1.23; + +-LIBXML2_1.1.25 { ++LIBXML2_CATALOGLESS_1.1.25 { + global: + + # xsltlocale +@@ -472,16 +469,16 @@ + + # extensions + xsltInitGlobals; +-} LIBXML2_1.1.24; ++} LIBXML2_CATALOGLESS_1.1.24; + +-LIBXML2_1.1.26 { ++LIBXML2_CATALOGLESS_1.1.26 { + global: + + # transform + xsltProcessOneNode; +-} LIBXML2_1.1.25; ++} LIBXML2_CATALOGLESS_1.1.25; + +-LIBXML2_1.1.27 { ++LIBXML2_CATALOGLESS_1.1.27 { + global: + + # xsltlocale +@@ -489,13 +486,17 @@ + + # xsltutils + xsltXPathCompileFlags; +-} LIBXML2_1.1.26; ++} LIBXML2_CATALOGLESS_1.1.26; + +-LIBXML2_1.1.30 { ++LIBXML2_CATALOGLESS_1.1.30 { + global: + + # xsltInternals + xsltFlagRVTs; + xsltDecimalFormatGetByQName; +-} LIBXML2_1.1.27; ++} LIBXML2_CATALOGLESS_1.1.27; + ++LIBXML2_CATALOGLESS { ++ local: ++ *; ++}; diff --git a/dev-libs/libxslt/files/libxslt-1.1.32-catalogless.patch b/dev-libs/libxslt/files/libxslt-1.1.32-catalogless.patch new file mode 100644 index 00000000000..c3bdd6a1ab1 --- /dev/null +++ b/dev-libs/libxslt/files/libxslt-1.1.32-catalogless.patch @@ -0,0 +1,378 @@ +Install version of libxslt without support for XML catalogs. + +libxslt.so library is renamed to libxslt-catalogless.so. +libexslt.so library is renamed to libexslt-catalogless.so. +Versions of global defined symbols are renamed from LIBXML2* to LIBXML2_CATALOGLESS*. + +xsltproc executable is built, but is not installed. + +xslt-config script is renamed to xslt-catalogless-config. +libxslt.pc pkg-config file is renamed to libxslt-catalogless.pc. +libexslt.pc pkg-config file is renamed to libexslt-catalogless.pc. +xsltConf.sh file is renamed to xsltCataloglessConf.sh. + +--- /Makefile.am ++++ /Makefile.am +@@ -9,9 +9,9 @@ + DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests + + confexecdir=$(libdir) +-confexec_DATA = xsltConf.sh ++confexec_DATA = xsltCataloglessConf.sh + +-bin_SCRIPTS = xslt-config ++bin_SCRIPTS = xslt-catalogless-config + + dist-hook: cleanup libxslt.spec + touch $(distdir)/doc/*.xml +@@ -27,21 +27,21 @@ + win32/libxslt/libxslt_so.dsp win32/libxslt/xsltproc.dsp \ + $(CVS_EXTRA_DIST) + +-## We create xsltConf.sh here and not from configure because we want ++## We create xsltCataloglessConf.sh here and not from configure because we want + ## to get the paths expanded correctly. Macros like srcdir are given + ## the value NONE in configure if the user doesn't specify them (this + ## is an autoconf feature, not a bug). + +-xsltConf.sh: xsltConf.sh.in Makefile ++xsltCataloglessConf.sh: xsltConf.sh.in Makefile + ## Use sed and then mv to avoid problems if the user interrupts. + sed -e 's?\@XSLT_LIBDIR\@?$(XSLT_LIBDIR)?g' \ + -e 's?\@XSLT_INCLUDEDIR\@?$(XSLT_INCLUDEDIR)?g' \ + -e 's?\@VERSION\@?$(VERSION)?g' \ + -e 's?\@XSLT_LIBS\@?$(XSLT_LIBS) $(EXTRA_LIBS)?g' \ + < $(srcdir)/xsltConf.sh.in > xsltConf.tmp \ +- && mv xsltConf.tmp xsltConf.sh ++ && mv xsltConf.tmp xsltCataloglessConf.sh + +-CLEANFILES = xsltConf.sh ++CLEANFILES = xsltCataloglessConf.sh + + check-local: tests + +@@ -70,7 +70,7 @@ + + + pkgconfigdir=$(libdir)/pkgconfig +-pkgconfig_DATA = libxslt.pc libexslt.pc ++pkgconfig_DATA = libxslt-catalogless.pc libexslt-catalogless.pc + + m4datadir = $(datadir)/aclocal + m4data_DATA = libxslt.m4 +--- /configure.ac ++++ /configure.ac +@@ -436,15 +436,15 @@ + AC_SUBST(LIBXML_SRC) + + dnl +-dnl where is xml2-config ++dnl where is xml2-catalogless-config + dnl + + AC_SUBST(LIBXML_REQUIRED_VERSION) + if test "x$LIBXML_CONFIG_PREFIX" != "x" + then +- AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false], [${LIBXML_CONFIG_PREFIX}/bin]) ++ AC_PATH_TOOL([XML_CONFIG], [xml2-catalogless-config], [false], [${LIBXML_CONFIG_PREFIX}/bin]) + else +- AC_PATH_TOOL([XML_CONFIG], [xml2-config], [false]) ++ AC_PATH_TOOL([XML_CONFIG], [xml2-catalogless-config], [false]) + fi + + dnl +@@ -481,7 +481,7 @@ + if cd $LIBXML_SRC + then + LIBXML_SRC=`pwd` +- XML_CONFIG="${LIBXML_SRC}/xml2-config" ++ XML_CONFIG="${LIBXML_SRC}/xml2-catalogless-config" + LIBXML_CFLAGS="-I${LIBXML_SRC}/include" + LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs`" + WITH_MODULES="`$XML_CONFIG --modules`" +@@ -497,13 +497,13 @@ + + if test "x$LIBXML_CONFIG_PREFIX" = "x" -a "x$LIBXML_LIBS" = "x" + then +- PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], [ +- WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`" ++ PKG_CHECK_MODULES([LIBXML], [libxml-2.0-catalogless >= $LIBXML_REQUIRED_VERSION], [ ++ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0-catalogless`" + ], [ ]) + fi + + dnl +-dnl make sure xml2-config is executable, ++dnl make sure xml2-catalogless-config is executable, + dnl test version and init our variables + dnl + +@@ -609,14 +609,14 @@ + + XSLT_LIBDIR='-L${libdir}' + XSLT_INCLUDEDIR='-I${includedir}' +-XSLT_LIBS="-lxslt $LIBXML_LIBS $M_LIBS" ++XSLT_LIBS="-lxslt-catalogless $LIBXML_LIBS $M_LIBS" + AC_SUBST(XSLT_LIBDIR) + AC_SUBST(XSLT_INCLUDEDIR) + AC_SUBST(XSLT_LIBS) + + EXSLT_LIBDIR='-L${libdir}' + EXSLT_INCLUDEDIR='-I${includedir}' +-EXSLT_LIBS="-lexslt $XSLT_LIBS $LIBGCRYPT_LIBS" ++EXSLT_LIBS="-lexslt-catalogless $XSLT_LIBS $LIBGCRYPT_LIBS" + AC_SUBST(EXSLT_LIBDIR) + AC_SUBST(EXSLT_INCLUDEDIR) + AC_SUBST(EXSLT_LIBS) +@@ -634,8 +634,8 @@ + + AC_CONFIG_FILES([ + Makefile +-libxslt.pc +-libexslt.pc ++libxslt-catalogless.pc:libxslt.pc.in ++libexslt-catalogless.pc:libexslt.pc.in + libxslt/Makefile + libxslt/xsltconfig.h + libxslt/xsltwin32config.h +@@ -673,7 +673,7 @@ + tests/exslt/crypto/Makefile + tests/plugins/Makefile + doc/Makefile +-xslt-config ++xslt-catalogless-config:xslt-config.in + libxslt.spec + ]) + +--- /doc/syms.xsl ++++ /doc/syms.xsl +@@ -15,19 +15,24 @@ + # Versions here are *fixed* to match the libxslt version + # at which the symbol was introduced. This ensures that + # a new client app requiring symbol foo() can't accidentally +-# run with old libxslt.so not providing foo() - the global ++# run with old libxslt-catalogless.so not providing foo() - the global + # soname version info can't enforce this since we never + # change the soname + # + + + ++ LIBXML2_CATALOGLESS { ++ local: ++ *; ++}; ++ + + + + +- LIBXML2_ ++ LIBXML2_CATALOGLESS_ + + { + global: +@@ -44,16 +49,9 @@ + + + +- +- +- local: +- *; +- +- +- + } + +- LIBXML2_ ++ LIBXML2_CATALOGLESS_ + + + ; +--- /libexslt/Makefile.am ++++ /libexslt/Makefile.am +@@ -4,7 +4,7 @@ + + AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS) + +-lib_LTLIBRARIES = libexslt.la ++lib_LTLIBRARIES = libexslt-catalogless.la + + exsltincdir = $(includedir)/libexslt + +@@ -14,7 +14,7 @@ + nodist_exsltinc_HEADERS = \ + exsltconfig.h + +-libexslt_la_SOURCES = \ ++libexslt_catalogless_la_SOURCES = \ + exslt.c \ + common.c \ + crypto.c \ +@@ -27,8 +27,8 @@ + libexslt.h \ + dynamic.c + +-libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(M_LIBS) +-libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info $(LIBEXSLT_VERSION_INFO) ++libexslt_catalogless_la_LIBADD = $(top_builddir)/libxslt/libxslt-catalogless.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(M_LIBS) ++libexslt_catalogless_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info $(LIBEXSLT_VERSION_INFO) + + man_MANS = libexslt.3 + +--- /libexslt.pc.in ++++ /libexslt.pc.in +@@ -4,9 +4,9 @@ + includedir=@includedir@ + + +-Name: libexslt ++Name: libexslt-catalogless + Version: @LIBEXSLT_VERSION@ +-Description: EXSLT Extension library +-Requires: libxml-2.0 ++Description: EXSLT Extension library using libXML library version 2 without Catalog support ++Requires: libxml-2.0-catalogless + Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@ + Cflags: @EXSLT_INCLUDEDIR@ +--- /libxslt/Makefile.am ++++ /libxslt/Makefile.am +@@ -2,7 +2,7 @@ + + AM_CFLAGS = $(LIBXML_CFLAGS) + +-lib_LTLIBRARIES = libxslt.la ++lib_LTLIBRARIES = libxslt-catalogless.la + + xsltincdir = $(includedir)/libxslt + +@@ -30,7 +30,7 @@ + nodist_xsltinc_HEADERS = \ + xsltconfig.h + +-libxslt_la_SOURCES = \ ++libxslt_catalogless_la_SOURCES = \ + attrvt.c \ + xslt.c \ + xsltlocale.c \ +@@ -53,7 +53,7 @@ + win32config.h \ + xsltwin32config.h.in \ + libxslt.h +-nodist_libxslt_la_SOURCES = \ ++nodist_libxslt_catalogless_la_SOURCES = \ + xsltwin32config.h + + if USE_VERSION_SCRIPT +@@ -62,8 +62,8 @@ + LIBXSLT_VERSION_SCRIPT = + endif + +-libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS) $(M_LIBS) +-libxslt_la_LDFLAGS = \ ++libxslt_catalogless_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS) $(M_LIBS) ++libxslt_catalogless_la_LDFLAGS = \ + $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXSLT_VERSION_SCRIPT) \ + -version-info $(LIBXSLT_VERSION_INFO) +--- /libxslt.pc.in ++++ /libxslt.pc.in +@@ -4,9 +4,9 @@ + includedir=@includedir@ + + +-Name: libxslt ++Name: libxslt-catalogless + Version: @VERSION@ +-Description: XSLT library version 2. +-Requires: libxml-2.0 ++Description: XSLT library version 2 using libXML library version 2 without Catalog support. ++Requires: libxml-2.0-catalogless + Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@ + Cflags: @XSLT_INCLUDEDIR@ +--- /python/Makefile.am ++++ /python/Makefile.am +@@ -23,8 +23,8 @@ + + if WITH_PYTHON + mylibs = \ +- $(top_builddir)/libxslt/libxslt.la \ +- $(top_builddir)/libexslt/libexslt.la ++ $(top_builddir)/libxslt/libxslt-catalogless.la \ ++ $(top_builddir)/libexslt/libexslt-catalogless.la + + all-local: libxslt.py + +--- /tests/plugins/Makefile.am ++++ /tests/plugins/Makefile.am +@@ -20,7 +20,7 @@ + + 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_LIBADD = $(top_builddir)/libxslt/libxslt-catalogless.la $(EXTRA_LIBS) + xmlsoft_org_xslt_testplugin_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version -rpath $(plugindir) + + test-logall: +--- /xslt-config.in ++++ /xslt-config.in +@@ -9,7 +9,7 @@ + usage() + { + cat < .memdump diff --git a/dev-libs/libxslt/libxslt-1.1.32-r1.ebuild b/dev-libs/libxslt/libxslt-1.1.32-r1.ebuild new file mode 100644 index 00000000000..09883f28f57 --- /dev/null +++ b/dev-libs/libxslt/libxslt-1.1.32-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2018 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 ~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="catalogless crypt debug examples python static-libs elibc_Darwin" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=dev-libs/libxml2-2.9.1-r5:2[catalogless?,${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_WRAPPED_HEADERS=( + /usr/include/libxslt/xsltconfig.h +) + +pkg_setup() { + MULTILIB_CHOST_TOOLS=( + /usr/bin/xslt-config + $(usex catalogless /usr/bin/xslt-catalogless-config "") + ) +} + +src_prepare() { + default + + DOCS=( AUTHORS ChangeLog FEATURES NEWS README TODO ) + + # Simplify python setup + # https://bugzilla.gnome.org/show_bug.cgi?id=758095 + eapply "${FILESDIR}"/${PV}-simplify-python.patch + eapply "${FILESDIR}"/${PN}-1.1.28-disable-static-modules.patch + + if use catalogless; then + cp -pr "${S}" "${S}-catalogless" || die + fi + + 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 + + if use catalogless; then + pushd "${S}-catalogless" > /dev/null || die + eapply "${FILESDIR}"/${P}-catalogless.patch + eapply "${FILESDIR}"/${P}-catalogless-generated.patch + eautoreconf + popd > /dev/null || die + fi +} + +multilib_src_configure() { + libxslt_configure() { + ECONF_SOURCE="${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 use catalogless; then + mkdir -p "$(pwd)-catalogless" || die + pushd "$(pwd)-catalogless" > /dev/null || die + ECONF_SOURCE="${S}-catalogless" libxslt_configure --without-python + popd > /dev/null || die + fi + + if multilib_is_native_abi && use python; then + python_foreach_impl libxslt_py_configure + fi +} + +multilib_src_compile() { + default + + if use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + default + popd > /dev/null || die + fi + + multilib_is_native_abi && use python && libxslt_foreach_py_emake all +} + +multilib_src_test() { + default + + if use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + default + popd > /dev/null || die + fi + + 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 use catalogless; then + pushd "$(pwd)-catalogless" > /dev/null || die + emake DESTDIR="${D}" install + popd > /dev/null || die + fi + + 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 + + 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}" "$@" +} diff --git a/dev-libs/libxslt/metadata.xml b/dev-libs/libxslt/metadata.xml index 4cbddcaa19a..093ed8e09d7 100644 --- a/dev-libs/libxslt/metadata.xml +++ b/dev-libs/libxslt/metadata.xml @@ -5,4 +5,7 @@ gnome@gentoo.org Gentoo GNOME Desktop + + Install additional version of libxslt without support for XML catalogs + -- 2.17.0