summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Misbakh-Soloviov <mva@gentoo.org>2024-01-16 02:11:22 +0700
committerVadim Misbakh-Soloviov <mva@gentoo.org>2024-01-16 02:12:07 +0700
commit24e65103271975df78c7a477b7eab0b2b999506e (patch)
tree97c2a3429609b485730f3d2bd530d4550f4046d4
parentdev-libs/fuzzylite: Some more fixes (diff)
downloadgamerlay-24e65103271975df78c7a477b7eab0b2b999506e.tar.gz
gamerlay-24e65103271975df78c7a477b7eab0b2b999506e.tar.bz2
gamerlay-24e65103271975df78c7a477b7eab0b2b999506e.zip
games-engines/fifengine: fix build
Closes: https://bugs.gentoo.org/905665 Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
-rw-r--r--games-engines/fifengine/fifengine-0.4.2.ebuild18
-rw-r--r--games-engines/fifengine/files/fifengine-0.4.2-cmakefile-fix.patch11
-rw-r--r--games-engines/fifengine/files/fifengine-0.4.2-old-python-fix.patch190
-rw-r--r--games-engines/fifengine/metadata.xml21
4 files changed, 226 insertions, 14 deletions
diff --git a/games-engines/fifengine/fifengine-0.4.2.ebuild b/games-engines/fifengine/fifengine-0.4.2.ebuild
index 901841c..768608c 100644
--- a/games-engines/fifengine/fifengine-0.4.2.ebuild
+++ b/games-engines/fifengine/fifengine-0.4.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{9..12} pypy3 )
inherit python-single-r1 cmake
@@ -15,10 +15,10 @@ LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
SLOT="0"
-IUSE="debug +log +opengl +zip +fifechan cegui python"
+IUSE="debug +log +opengl +zip +fifechan python"
+# cegui
RDEPEND="
- cegui? ( dev-games/cegui )
fifechan? ( games-engines/fifechan )
dev-libs/tinyxml
media-libs/libpng
@@ -40,6 +40,7 @@ RDEPEND="
${PYTHON_DEPS}
)
"
+# cegui? ( dev-games/cegui )
DEPEND="
${RDEPEND}
python? ( >=dev-lang/swig-1.3.40 )
@@ -49,6 +50,8 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
PATCHES=(
"${FILESDIR}/${P}-unbundle-libpng.patch"
+ "${FILESDIR}/${P}-old-python-fix.patch"
+ "${FILESDIR}/${P}-cmakefile-fix.patch"
)
pkg_setup() {
@@ -60,7 +63,7 @@ src_configure() {
-Dopengl=$(usex opengl)
-Dfifechan=$(usex fifechan)
-Dlibrocket=OFF
- -Dcegui=$(usex cegui)
+ # -Dcegui=$(usex cegui)
-Dlogging=$(usex log)
-Dbuild-python=$(usex python)
-Dbuild-library=ON
@@ -68,3 +71,8 @@ src_configure() {
cmake_src_configure
}
+
+src_install() {
+ cmake_src_install
+ python_optimize
+}
diff --git a/games-engines/fifengine/files/fifengine-0.4.2-cmakefile-fix.patch b/games-engines/fifengine/files/fifengine-0.4.2-cmakefile-fix.patch
new file mode 100644
index 0000000..deb1548
--- /dev/null
+++ b/games-engines/fifengine/files/fifengine-0.4.2-cmakefile-fix.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt 2022-09-03 17:48:14.662031597 +0200
++++ b/CMakeLists.txt 2022-09-03 18:04:33.912046359 +0200
+@@ -897,7 +897,7 @@
+ find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
+ include_directories(${PYTHON_INCLUDE_PATH})
+
+- set(CMAKE_SWIG_FLAGS -modern -fastdispatch -dirvtable -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone -keyword -w511 -w473 -w404 -w314)
++ set(CMAKE_SWIG_FLAGS -fastdispatch -dirvtable -fastproxy -keyword -w511 -w473 -w404 -w314)
+
+ set_source_files_properties("${PROJECT_BINARY_DIR}/fife.i" PROPERTIES CPLUSPLUS ON)
+ set(FIFE_SOURCES ${FIFE_CORE_SRC})
diff --git a/games-engines/fifengine/files/fifengine-0.4.2-old-python-fix.patch b/games-engines/fifengine/files/fifengine-0.4.2-old-python-fix.patch
new file mode 100644
index 0000000..76f7493
--- /dev/null
+++ b/games-engines/fifengine/files/fifengine-0.4.2-old-python-fix.patch
@@ -0,0 +1,190 @@
+--- a/engine/core/vfs/zip/zipnode.cpp 2022-09-03 17:39:25.372023618 +0200
++++ b/engine/core/vfs/zip/zipnode.cpp 2022-09-03 17:39:56.012024080 +0200
+@@ -28,6 +28,7 @@
+ #include "vfs/fife_boost_filesystem.h"
+
+ #include "zipnode.h"
++#include <algorithm>
+
+ namespace {
+ /** helper function to find a value in a ZipNodeContainer
+--- a/engine/python/fife/extensions/serializers/simplexml.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/serializers/simplexml.py 2022-09-08 14:09:05.331754405 +0200
+@@ -200,7 +200,7 @@
+ #get the module tree: for example find tree under module FIFE
+ moduleTree = self._getModuleTree(module)
+ element = None
+- for e in moduleTree.getchildren():
++ for e in list(moduleTree):
+ if e.tag == "Setting" and e.get("name", "") == name:
+ element = e
+ break
+@@ -275,7 +275,7 @@
+ e_type = "str"
+ value = str(value)
+
+- for e in moduleTree.getchildren():
++ for e in list(moduleTree):
+ if e.tag != "Setting": continue
+ if e.get("name", "") == name:
+ e.text = value
+@@ -305,7 +305,7 @@
+
+ moduleTree = self._getModuleTree(module)
+
+- for e in moduleTree.getchildren():
++ for e in list(moduleTree):
+ if e.tag != "Setting": continue
+ if e.get("name", "") == name:
+ moduleTree.remove(e)
+@@ -321,7 +321,7 @@
+ self._initialized = True
+
+ moduleNames = []
+- for c in self._root_element.getchildren():
++ for c in list(self._root_element):
+ if c.tag == "Module":
+ name = c.get("name","")
+ if not isinstance(name, basestring):
+@@ -344,7 +344,7 @@
+
+ # now from the tree read every value, and put the necessary values
+ # to the list
+- for e in moduleTree.getchildren():
++ for e in list(moduleTree):
+ if e.tag == "Setting":
+ name = e.get("name", "")
+
+@@ -383,7 +383,7 @@
+
+ Raises an InvalidFormat exception if there is a format error.
+ """
+- for c in self._root_element.getchildren():
++ for c in list(self._root_element):
+ if c.tag != "Module":
+ raise InvalidFormat("Invalid tag in " + self._file + \
+ ". Expected Module, got: " + c.tag)
+@@ -391,7 +391,7 @@
+ raise InvalidFormat("Invalid tag in " + self._file + \
+ ". Module name is empty.")
+ else:
+- for e in c.getchildren():
++ for e in list(c):
+ if e.tag != "Setting":
+ raise InvalidFormat("Invalid tag in " + self._file + \
+ " in module: " + c.tag + \
+@@ -414,7 +414,7 @@
+ raise AttributeError("Settings:_getModuleTree: Invalid type for "
+ "module argument.")
+
+- for c in self._root_element.getchildren():
++ for c in list(self._root_element):
+ if c.tag == "Module" and c.get("name", "") == module:
+ return c
+
+--- a/engine/python/fife/extensions/pychan/widgets/widget.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/pychan/widgets/widget.py 2022-09-08 14:15:13.451755998 +0200
+@@ -1035,25 +1035,25 @@
+ def _setMargins(self, margin):
+ # Shorthand property
+ if isinstance(margin, tuple) or isinstance(margin, list):
+- if len(margin) is 4:
++ if len(margin) == 4:
+ # 0=top, 1=right, 2=bottom, 3=left
+ self.real_widget.setMarginTop(margin[0])
+ self.real_widget.setMarginRight(margin[1])
+ self.real_widget.setMarginBottom(margin[2])
+ self.real_widget.setMarginLeft(margin[3])
+- elif len(margin) is 3:
++ elif len(margin) == 3:
+ # 0=top, 1=right, 2=bottom, 1=left
+ self.real_widget.setMarginTop(margin[0])
+ self.real_widget.setMarginRight(margin[1])
+ self.real_widget.setMarginBottom(margin[2])
+ self.real_widget.setMarginLeft(margin[1])
+- elif len(margin) is 2:
++ elif len(margin) == 2:
+ # 0=top, 1=right, 0=bottom, 1=left
+ self.real_widget.setMarginTop(margin[0])
+ self.real_widget.setMarginRight(margin[1])
+ self.real_widget.setMarginBottom(margin[0])
+ self.real_widget.setMarginLeft(margin[1])
+- elif len(margin) is 1:
++ elif len(margin) == 1:
+ # 0=top, 0=right, 0=bottom, 0=left
+ self.real_widget.setMargin(margin[0])
+ else:
+@@ -1065,25 +1065,25 @@
+ def _setPadding(self, padding):
+ # Shorthand property
+ if isinstance(padding, tuple) or isinstance(padding, list):
+- if len(padding) is 4:
++ if len(padding) == 4:
+ # 0=top, 1=right, 2=bottom, 3=left
+ self.real_widget.setPaddingTop(padding[0])
+ self.real_widget.setPaddingRight(padding[1])
+ self.real_widget.setPaddingBottom(padding[2])
+ self.real_widget.setPaddingLeft(padding[3])
+- elif len(padding) is 3:
++ elif len(padding) == 3:
+ # 0=top, 1=right, 2=bottom, 1=left
+ self.real_widget.setPaddingTop(padding[0])
+ self.real_widget.setPaddingRight(padding[1])
+ self.real_widget.setPaddingBottom(padding[2])
+ self.real_widget.setPaddingLeft(padding[1])
+- elif len(padding) is 2:
++ elif len(padding) == 2:
+ # 0=top, 1=right, 0=bottom, 1=left
+ self.real_widget.setPaddingTop(padding[0])
+ self.real_widget.setPaddingRight(padding[1])
+ self.real_widget.setPaddingBottom(padding[0])
+ self.real_widget.setPaddingLeft(padding[1])
+- elif len(padding) is 1:
++ elif len(padding) == 1:
+ # 0=top, 0=right, 0=bottom, 0=left
+ self.real_widget.setPadding(padding[0])
+ else:
+--- a/engine/python/fife/extensions/pychan/widgets/animationicon.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/pychan/widgets/animationicon.py 2022-09-08 14:16:06.981756230 +0200
+@@ -190,7 +190,7 @@
+ if isinstance(anim, fife.Animation):
+ self._anim = anim
+ else:
+- if anim is not "":
++ if anim != "":
+ # use xml loader
+ self._anim = loadXMLAnimation(get_manager().hook.engine, anim)
+ self.real_widget.setAnimation(self._anim)
+--- a/engine/python/fife/extensions/pychan/widgets/curvegraph.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/pychan/widgets/curvegraph.py 2022-09-08 14:16:58.821756454 +0200
+@@ -161,7 +161,7 @@
+
+ def _setCoordinates(self, coordinates):
+ # reset
+- if coordinates is None or len(coordinates) is 0:
++ if coordinates is None or len(coordinates) == 0:
+ self.real_widget.resetPointVector()
+ return
+ # int list to point vector
+--- a/engine/python/fife/extensions/pychan/widgets/linegraph.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/pychan/widgets/linegraph.py 2022-09-08 14:17:29.241756586 +0200
+@@ -154,7 +154,7 @@
+
+ def _setCoordinates(self, coordinates):
+ # reset
+- if coordinates is None or len(coordinates) is 0:
++ if coordinates is None or len(coordinates) == 0:
+ self.real_widget.resetPointVector()
+ return
+ # int list to point vector
+--- a/engine/python/fife/extensions/pychan/widgets/pointgraph.py 2019-01-11 18:24:38.000000000 +0100
++++ b/engine/python/fife/extensions/pychan/widgets/pointgraph.py 2022-09-08 14:17:57.531756709 +0200
+@@ -154,7 +154,7 @@
+
+ def _setCoordinates(self, coordinates):
+ # reset
+- if coordinates is None or len(coordinates) is 0:
++ if coordinates is None or len(coordinates) == 0:
+ self.real_widget.resetPointVector()
+ return
+ # int list to point vector
diff --git a/games-engines/fifengine/metadata.xml b/games-engines/fifengine/metadata.xml
index c0bc2a6..4a775e4 100644
--- a/games-engines/fifengine/metadata.xml
+++ b/games-engines/fifengine/metadata.xml
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>krytzz@soylent.eu</email>
- <name>steffen stramm</name>
-</maintainer>
-<use>
-<flag name="cegui">Enable cegui support</flag>
-<flag name="fifechan">Enable Fifechan GUI subsystem</flag>
-<flag name="log">Enable logging</flag>
-</use>
+ <maintainer type="person">
+ <email>krytzz@soylent.eu</email>
+ <name>steffen stramm</name>
+ </maintainer>
+ <use>
+ <!-- <flag name="cegui">Enable cegui support</flag> -->
+ <flag name="fifechan">Enable Fifechan GUI subsystem</flag>
+ <flag name="log">Enable logging</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">fifengine/fifengine</remote-id>
+ </upstream>
</pkgmetadata>