dev-libs/libxml2: Sync with Gentoo

It's from Gentoo commit 1d5bd1a5da5ec5cbe2b77533ae16f46ddd394140.
This commit is contained in:
Flatcar Buildbot 2023-05-22 07:12:38 +00:00 committed by Krzesimir Nowak
parent 86edf014ef
commit dd327fe3c3
9 changed files with 402 additions and 33 deletions

View File

@ -1,5 +1,5 @@
DIST libxml2-2.10.3.tar.xz 2639908 BLAKE2B aef2cc87e4632ddc478ff719155fdcb17601a8af37ecc1145ca05e01340935b57f07722e016ca2b27e4b269d47bd2fe97db09119a47849e8745e077e42b8bb66 SHA512 33bb87ae9a45c475c3de09477e5d94840d8f687f893ef7839408bc7267e57611c4f2b863ed8ec819a4b5f1ebd6a122db9f6054c73bceed427d37f3e67f62620c
DIST libxml2-2.10.4.tar.xz 2643600 BLAKE2B 5bbb63c6e58accf434513aeb974fed7349e5458de642ef89db77768c8d1383532614254e0e3f1d9471e2274c6b81a04a0a3afcb602707ce79550c2bd8e9028d9 SHA512 792c1dceb098cd353a7eca4c46d31cce6310b2553d97fd3918cf0b94d93b2480759202036511bde36c24166236bd4616f57e79959eea9afe3f60614bdfe13094 DIST libxml2-2.10.4.tar.xz 2643600 BLAKE2B 5bbb63c6e58accf434513aeb974fed7349e5458de642ef89db77768c8d1383532614254e0e3f1d9471e2274c6b81a04a0a3afcb602707ce79550c2bd8e9028d9 SHA512 792c1dceb098cd353a7eca4c46d31cce6310b2553d97fd3918cf0b94d93b2480759202036511bde36c24166236bd4616f57e79959eea9afe3f60614bdfe13094
DIST libxml2-2.11.4.tar.xz 2626756 BLAKE2B 5d7e6388291a8473195131f5cb22aee9a4182f28fd8eed468c449b762d363cfb1713a7466c1f98e96cf819ed8f78e13a6ba930c2fadd8d63869b6efe8e8be8a8 SHA512 c1df7441c729430bdd2de52e9da69b171afc4b776e4a2eb43acbc71ada7a3814a465247fb5fca4c83ecf1c281f7745069ec3d051a7964cb7cc119a3d983f93ba
DIST xmlts20130923.tar.gz 641522 BLAKE2B 63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be SHA512 d5c4d26b324ed21f4e0641cd7f8b76dbf9de80df8b519982e44d41c960df29fd03618e02e9693b2d11ad06d19c4a965274c95a048ec3b9653eacb919a7f8b733 DIST xmlts20130923.tar.gz 641522 BLAKE2B 63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be SHA512 d5c4d26b324ed21f4e0641cd7f8b76dbf9de80df8b519982e44d41c960df29fd03618e02e9693b2d11ad06d19c4a965274c95a048ec3b9653eacb919a7f8b733
DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288
DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe

View File

@ -0,0 +1,63 @@
https://gitlab.gnome.org/GNOME/libxml2/-/commit/9c1f5fe7fbad2b57149c628802c4ded3e4f3d284
From 9c1f5fe7fbad2b57149c628802c4ded3e4f3d284 Mon Sep 17 00:00:00 2001
From: Mike Dalessio <mike.dalessio@gmail.com>
Date: Fri, 5 May 2023 17:34:57 -0400
Subject: [PATCH] autoconf: fix iconv library paths
and pass cflags when building executables
See 0f77167f for prior related work
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,11 +145,12 @@ runsuite_DEPENDENCIES = $(DEPS)
runsuite_LDADD= $(LDADDS)
xmllint_SOURCES=xmllint.c
-xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS)
+xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
xmllint_DEPENDENCIES = $(DEPS)
xmllint_LDADD= $(RDL_LIBS) $(LDADDS)
xmlcatalog_SOURCES=xmlcatalog.c
+xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
xmlcatalog_DEPENDENCIES = $(DEPS)
xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
--- a/configure.ac
+++ b/configure.ac
@@ -1036,7 +1036,7 @@ else
if test "$with_iconv" != "yes" && test "$with_iconv" != "" ; then
ICONV_DIR=$with_iconv
CPPFLAGS="$CPPFLAGS -I$ICONV_DIR/include"
- LIBS="$LIBS -L$ICONV_DIR/libs"
+ LIBS="$LIBS -L$ICONV_DIR/lib"
# Export this since our headers include iconv.h
XML_INCLUDEDIR="$XML_INCLUDEDIR -I$ICONV_DIR/include"
fi
@@ -1052,12 +1052,13 @@ else
ICONV_LIBS="-liconv"])])])
if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
ICONV_CFLAGS="-I$ICONV_DIR/include"
- ICONV_LIBS="-L$ICONV_DIR/libs $ICONV_LIBS"
+ ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS"
fi
CPPFLAGS=$_cppflags
LIBS=$_libs
fi
AC_SUBST(WITH_ICONV)
+AC_SUBST(ICONV_CFLAGS)
dnl
dnl Checks for ICU library.
@@ -1100,7 +1101,7 @@ else
ICU_LIBS=-licucore
if test "$ICU_DIR" != ""; then
ICU_CFLAGS="-I$ICU_DIR/include"
- ICU_LIBS="-L$ICU_DIR/libs $ICU_LIBS"
+ ICU_LIBS="-L$ICU_DIR/lib $ICU_LIBS"
fi])])
CPPFLAGS=$_cppflags
LIBS=$_libs
--
GitLab

View File

@ -0,0 +1,27 @@
https://gitlab.gnome.org/GNOME/libxml2/-/commit/e6a9cc8d66778c20435a46e50d4e5866deace5f6
From e6a9cc8d66778c20435a46e50d4e5866deace5f6 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 6 May 2023 15:28:13 +0200
Subject: [PATCH] hash: Fix possible startup crash with old libxslt versions
Call xmlInitParser in xmlHashCreate to make it work if the library
wasn't initialized yet.
Otherwise, exsltRegisterAll from libxslt 1.1.24 or older might cause
a crash.
See #534.
--- a/hash.c
+++ b/hash.c
@@ -180,6 +180,8 @@ xmlHashTablePtr
xmlHashCreate(int size) {
xmlHashTablePtr table;
+ xmlInitParser();
+
if (size <= 0)
size = 256;
--
GitLab

View File

@ -0,0 +1,245 @@
https://gitlab.gnome.org/GNOME/libxml2/-/commit/41e78f8f8656b8e2206c06995da6bd8dcc82823d
From 41e78f8f8656b8e2206c06995da6bd8dcc82823d Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Mon, 8 May 2023 23:12:33 +0200
Subject: [PATCH] xpath: Fix build without LIBXML_XPATH_ENABLED
Move static function declaration into XPATH block. Also move comparison
functions.
Fixes #537.
--- a/xpath.c
+++ b/xpath.c
@@ -145,6 +145,114 @@
* any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
*/
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+
+/************************************************************************
+ * *
+ * Floating point stuff *
+ * *
+ ************************************************************************/
+
+double xmlXPathNAN = 0.0;
+double xmlXPathPINF = 0.0;
+double xmlXPathNINF = 0.0;
+
+/**
+ * xmlXPathInit:
+ *
+ * DEPRECATED: Alias for xmlInitParser.
+ */
+void
+xmlXPathInit(void) {
+ xmlInitParser();
+}
+
+/**
+ * xmlInitXPathInternal:
+ *
+ * Initialize the XPath environment
+ */
+ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
+void
+xmlInitXPathInternal(void) {
+#if defined(NAN) && defined(INFINITY)
+ xmlXPathNAN = NAN;
+ xmlXPathPINF = INFINITY;
+ xmlXPathNINF = -INFINITY;
+#else
+ /* MSVC doesn't allow division by zero in constant expressions. */
+ double zero = 0.0;
+ xmlXPathNAN = 0.0 / zero;
+ xmlXPathPINF = 1.0 / zero;
+ xmlXPathNINF = -xmlXPathPINF;
+#endif
+}
+
+/**
+ * xmlXPathIsNaN:
+ * @val: a double value
+ *
+ * Returns 1 if the value is a NaN, 0 otherwise
+ */
+int
+xmlXPathIsNaN(double val) {
+#ifdef isnan
+ return isnan(val);
+#else
+ return !(val == val);
+#endif
+}
+
+/**
+ * xmlXPathIsInf:
+ * @val: a double value
+ *
+ * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise
+ */
+int
+xmlXPathIsInf(double val) {
+#ifdef isinf
+ return isinf(val) ? (val > 0 ? 1 : -1) : 0;
+#else
+ if (val >= xmlXPathPINF)
+ return 1;
+ if (val <= -xmlXPathPINF)
+ return -1;
+ return 0;
+#endif
+}
+
+#endif /* SCHEMAS or XPATH */
+
+#ifdef LIBXML_XPATH_ENABLED
+
+/*
+ * TODO: when compatibility allows remove all "fake node libxslt" strings
+ * the test should just be name[0] = ' '
+ */
+#ifdef DEBUG_XPATH_EXPRESSION
+#define DEBUG_STEP
+#define DEBUG_EXPR
+#define DEBUG_EVAL_COUNTS
+#endif
+
+static xmlNs xmlXPathXMLNamespaceStruct = {
+ NULL,
+ XML_NAMESPACE_DECL,
+ XML_XML_NAMESPACE,
+ BAD_CAST "xml",
+ NULL,
+ NULL
+};
+static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
+#ifndef LIBXML_THREAD_ENABLED
+/*
+ * Optimizer is disabled only when threaded apps are detected while
+ * the library ain't compiled for thread safety.
+ */
+static int xmlXPathDisableOptimizer = 0;
+#endif
+
static void
xmlXPathNodeSetClear(xmlNodeSetPtr set, int hasNsNodes);
@@ -475,114 +583,6 @@ int wrap_cmp( xmlNodePtr x, xmlNodePtr y );
#include "timsort.h"
#endif /* WITH_TIM_SORT */
-#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-
-/************************************************************************
- * *
- * Floating point stuff *
- * *
- ************************************************************************/
-
-double xmlXPathNAN = 0.0;
-double xmlXPathPINF = 0.0;
-double xmlXPathNINF = 0.0;
-
-/**
- * xmlXPathInit:
- *
- * DEPRECATED: Alias for xmlInitParser.
- */
-void
-xmlXPathInit(void) {
- xmlInitParser();
-}
-
-/**
- * xmlInitXPathInternal:
- *
- * Initialize the XPath environment
- */
-ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
-void
-xmlInitXPathInternal(void) {
-#if defined(NAN) && defined(INFINITY)
- xmlXPathNAN = NAN;
- xmlXPathPINF = INFINITY;
- xmlXPathNINF = -INFINITY;
-#else
- /* MSVC doesn't allow division by zero in constant expressions. */
- double zero = 0.0;
- xmlXPathNAN = 0.0 / zero;
- xmlXPathPINF = 1.0 / zero;
- xmlXPathNINF = -xmlXPathPINF;
-#endif
-}
-
-/**
- * xmlXPathIsNaN:
- * @val: a double value
- *
- * Returns 1 if the value is a NaN, 0 otherwise
- */
-int
-xmlXPathIsNaN(double val) {
-#ifdef isnan
- return isnan(val);
-#else
- return !(val == val);
-#endif
-}
-
-/**
- * xmlXPathIsInf:
- * @val: a double value
- *
- * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise
- */
-int
-xmlXPathIsInf(double val) {
-#ifdef isinf
- return isinf(val) ? (val > 0 ? 1 : -1) : 0;
-#else
- if (val >= xmlXPathPINF)
- return 1;
- if (val <= -xmlXPathPINF)
- return -1;
- return 0;
-#endif
-}
-
-#endif /* SCHEMAS or XPATH */
-
-#ifdef LIBXML_XPATH_ENABLED
-
-/*
- * TODO: when compatibility allows remove all "fake node libxslt" strings
- * the test should just be name[0] = ' '
- */
-#ifdef DEBUG_XPATH_EXPRESSION
-#define DEBUG_STEP
-#define DEBUG_EXPR
-#define DEBUG_EVAL_COUNTS
-#endif
-
-static xmlNs xmlXPathXMLNamespaceStruct = {
- NULL,
- XML_NAMESPACE_DECL,
- XML_XML_NAMESPACE,
- BAD_CAST "xml",
- NULL,
- NULL
-};
-static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
-#ifndef LIBXML_THREAD_ENABLED
-/*
- * Optimizer is disabled only when threaded apps are detected while
- * the library ain't compiled for thread safety.
- */
-static int xmlXPathDisableOptimizer = 0;
-#endif
-
/************************************************************************
* *
* Error handling routines *
--
GitLab

View File

@ -0,0 +1,27 @@
https://gitlab.gnome.org/GNOME/libxml2/-/commit/7c14859d0779797a93ea75744266425028599944
From 7c14859d0779797a93ea75744266425028599944 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Tue, 9 May 2023 13:28:06 +0200
Subject: [PATCH] parser: Fix "huge input lookup" error with push parser
Fix parsing of larger documents without XML_PARSE_HUGE.
Should fix #538.
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -418,9 +418,10 @@ xmlParserShrink(xmlParserCtxtPtr ctxt) {
xmlParserInputBufferPtr buf = in->buf;
size_t used;
- /* Don't shrink memory buffers. */
+ /* Don't shrink pull parser memory buffers. */
if ((buf == NULL) ||
- ((buf->encoder == NULL) && (buf->readcallback == NULL)))
+ ((ctxt->progressive == 0) &&
+ (buf->encoder == NULL) && (buf->readcallback == NULL)))
return;
used = in->cur - in->base;
--
GitLab

View File

@ -0,0 +1,21 @@
https://gitlab.gnome.org/GNOME/libxml2/-/commit/55f221a4c57903ced5721008607d4133d6eb51cf
From 55f221a4c57903ced5721008607d4133d6eb51cf Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Wed, 10 May 2023 18:13:47 +0200
Subject: [PATCH] autotools: Fix ICU detection
Fixes #540.
--- a/configure.ac
+++ b/configure.ac
@@ -1096,7 +1096,7 @@ else
fi
AC_CHECK_HEADER(unicode/ucnv.h, [
- AC_CHECK_LIB([icucore], [uconv_open], [
+ AC_CHECK_LIB([icucore], [ucnv_open], [
WITH_ICU=1
ICU_LIBS=-licucore
if test "$ICU_DIR" != ""; then
--
GitLab

View File

@ -23,7 +23,7 @@ if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3 inherit autotools git-r3
else else
inherit gnome.org libtool inherit gnome.org libtool
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi fi
SRC_URI+=" SRC_URI+="

View File

@ -5,9 +5,9 @@ EAPI=8
# Note: Please bump in sync with dev-libs/libxslt # Note: Please bump in sync with dev-libs/libxslt
PYTHON_COMPAT=( python3_{9..11} ) PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="xml(+)" PYTHON_REQ_USE="xml(+)"
inherit flag-o-matic python-r1 multilib-minimal toolchain-funcs inherit flag-o-matic python-r1 multilib-minimal
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16" XSTS_NAME_1="xmlschema2002-01-16"
@ -23,7 +23,7 @@ if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3 inherit autotools git-r3
else else
inherit gnome.org libtool inherit gnome.org libtool
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi fi
SRC_URI+=" SRC_URI+="
@ -31,7 +31,8 @@ SRC_URI+="
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
https://www.w3.org/XML/Test/${XMLCONF_TARBALL} https://www.w3.org/XML/Test/${XMLCONF_TARBALL}
)" )
"
S="${WORKDIR}/${PN}-${PV%_rc*}" S="${WORKDIR}/${PN}-${PV%_rc*}"
LICENSE="MIT" LICENSE="MIT"
@ -40,11 +41,13 @@ IUSE="debug examples +ftp icu lzma +python readline static-libs test"
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] RDEPEND="
>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= )" readline? ( sys-libs/readline:= )
"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig" BDEPEND="virtual/pkgconfig"
@ -56,10 +59,6 @@ MULTILIB_CHOST_TOOLS=(
/usr/bin/xml2-config /usr/bin/xml2-config
) )
PATCHES=( "${FILESDIR}"/${PN}-2.10.3-python3-unicode-errors.patch )
DOCS=( NEWS README.md TODO TODO_SCHEMAS python/TODO )
src_unpack() { src_unpack() {
if [[ ${PV} == 9999 ]] ; then if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack git-r3_src_unpack
@ -102,13 +101,6 @@ multilib_src_configure() {
# Filter seemingly problematic CFLAGS (bug #26320) # Filter seemingly problematic CFLAGS (bug #26320)
filter-flags -fprefetch-loop-arrays -funroll-loops filter-flags -fprefetch-loop-arrays -funroll-loops
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
# Notes: # Notes:
# The meaning of the 'debug' USE flag does not apply to the --with-debug # The meaning of the 'debug' USE flag does not apply to the --with-debug
# switch (enabling the libxml2 debug module). See bug #100898. # switch (enabling the libxml2 debug module). See bug #100898.

View File

@ -5,9 +5,9 @@ EAPI=8
# Note: Please bump in sync with dev-libs/libxslt # Note: Please bump in sync with dev-libs/libxslt
PYTHON_COMPAT=( python3_{9..11} ) PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="xml(+)" PYTHON_REQ_USE="xml(+)"
inherit flag-o-matic python-r1 multilib-minimal toolchain-funcs inherit flag-o-matic python-r1 multilib-minimal
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16" XSTS_NAME_1="xmlschema2002-01-16"
@ -31,7 +31,8 @@ SRC_URI+="
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
https://www.w3.org/XML/Test/${XMLCONF_TARBALL} https://www.w3.org/XML/Test/${XMLCONF_TARBALL}
)" )
"
S="${WORKDIR}/${PN}-${PV%_rc*}" S="${WORKDIR}/${PN}-${PV%_rc*}"
LICENSE="MIT" LICENSE="MIT"
@ -40,11 +41,13 @@ IUSE="debug examples +ftp icu lzma +python readline static-libs test"
RESTRICT="!test? ( test )" RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] RDEPEND="
>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= )" readline? ( sys-libs/readline:= )
"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig" BDEPEND="virtual/pkgconfig"
@ -56,8 +59,6 @@ MULTILIB_CHOST_TOOLS=(
/usr/bin/xml2-config /usr/bin/xml2-config
) )
DOCS=( NEWS README.md TODO TODO_SCHEMAS python/TODO )
src_unpack() { src_unpack() {
if [[ ${PV} == 9999 ]] ; then if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack git-r3_src_unpack
@ -100,13 +101,6 @@ multilib_src_configure() {
# Filter seemingly problematic CFLAGS (bug #26320) # Filter seemingly problematic CFLAGS (bug #26320)
filter-flags -fprefetch-loop-arrays -funroll-loops filter-flags -fprefetch-loop-arrays -funroll-loops
# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
# https://github.com/gentoo/gentoo/pull/28355
# mold needs this too but right now tc-ld-is-mold is also not available
if tc-ld-is-lld; then
append-ldflags -Wl,--undefined-version
fi
# Notes: # Notes:
# The meaning of the 'debug' USE flag does not apply to the --with-debug # The meaning of the 'debug' USE flag does not apply to the --with-debug
# switch (enabling the libxml2 debug module). See bug #100898. # switch (enabling the libxml2 debug module). See bug #100898.