Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/
Date: Sat, 02 Apr 2022 03:45:00
Message-Id: 1648871068.2acd2e6971c4ada4fa618474483025856a815df0.sam@gentoo
1 commit: 2acd2e6971c4ada4fa618474483025856a815df0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 03:37:39 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 03:44:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2acd2e69
7
8 dev-libs/libxml2: use live template
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 dev-libs/libxml2/libxml2-2.9.13-r1.ebuild | 24 +++++++++++++++++-------
13 dev-libs/libxml2/libxml2-9999.ebuild | 21 ++++++++++++++++++---
14 2 files changed, 35 insertions(+), 10 deletions(-)
15
16 diff --git a/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild b/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
17 index 5d7a300bba44..4789bc568a0a 100644
18 --- a/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
19 +++ b/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
20 @@ -9,7 +9,7 @@ PATCHSET_VERSION="2.9.12-r5-patchset"
21
22 PYTHON_COMPAT=( python3_{8..10} )
23 PYTHON_REQ_USE="xml"
24 -inherit autotools flag-o-matic gnome.org prefix python-r1 multilib-minimal
25 +inherit autotools flag-o-matic prefix python-r1 multilib-minimal
26
27 XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
28 XSTS_NAME_1="xmlschema2002-01-16"
29 @@ -19,14 +19,20 @@ XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
30 XMLCONF_TARBALL="xmlts20130923.tar.gz"
31 DESCRIPTION="XML C parser and toolkit"
32 HOMEPAGE="http://www.xmlsoft.org/ https://gitlab.gnome.org/GNOME/libxml2"
33 +if [[ ${PV} == 9999 ]] ; then
34 + EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/libxml2"
35 + inherit git-r3
36 +else
37 + inherit gnome.org
38 + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
39 +fi
40 SRC_URI+="
41 https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${PATCHSET_VERSION}.tar.bz2
42 test? (
43 ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
44 ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
45 https://www.w3.org/XML/Test/${XMLCONF_TARBALL}
46 - )
47 -"
48 + )"
49 S="${WORKDIR}/${PN}-${PV%_rc*}"
50
51 LICENSE="MIT"
52 @@ -75,11 +81,15 @@ PATCHES=(
53 )
54
55 src_unpack() {
56 - local tarname=${P/_rc/-rc}.tar.xz
57 + if [[ ${PV} == 9999 ]] ; then
58 + git-r3_src_unpack
59 + else
60 + local tarname=${P/_rc/-rc}.tar.xz
61
62 - # ${A} isn't used to avoid unpacking of test tarballs into ${WORKDIR},
63 - # as they are needed as tarballs in ${S}/xstc instead and not unpacked
64 - unpack ${tarname} ${PN}-${PATCHSET_VERSION}.tar.bz2
65 + # ${A} isn't used to avoid unpacking of test tarballs into ${WORKDIR},
66 + # as they are needed as tarballs in ${S}/xstc instead and not unpacked
67 + unpack ${tarname} ${PN}-${PATCHSET_VERSION}.tar.bz2
68 + fi
69
70 cd "${S}" || die
71
72
73 diff --git a/dev-libs/libxml2/libxml2-9999.ebuild b/dev-libs/libxml2/libxml2-9999.ebuild
74 index 18743bea1507..3ad0604b6f1e 100644
75 --- a/dev-libs/libxml2/libxml2-9999.ebuild
76 +++ b/dev-libs/libxml2/libxml2-9999.ebuild
77 @@ -7,8 +7,7 @@ EAPI=8
78
79 PYTHON_COMPAT=( python3_{8..10} )
80 PYTHON_REQ_USE="xml"
81 -EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/libxml2"
82 -inherit autotools flag-o-matic python-r1 multilib-minimal git-r3
83 +inherit autotools flag-o-matic python-r1 multilib-minimal
84
85 XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
86 XSTS_NAME_1="xmlschema2002-01-16"
87 @@ -19,6 +18,14 @@ XMLCONF_TARBALL="xmlts20130923.tar.gz"
88
89 DESCRIPTION="XML C parser and toolkit"
90 HOMEPAGE="http://www.xmlsoft.org/ https://gitlab.gnome.org/GNOME/libxml2"
91 +if [[ ${PV} == 9999 ]] ; then
92 + EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/libxml2"
93 + inherit git-r3
94 +else
95 + inherit gnome.org
96 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
97 +fi
98 +
99 SRC_URI+="
100 test? (
101 ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
102 @@ -53,7 +60,15 @@ MULTILIB_CHOST_TOOLS=(
103 DOCS=( NEWS README.md TODO TODO_SCHEMAS python/TODO )
104
105 src_unpack() {
106 - git-r3_src_unpack
107 + if [[ ${PV} == 9999 ]] ; then
108 + git-r3_src_unpack
109 + else
110 + local tarname=${P/_rc/-rc}.tar.xz
111 +
112 + # ${A} isn't used to avoid unpacking of test tarballs into ${WORKDIR},
113 + # as they are needed as tarballs in ${S}/xstc instead and not unpacked
114 + unpack ${tarname} ${PN}-${PATCHSET_VERSION}.tar.bz2
115 + fi
116
117 cd "${S}" || die