games/m64py: Fix build on current.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
M.Dinslage 2024-04-04 12:14:32 +07:00 committed by Willy Sudiarto Raharjo
parent e326619dd8
commit d9cfbff954
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 62 additions and 1 deletions

View file

@ -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):

View file

@ -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)

View file

@ -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 \