diff options
author | James Le Cuirot <chewi@gentoo.org> | 2019-12-27 22:45:54 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2019-12-27 22:45:54 +0000 |
commit | 0ef3fefcf95a50542afe6651eb507dff165c4706 (patch) | |
tree | 7541455d5f91146cfe9fb768c9451a2a9f26a0d9 /games-strategy | |
parent | app-crypt/rhash: Version bump to 1.3.9 (diff) | |
download | gentoo-0ef3fefcf95a50542afe6651eb507dff165c4706.tar.gz gentoo-0ef3fefcf95a50542afe6651eb507dff165c4706.tar.bz2 gentoo-0ef3fefcf95a50542afe6651eb507dff165c4706.zip |
games-strategy/ufoai: Fix broken use of bundled mxml
Closes: https://bugs.gentoo.org/703902
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch | 29 | ||||
-rw-r--r-- | games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild | 12 |
2 files changed, 39 insertions, 2 deletions
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 new file mode 100644 index 000000000000..256b43e94b2c --- /dev/null +++ b/games-strategy/ufoai/files/ufoai-2.5.0_p20180603-mxml3.patch @@ -0,0 +1,29 @@ +From 163073ab9527cdaa33d77a713b8e46ff462a2b5c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tam=C3=A1s=20Feh=C3=A9rv=C3=A1ri?= + <geever@users.sourceforge.net> +Date: Sat, 3 Aug 2019 15:21:05 +0200 +Subject: [PATCH] * {{Bug|5739}} MiniXML (mxml) 3.x compatibility + +--- + src/common/xml.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/common/xml.cpp b/src/common/xml.cpp +index 7aeceb3a29..5a66ccc887 100644 +--- a/src/common/xml.cpp ++++ b/src/common/xml.cpp +@@ -509,8 +509,13 @@ static mxml_type_t mxml_ufo_type_cb (xmlNode_t* node) + /* You can lookup attributes and/or use the + * element name, hierarchy, etc... */ + const char* type = mxmlElementGetAttr(node, "type"); +- if (type == nullptr) ++ if (type == nullptr) { ++#ifdef MXML_MAJOR_VERSION ++ type = mxmlGetElement(node); ++#else + type = node->value.element.name; ++#endif ++ } + + if (Q_streq(type, "int")) + return MXML_INTEGER; diff --git a/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild b/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild index 0fd98165739d..b3bc8e4d1ac2 100644 --- a/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild +++ b/games-strategy/ufoai/ufoai-2.5.0_p20180603.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -30,6 +30,7 @@ IUSE="+client cpu_flags_x86_sse debug editor server" REQUIRED_USE="|| ( client editor server )" RDEPEND=" + dev-libs/mxml net-misc/curl sys-libs/zlib @@ -75,7 +76,11 @@ DEPEND=" " S="${WORKDIR}/${PN}-code-${COMMIT}" -PATCHES=( "${FILESDIR}"/${P}-install.patch ) + +PATCHES=( + "${FILESDIR}"/${P}-install.patch + "${FILESDIR}"/${P}-mxml3.patch +) src_unpack() { use editor && unpack ${PN}-${DIST_VERSION}-mappack.tar.bz2 @@ -89,6 +94,9 @@ src_prepare() { # Make the build system a bit happier, will be fixed upstream mkdir -p base/{maps,models} contrib/installer/mojosetup/scripts || die + + # Remove bundled mxml + rm -r src/libs/mxml/ || die } src_configure() { |