aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/m64py/fix_core_dump_by_int_cast.patch26
-rw-r--r--games/m64py/fix_setup_py.patch32
-rw-r--r--games/m64py/m64py.SlackBuild5
3 files changed, 62 insertions, 1 deletions
diff --git a/games/m64py/fix_core_dump_by_int_cast.patch b/games/m64py/fix_core_dump_by_int_cast.patch
new file mode 100644
index 0000000000000..9d30cbd456402
--- /dev/null
+++ b/games/m64py/fix_core_dump_by_int_cast.patch
@@ -0,0 +1,26 @@
+diff --git a/src/m64py/frontend/mainwindow.py b/src/m64py/frontend/mainwindow.py
+index f845bbc..7c59ff4 100644
+--- a/src/m64py/frontend/mainwindow.py
++++ b/src/m64py/frontend/mainwindow.py
+@@ -177,7 +177,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
+ width, height = size.width(), size.height()
+ dwidth, dheight = desktop.width(), desktop.height()
+ cw, ch = (dwidth/2)-(width/2), (dheight/2)-(height/2)
+- self.move(cw, ch)
++ self.move(int(cw), int(ch))
+
+ def connect_signals(self):
+ """Connects signals."""
+diff --git a/src/m64py/frontend/romreader.py b/src/m64py/frontend/romreader.py
+index ff861d0..84de37a 100644
+--- a/src/m64py/frontend/romreader.py
++++ b/src/m64py/frontend/romreader.py
+@@ -123,7 +123,7 @@ class ROMReader(QThread):
+ log.warn(str(err))
+ continue
+ percent = float(filenum) / float(num_files) * 100
+- self.parent.progressBar.valueChanged.emit(percent)
++ self.parent.progressBar.valueChanged.emit(int(percent))
+ self.exit()
+
+ def stop(self):
diff --git a/games/m64py/fix_setup_py.patch b/games/m64py/fix_setup_py.patch
new file mode 100644
index 0000000000000..de12c3660190a
--- /dev/null
+++ b/games/m64py/fix_setup_py.patch
@@ -0,0 +1,32 @@
+--- setup.py.orig 2024-02-09 21:14:15.359607270 +0100
++++ setup.py 2024-02-09 21:15:55.391267720 +0100
+@@ -15,6 +15,11 @@
+ import distutils.command.clean as distutils_clean
+ import setuptools
+
++try:
++ from setuptools.modified import newer
++except ImportError:
++ from distutils.dep_util import newer
++
+ # Add the src folder to the path
+ sys.path.insert(0, os.path.realpath("src"))
+
+@@ -39,7 +44,7 @@
+ def compile_rc(self, qrc_file):
+ import PyQt5
+ py_file = os.path.splitext(qrc_file)[0] + "_rc.py"
+- if not distutils.dep_util.newer(qrc_file, py_file):
++ if not newer(qrc_file, py_file):
+ return
+ origpath = os.getenv("PATH")
+ path = origpath.split(os.pathsep)
+@@ -54,7 +59,7 @@
+ def compile_ui(self, ui_file):
+ from PyQt5 import uic
+ py_file = os.path.splitext(ui_file)[0] + "_ui.py"
+- if not distutils.dep_util.newer(ui_file, py_file):
++ if not newer(ui_file, py_file):
+ return
+ with open(py_file, "w") as a_file:
+ uic.compileUi(ui_file, a_file, from_imports=True)
diff --git a/games/m64py/m64py.SlackBuild b/games/m64py/m64py.SlackBuild
index 8012ec4eaeafd..3aa7ff6414b3b 100644
--- a/games/m64py/m64py.SlackBuild
+++ b/games/m64py/m64py.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=m64py
VERSION=${VERSION:-0.2.5}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -76,6 +76,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p0 < $CWD/fix_setup_py.patch
+patch -p1 < $CWD/fix_core_dump_by_int_cast.patch
+
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \