mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
games/m64py: Fix build on current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
e326619dd8
commit
d9cfbff954
3 changed files with 62 additions and 1 deletions
26
games/m64py/fix_core_dump_by_int_cast.patch
Normal file
26
games/m64py/fix_core_dump_by_int_cast.patch
Normal 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):
|
32
games/m64py/fix_setup_py.patch
Normal file
32
games/m64py/fix_setup_py.patch
Normal 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)
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue