diff options
Diffstat (limited to 'games/m64py')
-rw-r--r-- | games/m64py/README | 7 | ||||
-rw-r--r-- | games/m64py/fix_core_dump_by_int_cast.patch | 26 | ||||
-rw-r--r-- | games/m64py/fix_setup_py.patch | 32 | ||||
-rw-r--r-- | games/m64py/m64py.SlackBuild | 42 | ||||
-rw-r--r-- | games/m64py/m64py.info | 10 | ||||
-rw-r--r-- | games/m64py/slack-desc | 10 |
6 files changed, 98 insertions, 29 deletions
diff --git a/games/m64py/README b/games/m64py/README index 868980f98d..2a7b210c6d 100644 --- a/games/m64py/README +++ b/games/m64py/README @@ -1,3 +1,4 @@ -M64Py is a Qt4 front-end (GUI) for Mupen64Plus 2.0, a cross-platform -plugin-based Nintendo 64 emulator. Front-end is written in Python and it -provides a user-friendly interface over Mupen64Plus shared library. +M64Py is a Qt5 front-end (GUI) for Mupen64Plus, a cross-platform +plugin-based Nintendo 64 emulator. Front-end is written in Python +and it provides a user-friendly interface over the Mupen64Plus +shared library. 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 0000000000..9d30cbd456 --- /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 0000000000..de12c36601 --- /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 6fcd6922c2..3aa7ff6414 100644 --- a/games/m64py/m64py.SlackBuild +++ b/games/m64py/m64py.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for m64py -# Copyright 2015 Matt Dinslage (daedra1980@gmail.com), Springfield, MO, USA +# Copyright 2021 Matt Dinslage (daedra1980@gmail.com), Springfield, MO, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,26 +22,33 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=m64py -VERSION=${VERSION:-0.2.2} -BUILD=${BUILD:-1} +VERSION=${VERSION:-0.2.5} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -64,19 +71,22 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -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 -python setup.py install --root=$PKG +python3 setup.py install --root=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS ChangeLog COPYING LICENSES PKG-INFO README.md \ + AUTHORS CHANGELOG LICENSES README.rst \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -85,4 +95,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/m64py/m64py.info b/games/m64py/m64py.info index a94a536ce8..df39e40163 100644 --- a/games/m64py/m64py.info +++ b/games/m64py/m64py.info @@ -1,10 +1,10 @@ PRGNAM="m64py" -VERSION="0.2.2" -HOMEPAGE="http://m64py.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/project/m64py/m64py-0.2.2/m64py-0.2.2.tar.gz" -MD5SUM="78e8144e5f598f5a2b9fd926dd8788a8" +VERSION="0.2.5" +HOMEPAGE="https://github.com/mupen64plus/mupen64plus-ui-python" +DOWNLOAD="https://github.com/mupen64plus/mupen64plus-ui-python/releases/download/0.2.5/m64py-0.2.5.tar.gz" +MD5SUM="201a5b08a7ed43db26af6067a064e116" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="mupen64plus" +REQUIRES="mupen64plus python3-pysdl2" MAINTAINER="M.Dinslage" EMAIL="daedra1980@gmail.com" diff --git a/games/m64py/slack-desc b/games/m64py/slack-desc index cea93c835e..51f40b61d8 100644 --- a/games/m64py/slack-desc +++ b/games/m64py/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -m64py: m64py (mupen64plus GUI) +m64py: m64py (A GUI frontend for Mupen64Plus) m64py: -m64py: M64Py is a Qt4 front-end (GUI) for Mupen64Plus 2.0, a cross-platform +m64py: M64Py is a Qt5 front-end (GUI) for Mupen64Plus, a cross-platform m64py: plugin-based Nintendo 64 emulator. Front-end is written in Python -m64py: and it provides a user-friendly interface over Mupen64Plus shared -m64py: library. +m64py: and it provides a user-friendly interface over the Mupen64Plus +m64py: shared library. m64py: -m64py: Homepage: http://m64py.sourceforge.net +m64py: Homepage: https://github.com/mupen64plus/mupen64plus-ui-python m64py: m64py: m64py: |