Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/ufoai/, games-strategy/ufoai/files/
Date: Fri, 27 Dec 2019 22:47:23
Message-Id: 1577486754.0ef3fefcf95a50542afe6651eb507dff165c4706.chewi@gentoo
1 commit: 0ef3fefcf95a50542afe6651eb507dff165c4706
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 22:45:54 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 22:45:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ef3fefc
7
8 games-strategy/ufoai: Fix broken use of bundled mxml
9
10 Closes: https://bugs.gentoo.org/703902
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
13
14 .../ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch | 29 ++++++++++++++++++++++
15 games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild | 12 +++++++--
16 2 files changed, 39 insertions(+), 2 deletions(-)
17
18 diff --git a/games-strategy/ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch b/games-strategy/ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch
19 new file mode 100644
20 index 00000000000..256b43e94b2
21 --- /dev/null
22 +++ b/games-strategy/ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch
23 @@ -0,0 +1,29 @@
24 +From 163073ab9527cdaa33d77a713b8e46ff462a2b5c Mon Sep 17 00:00:00 2001
25 +From: =?UTF-8?q?Tam=C3=A1s=20Feh=C3=A9rv=C3=A1ri?=
26 + <geever@×××××××××××××××××.net>
27 +Date: Sat, 3 Aug 2019 15:21:05 +0200
28 +Subject: [PATCH] * {{Bug|5739}} MiniXML (mxml) 3.x compatibility
29 +
30 +---
31 + src/common/xml.cpp | 7 ++++++-
32 + 1 file changed, 6 insertions(+), 1 deletion(-)
33 +
34 +diff --git a/src/common/xml.cpp b/src/common/xml.cpp
35 +index 7aeceb3a29..5a66ccc887 100644
36 +--- a/src/common/xml.cpp
37 ++++ b/src/common/xml.cpp
38 +@@ -509,8 +509,13 @@ static mxml_type_t mxml_ufo_type_cb (xmlNode_t* node)
39 + /* You can lookup attributes and/or use the
40 + * element name, hierarchy, etc... */
41 + const char* type = mxmlElementGetAttr(node, "type");
42 +- if (type == nullptr)
43 ++ if (type == nullptr) {
44 ++#ifdef MXML_MAJOR_VERSION
45 ++ type = mxmlGetElement(node);
46 ++#else
47 + type = node->value.element.name;
48 ++#endif
49 ++ }
50 +
51 + if (Q_streq(type, "int"))
52 + return MXML_INTEGER;
53
54 diff --git a/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild b/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild
55 index 0fd98165739..b3bc8e4d1ac 100644
56 --- a/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild
57 +++ b/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild
58 @@ -1,4 +1,4 @@
59 -# Copyright 1999-2018 Gentoo Foundation
60 +# Copyright 1999-2019 Gentoo Authors
61 # Distributed under the terms of the GNU General Public License v2
62
63 EAPI=6
64 @@ -30,6 +30,7 @@ IUSE="+client cpu_flags_x86_sse debug editor server"
65 REQUIRED_USE="|| ( client editor server )"
66
67 RDEPEND="
68 + dev-libs/mxml
69 net-misc/curl
70 sys-libs/zlib
71
72 @@ -75,7 +76,11 @@ DEPEND="
73 "
74
75 S="${WORKDIR}/${PN}-code-${COMMIT}"
76 -PATCHES=( "${FILESDIR}"/${P}-install.patch )
77 +
78 +PATCHES=(
79 + "${FILESDIR}"/${P}-install.patch
80 + "${FILESDIR}"/${P}-mxml3.patch
81 +)
82
83 src_unpack() {
84 use editor && unpack ${PN}-${DIST_VERSION}-mappack.tar.bz2
85 @@ -89,6 +94,9 @@ src_prepare() {
86
87 # Make the build system a bit happier, will be fixed upstream
88 mkdir -p base/{maps,models} contrib/installer/mojosetup/scripts || die
89 +
90 + # Remove bundled mxml
91 + rm -r src/libs/mxml/ || die
92 }
93
94 src_configure() {