public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/, dev-libs/libxml2/files/
Date: Mon, 05 May 2025 08:00:15 +0000 (UTC)	[thread overview]
Message-ID: <1746431711.67aa8dff3733906d6eea25979c45f8caed9cb360.sam@gentoo> (raw)

commit:     67aa8dff3733906d6eea25979c45f8caed9cb360
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat May  3 10:36:26 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  5 07:55:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67aa8dff

dev-libs/libxml2: add 2.14.2

* Change to the meson build system.
* Drop deprecated lzma support as there is already going to be a lot of
  breakage. Try handle most of it at once.
* Python bindings will be removed in 2.16 so one more major release to
  keep it around.

Bug: https://bugs.gentoo.org/954318
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41919
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libxml2/Manifest                          |   1 +
 dev-libs/libxml2/files/libxml2-2.14.2-no-git.patch |  34 ++++
 dev-libs/libxml2/libxml2-2.14.2.ebuild             | 183 +++++++++++++++++++++
 3 files changed, 218 insertions(+)

diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
index 3615728f1b91..74e0a9779f7b 100644
--- a/dev-libs/libxml2/Manifest
+++ b/dev-libs/libxml2/Manifest
@@ -3,6 +3,7 @@ DIST libxml2-2.12.10.tar.xz 2483708 BLAKE2B b0e68457650665967936799c5b8f550a7453
 DIST libxml2-2.12.9.tar.xz 2643456 BLAKE2B 769ff564e62c1c0167e5334879ac9e912491c651b6d48a9d21db569002ae86bc4e4490098710a614bc90bbefc44a9dd0af6b02958041dd3bffccf8b5ddc0f7ca SHA512 6e4544ed3ab36d6cb7481d465ceabf223444739d7f41de3e1927309b8716a5eac85520b9bbaf69913f53e052fbfaf68bf27372074daaa24dca9463ce728b4173
 DIST libxml2-2.13.6.tar.xz 2423476 BLAKE2B b21f2946dd6945de4a47c993e93bfbbc785b51a501782bf44c234ad69675a58ccdbf6a255301c4d69e92ba9a9ed6670156e55b4d8100215f2dea015c943931ff SHA512 1d4fc3c58df28834ceeeefd49ab90b263b62823d2f0870ae38d11320da93cfa2a18d979c605293c91ad985cb702e7395ddc0ec00b4785dab35ba6d8c33d5f6a7
 DIST libxml2-2.13.7.tar.xz 2424236 BLAKE2B 464097c4b579f964a42909e26b3c2702d7b40c3029628c8980a1ea7a43867dda3c4bdf38b63557f971b20b125a5fc0ac7031bad5df10b1bc25380e995f7707b4 SHA512 6e69ed38cdf2aaa5df7e26b654a7aadd2d80131619184380bafc6a22811acb6b7286c819175c3b37edb194019a93ba6085852a0281934d6bb36d0b52ce138541
+DIST libxml2-2.14.2.tar.xz 2324716 BLAKE2B 2331234ed60358168298d04c83162bfe7d08e6fc77091fe1ecf8384e68902ab745f039dc807d12dda3124313724806bd7fb651de975dbc60fdaf963bac043ff8 SHA512 9b54b9cbee76a56f187c0dc18a5303854f8b6383d11da8f92d6c89dde17b2d03f5d242b91abf9e30b50918a748770db6efdc9b3d73069e513ca30b6c2164dfec
 DIST xmlts20130923.tar.gz 641522 BLAKE2B 63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be SHA512 d5c4d26b324ed21f4e0641cd7f8b76dbf9de80df8b519982e44d41c960df29fd03618e02e9693b2d11ad06d19c4a965274c95a048ec3b9653eacb919a7f8b733
 DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288
 DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe

diff --git a/dev-libs/libxml2/files/libxml2-2.14.2-no-git.patch b/dev-libs/libxml2/files/libxml2-2.14.2-no-git.patch
new file mode 100644
index 000000000000..a74fff7ca25a
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.14.2-no-git.patch
@@ -0,0 +1,34 @@
+From 4d6eb90bfdfe347fb1c5fe3151ef9dae80d12866 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sun, 4 May 2025 15:41:31 +0300
+Subject: [PATCH] meson: allow building without git
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+---
+ meson.build | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index a8af753d..b0c99eef 100644
+--- a/meson.build
++++ b/meson.build
+@@ -17,9 +17,13 @@ v_min = v_array[1].to_int()
+ v_mic = v_array[2].to_int()
+ v_nbr = v_maj * 10000 + v_min * 100 + v_mic
+ v_extra = ''
+-r = run_command('git', 'describe', check: false)
+-if (r.returncode() == 0)
+-    v_extra = '-GIT' + r.stdout().strip()
++
++git = find_program('git', required: false)
++if git.found()
++    r = run_command(git, 'describe', check: false)
++    if (r.returncode() == 0)
++        v_extra = '-GIT' + r.stdout().strip()
++    endif
+ endif
+ 
+ # install paths
+-- 
+2.49.0
+

diff --git a/dev-libs/libxml2/libxml2-2.14.2.ebuild b/dev-libs/libxml2/libxml2-2.14.2.ebuild
new file mode 100644
index 000000000000..dbe8cb03767c
--- /dev/null
+++ b/dev-libs/libxml2/libxml2-2.14.2.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Note: Please bump in sync with dev-libs/libxslt
+
+PYTHON_COMPAT=( python3_{11..13} )
+PYTHON_REQ_USE="xml(+)"
+inherit python-r1 meson-multilib
+
+XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
+XSTS_NAME_1="xmlschema2002-01-16"
+XSTS_NAME_2="xmlschema2004-01-14"
+XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
+XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
+XMLCONF_TARBALL="xmlts20130923.tar.gz"
+
+DESCRIPTION="XML C parser and toolkit"
+HOMEPAGE="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home"
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/libxml2"
+	inherit git-r3
+else
+	inherit gnome.org
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+SRC_URI+="
+	test? (
+		${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
+		${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
+		https://www.w3.org/XML/Test/${XMLCONF_TARBALL}
+	)
+"
+S="${WORKDIR}/${PN}-${PV%_rc*}"
+
+LICENSE="MIT"
+# see so_version = v_maj + v_min_compat for subslot
+SLOT="2/16"
+IUSE="icu +python readline static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	virtual/libiconv
+	>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
+	icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
+	python? ( ${PYTHON_DEPS} )
+	readline? ( sys-libs/readline:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/xml2-config
+)
+
+PATCHES=(
+	"${FILESDIR}"/libxml2-2.14.2-no-git.patch
+)
+
+src_unpack() {
+	if [[ ${PV} == 9999 ]] ; then
+		git-r3_src_unpack
+	else
+		local tarname=${P/_rc/-rc}.tar.xz
+
+		# ${A} isn't used to avoid unpacking of test tarballs into ${WORKDIR},
+		# as they are needed as tarballs in ${S}/xstc instead and not unpacked
+		unpack ${tarname}
+
+		if [[ -n ${PATCHSET_VERSION} ]] ; then
+			unpack ${PN}-${PATCHSET_VERSION}.tar.xz
+		fi
+	fi
+
+	cd "${S}" || die
+
+	if use test ; then
+		cp "${DISTDIR}/${XSTS_TARBALL_1}" \
+			"${DISTDIR}/${XSTS_TARBALL_2}" \
+			"${S}"/xstc/ \
+			|| die "Failed to install test tarballs"
+		unpack ${XMLCONF_TARBALL}
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -e "/^dir_doc/ s/meson.project_name()$/\'${PF}\'/" -i meson.build || die
+}
+
+python_configure() {
+	local emesonargs=(
+		$(meson_feature icu)
+		$(meson_native_use_feature readline)
+		$(meson_native_use_feature readline history)
+		-Dpython=enabled
+	)
+	mkdir "${BUILD_DIR}" || die
+	pushd "${BUILD_DIR}" >/dev/null || die
+	meson_src_configure
+	popd >/dev/null || die
+}
+
+multilib_src_configure() {
+	local emesonargs=(
+		-Ddefault_library=$(multilib_native_usex static-libs both shared)
+		$(meson_feature icu)
+		$(meson_native_use_feature readline)
+		$(meson_native_use_feature readline history)
+		-Dpython=disabled
+
+		# There has been a clean break with a soname bump.
+		# It's time to deal with the breakage.
+		# bug #935452
+		-Dlegacy=disabled
+	)
+	meson_src_configure
+
+	if multilib_is_native_abi && use python ; then
+		python_foreach_impl python_configure
+	fi
+}
+
+python_compile() {
+	pushd "${BUILD_DIR}" >/dev/null || die
+	meson_src_compile
+	popd >/dev/null || die
+}
+
+multilib_src_compile() {
+	meson_src_compile
+
+	if multilib_is_native_abi && use python ; then
+		python_foreach_impl python_compile
+	fi
+}
+
+multilib_src_test() {
+	meson_src_test
+
+	if multilib_is_native_abi && use python ; then
+		python_foreach_impl meson_src_test
+	fi
+}
+
+python_install() {
+	pushd "${BUILD_DIR}" >/dev/null || die
+	meson_src_install
+	python_optimize
+	popd >/dev/null || die
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi && use python ; then
+		python_foreach_impl python_install
+	fi
+
+	meson_src_install
+}
+
+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 [[ -n "${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 don't want to clobber an existing catalog though,
+		# only ensure that one is there
+		# <obz@gentoo.org>
+		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
+}


             reply	other threads:[~2025-05-05  8:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05  8:00 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-10 21:11 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/, dev-libs/libxml2/files/ Sam James
2023-05-10 22:01 Sam James
2022-11-29 19:59 David Seifert
2021-10-29 13:46 David Seifert
2021-05-20  1:46 Sam James
2021-05-13 17:50 Sam James
2020-12-03  0:14 Sam James
2020-10-30 22:39 Matt Turner
2020-10-30 22:34 Matt Turner
2020-01-01 16:28 Mart Raudsepp
2019-03-30 20:57 Mart Raudsepp
2019-01-03 11:22 Mike Frysinger
2019-01-03 11:22 Mike Frysinger
2019-01-03 11:22 Mike Frysinger
2018-07-25 16:47 Mart Raudsepp
2015-11-29 11:58 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1746431711.67aa8dff3733906d6eea25979c45f8caed9cb360.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox