commit:     85894c00327e260b153d3394f8c9b2c67ff1402f
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat May  3 10:38:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  5 07:55:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85894c00

dev-libs/libxml2: update live

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/libxml2-9999.ebuild | 121 ++++++++++++++++-------------------
 1 file changed, 56 insertions(+), 65 deletions(-)

diff --git a/dev-libs/libxml2/libxml2-9999.ebuild 
b/dev-libs/libxml2/libxml2-9999.ebuild
index 45b054cf8916..75a9858dc382 100644
--- a/dev-libs/libxml2/libxml2-9999.ebuild
+++ b/dev-libs/libxml2/libxml2-9999.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2024 Gentoo Authors
+# 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_{10..13} )
+PYTHON_COMPAT=( python3_{11..13} )
 PYTHON_REQ_USE="xml(+)"
-inherit python-r1 multilib-minimal
+inherit python-r1 meson-multilib
 
 XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite";
 XSTS_NAME_1="xmlschema2002-01-16"
@@ -20,9 +20,9 @@ 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 autotools git-r3
+       inherit git-r3
 else
-       inherit gnome.org libtool
+       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
 
@@ -36,8 +36,9 @@ SRC_URI+="
 S="${WORKDIR}/${PN}-${PV%_rc*}"
 
 LICENSE="MIT"
-SLOT="2"
-IUSE="examples icu lzma +python readline static-libs test"
+# 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} )"
 
@@ -45,17 +46,12 @@ RDEPEND="
        virtual/libiconv
        >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
        icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
-       lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
        python? ( ${PYTHON_DEPS} )
        readline? ( sys-libs/readline:= )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
-if [[ ${PV} == 9999 ]] ; then
-       BDEPEND+=" dev-build/gtk-doc-am"
-fi
-
 MULTILIB_CHOST_TOOLS=(
        /usr/bin/xml2-config
 )
@@ -89,82 +85,77 @@ src_unpack() {
 src_prepare() {
        default
 
-       if [[ ${PV} == 9999 ]] ; then
-               eautoreconf
-       else
-               # Please do not remove, as else we get references to 
PORTAGE_TMPDIR
-               # in /usr/lib/python?.?/site-packages/libxml2mod.la among 
things.
-               elibtoolize
-       fi
+       sed -e "/^dir_doc/ s/meson.project_name()$/\'${PF}\'/" -i meson.build 
|| die
 }
 
-multilib_src_configure() {
-       libxml2_configure() {
-               ECONF_SOURCE="${S}" econf \
-                       $(use_with icu) \
-                       $(use_with lzma) \
-                       $(use_enable static-libs static) \
-                       $(multilib_native_use_with readline) \
-                       $(multilib_native_use_with readline history) \
-                       --with-legacy \
-                       "$@"
-       }
-
-       # Build python bindings separately
-       libxml2_configure --without-python
-
-       multilib_is_native_abi && use python &&
-               python_foreach_impl run_in_build_dir libxml2_configure 
--with-python
+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
 }
 
-libxml2_py_emake() {
-       pushd "${BUILD_DIR}"/python >/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
 
-       emake top_builddir="${NATIVE_BUILD_DIR}" "$@"
+       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() {
-       default
+       meson_src_compile
 
        if multilib_is_native_abi && use python ; then
-               NATIVE_BUILD_DIR="${BUILD_DIR}"
-               python_foreach_impl run_in_build_dir libxml2_py_emake all
+               python_foreach_impl python_compile
        fi
 }
 
 multilib_src_test() {
-       ln -s "${S}"/xmlconf || die
+       meson_src_test
 
-       emake check
-
-       multilib_is_native_abi && use python &&
-               python_foreach_impl run_in_build_dir libxml2_py_emake check
+       if multilib_is_native_abi && use python ; then
+               python_foreach_impl meson_src_test
+       fi
 }
 
-multilib_src_install() {
-       emake DESTDIR="${D}" install
-
-       multilib_is_native_abi && use python &&
-               python_foreach_impl run_in_build_dir libxml2_py_emake 
DESTDIR="${D}" install
-
-       # Hack until automake release is made for the optimise fix
-       # 
https://git.savannah.gnu.org/cgit/automake.git/commit/?id=bde43d0481ff540418271ac37012a574a4fcf097
-       multilib_is_native_abi && use python && python_foreach_impl 
python_optimize
+python_install() {
+       pushd "${BUILD_DIR}" >/dev/null || die
+       meson_src_install
+       python_optimize
+       popd >/dev/null || die
 }
 
-multilib_src_install_all() {
-       einstalldocs
-
-       if ! use examples ; then
-               rm -rf "${ED}"/usr/share/doc/${PF}/examples || die
-               rm -rf "${ED}"/usr/share/doc/${PF}/python/examples || die
+multilib_src_install() {
+       if multilib_is_native_abi && use python ; then
+               python_foreach_impl python_install
        fi
 
-       rm -rf "${ED}"/usr/share/doc/${PN}-python-${PVR} || die
-
-       find "${ED}" -name '*.la' -delete || die
+       meson_src_install
 }
 
 pkg_postinst() {

Reply via email to