pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/pcsx-rearmed



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Apr 26 09:10:10 UTC 2024

Added Files:
        pkgsrc/emulators/pcsx-rearmed: DESCR Makefile PLIST distinfo options.mk
        pkgsrc/emulators/pcsx-rearmed/files: pcsx-rearmed.desktop
        pkgsrc/emulators/pcsx-rearmed/patches: patch-Makefile
            patch-frontend_libpicofe_linux_plat.c
            patch-frontend_libpicofe_posix.h patch-frontend_menu.c

Log Message:
Import the standalone version of pcsx-rearmed.

Sony PlayStation emulator with special optimizations for ARM.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/pcsx-rearmed/DESCR \
    pkgsrc/emulators/pcsx-rearmed/Makefile \
    pkgsrc/emulators/pcsx-rearmed/PLIST \
    pkgsrc/emulators/pcsx-rearmed/distinfo \
    pkgsrc/emulators/pcsx-rearmed/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/pcsx-rearmed/files/pcsx-rearmed.desktop
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/pcsx-rearmed/patches/patch-Makefile \
    pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_linux_plat.c \
    pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_posix.h \
    pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_menu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/emulators/pcsx-rearmed/DESCR
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/DESCR:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/DESCR Fri Apr 26 09:10:10 2024
@@ -0,0 +1 @@
+Sony PlayStation emulator with special optimizations for ARM.
Index: pkgsrc/emulators/pcsx-rearmed/Makefile
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/Makefile:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/Makefile      Fri Apr 26 09:10:10 2024
@@ -0,0 +1,88 @@
+# $NetBSD: Makefile,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+DISTNAME=      pcsx-rearmed-23
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=notaz/}
+GITHUB_PROJECT=        pcsx_rearmed
+GITHUB_TAG=    r${PKGVERSION_NOREV}
+
+GITHUB_SUBMODULES+=    rtissera libchdr a03e69319164f69d781ab8e453f8cf407387bd13 libchdr
+GITHUB_SUBMODULES+=    notaz libpicofe 33787db41d955f8dcafe833097f2cc87d70186ec frontend/libpicofe
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/notaz/pcsx_rearmed
+COMMENT=       Sony PlayStation emulator with optimizations for ARM
+LICENSE=       gnu-gpl-v2
+
+HAS_CONFIGURE= yes
+USE_TOOLS+=    gmake
+USE_LANGUAGES= c c++
+
+CFLAGS+=       -DPICO_DATA_DIR="\"${PREFIX}/share/pcsx-rearmed/\""
+
+PCSX_SOUND_DRIVERS+=   sdl
+
+.include "options.mk"
+
+.include "../../mk/oss.buildlink3.mk"
+
+.if ${OSS_TYPE} != "none"
+PCSX_SOUND_DRIVERS+=   oss
+LDFLAGS+=              ${LIBOSSAUDIO}
+SUBST_CLASSES+=                oss
+SUBST_STAGE.oss=       pre-configure
+SUBST_MESSAGE.oss=     Correcting the path to the OSS device.
+SUBST_FILES.oss+=      plugins/dfsound/oss.c
+SUBST_SED.oss+=                -e "s,/dev/dsp,${DEVOSSAUDIO},g"
+.endif
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${MACHINE_ARCH} == "earmv7hf"
+CFLAGS+=               -march=armv7-a+neon -mfpu=neon
+CONFIGURE_ARGS+=       --gpu=neon
+CONFIGURE_ARGS+=       --enable-neon
+.else
+CONFIGURE_ARGS+=       --gpu=peops
+CONFIGURE_ARGS+=       --disable-neon
+.endif
+
+.if ${MACHINE_ARCH:M*earm*}
+MAKE_FLAGS+=           ARCH=arm
+MAKE_FLAGS+=           USE_DYNAREC=1
+.endif
+
+.if ${MACHINE_ARCH} == "aarch64"
+MAKE_FLAGS+=           ARCH=aarch64
+MAKE_FLAGS+=           USE_DYNAREC=1
+.endif
+
+MAKE_FLAGS+=           PLUGINS=
+MAKE_FLAGS+=           EXTRA_LDFLAGS=
+
+CONFIGURE_ARGS+=       --platform=generic
+CONFIGURE_ARGS+=       --sound-drivers=${PCSX_SOUND_DRIVERS:Q}
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    share/applications
+INSTALLATION_DIRS+=    share/pcsx-rearmed/skin
+INSTALLATION_DIRS+=    share/pixmaps
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/pcsx \
+               ${DESTDIR}${PREFIX}/bin/pcsx-rearmed
+       ${INSTALL_DATA} ${FILESDIR}/pcsx-rearmed.desktop \
+               ${DESTDIR}${PREFIX}/share/applications/pcsx-rearmed.desktop
+       ${INSTALL_DATA} ${WRKSRC}/frontend/pandora/pcsx.png \
+               ${DESTDIR}${PREFIX}/share/pixmaps/pcsx-rearmed.png
+       ${INSTALL_DATA} ${WRKSRC}/frontend/pandora/skin/*.png \
+               ${DESTDIR}${PREFIX}/share/pcsx-rearmed/skin
+       ${INSTALL_DATA} ${WRKSRC}/frontend/pandora/skin/*.txt \
+               ${DESTDIR}${PREFIX}/share/pcsx-rearmed/skin
+
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+=  opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/emulators/pcsx-rearmed/PLIST
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/PLIST:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/PLIST Fri Apr 26 09:10:10 2024
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2024/04/26 09:10:10 nia Exp $
+bin/pcsx-rearmed
+share/applications/pcsx-rearmed.desktop
+share/pcsx-rearmed/skin/background.png
+share/pcsx-rearmed/skin/font.png
+share/pcsx-rearmed/skin/readme.txt
+share/pcsx-rearmed/skin/selector.png
+share/pcsx-rearmed/skin/skin.txt
+share/pixmaps/pcsx-rearmed.png
Index: pkgsrc/emulators/pcsx-rearmed/distinfo
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/distinfo:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/distinfo      Fri Apr 26 09:10:10 2024
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+BLAKE2s (notaz-libpicofe-33787db41d955f8dcafe833097f2cc87d70186ec.tar.gz) = 5d836e608eef8bc34f1d33ff515a769430451a4c6a8210a6acfd98d58edc48eb
+SHA512 (notaz-libpicofe-33787db41d955f8dcafe833097f2cc87d70186ec.tar.gz) = 
7a59069a48194f7da50d5cf44833dab6a88458c22af6796218c8b010138ddca4cf4095b082d822168161ec2e3c2b8fe8153d15f810911ffdb8e4f7f521699a31
+Size (notaz-libpicofe-33787db41d955f8dcafe833097f2cc87d70186ec.tar.gz) = 86973 bytes
+BLAKE2s (pcsx-rearmed-23.tar.gz) = 98b3f575224bcdc9181364a0b5d917458f7aa475eb544616c64982c97d10795b
+SHA512 (pcsx-rearmed-23.tar.gz) = 877c19bc79cb43b2a30b27b983126aee6b89c11d3caba2e55ac509ae7a0dfb032f9e89bc138a43c150e4d5604008c7b36d03a7e1f7d4a1c5ebf1b9361ddbf5a7
+Size (pcsx-rearmed-23.tar.gz) = 1129836 bytes
+BLAKE2s (rtissera-libchdr-a03e69319164f69d781ab8e453f8cf407387bd13.tar.gz) = 6bf82738cb3c3b5d072ad8a34a80a09dea807c046afa99b9be36032b6bfb9b74
+SHA512 (rtissera-libchdr-a03e69319164f69d781ab8e453f8cf407387bd13.tar.gz) = 
407b1b310126e223b596ef99b7cbf0baadc06c3cb84e3173a40a2ddcf3b994e86e420fdafd814f11a7d0ac2c9feea30c28ff9ece6834d5f317064185546d4101
+Size (rtissera-libchdr-a03e69319164f69d781ab8e453f8cf407387bd13.tar.gz) = 415504 bytes
+SHA1 (patch-Makefile) = b840622b2e2100406cd42c103686dbfb8682d86e
+SHA1 (patch-frontend_libpicofe_linux_plat.c) = c53fa780b97725d8263d6c239c1a815ac0e8258c
+SHA1 (patch-frontend_libpicofe_posix.h) = 43111f0440e90b66baa96e856a6c4a0a6c6f845a
+SHA1 (patch-frontend_menu.c) = b1321d3d84c54c2af1ac865eff33a20cea95b57a
Index: pkgsrc/emulators/pcsx-rearmed/options.mk
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/options.mk:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/options.mk    Fri Apr 26 09:10:10 2024
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.pcsx-rearmed
+PKG_SUPPORTED_OPTIONS=         alsa pulseaudio
+PKG_SUGGESTED_OPTIONS.Linux=   alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+PCSX_SOUND_DRIVERS+=   alsa
+.  include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+PCSX_SOUND_DRIVERS+=   pulseaudio
+.  include "../../audio/pulseaudio/buildlink3.mk"
+.endif

Index: pkgsrc/emulators/pcsx-rearmed/files/pcsx-rearmed.desktop
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/files/pcsx-rearmed.desktop:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/files/pcsx-rearmed.desktop    Fri Apr 26 09:10:10 2024
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=PCSX ReARMed
+Comment=Sony PlayStation emulator
+Exec=pcsx-rearmed %f
+Icon=pcsx-rearmed
+Categories=Game;Emulator;
+Terminal=false
+Type=Application
+StartupNotify=true

Index: pkgsrc/emulators/pcsx-rearmed/patches/patch-Makefile
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/patches/patch-Makefile:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/patches/patch-Makefile        Fri Apr 26 09:10:10 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-Makefile,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+Don't build linux evdev support unconditionally.
+
+--- Makefile.orig      2024-04-16 09:44:00.523228443 +0000
++++ Makefile
+@@ -180,7 +180,6 @@ ifeq "$(PLATFORM)" "generic"
+ OBJS += frontend/libpicofe/in_sdl.o
+ OBJS += frontend/libpicofe/plat_sdl.o
+ OBJS += frontend/libpicofe/plat_dummy.o
+-OBJS += frontend/libpicofe/linux/in_evdev.o
+ OBJS += frontend/plat_sdl.o
+ ifeq "$(HAVE_GLES)" "1"
+ OBJS += frontend/libpicofe/gl.o frontend/libpicofe/gl_platform.o
Index: pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_linux_plat.c
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_linux_plat.c:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_linux_plat.c Fri Apr 26 09:10:10 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-frontend_libpicofe_linux_plat.c,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+NetBSD support.
+
+--- frontend/libpicofe/linux/plat.c.orig       2024-04-16 09:44:58.820854847 +0000
++++ frontend/libpicofe/linux/plat.c
+@@ -223,7 +223,11 @@ void *plat_mremap(void *ptr, size_t olds
+ {
+       void *ret;
+ 
++#ifdef __NetBSD__
++      ret = mremap(ptr, oldsize, NULL, newsize, 0);
++#else
+       ret = mremap(ptr, oldsize, newsize, MREMAP_MAYMOVE);
++#endif
+       if (ret == MAP_FAILED) {
+               fprintf(stderr, "mremap %p %zd %zd: ",
+                       ptr, oldsize, newsize);
Index: pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_posix.h
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_posix.h:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_libpicofe_posix.h      Fri Apr 26 09:10:10 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-frontend_libpicofe_posix.h,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+NetBSD support.
+
+--- frontend/libpicofe/posix.h.orig    2024-04-16 09:47:48.307454271 +0000
++++ frontend/libpicofe/posix.h
+@@ -2,7 +2,7 @@
+ #define LIBPICOFE_POSIX_H
+ 
+ /* define POSIX stuff: dirent, scandir, getcwd, mkdir */
+-#if defined(__linux__) || defined(__MINGW32__)
++#if defined(__unix__)
+ 
+ #include <dirent.h>
+ #include <unistd.h>
Index: pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_menu.c
diff -u /dev/null pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_menu.c:1.1
--- /dev/null   Fri Apr 26 09:10:10 2024
+++ pkgsrc/emulators/pcsx-rearmed/patches/patch-frontend_menu.c Fri Apr 26 09:10:10 2024
@@ -0,0 +1,60 @@
+$NetBSD: patch-frontend_menu.c,v 1.1 2024/04/26 09:10:10 nia Exp $
+
+NetBSD support.
+
+--- frontend/menu.c.orig       2024-04-16 09:44:07.524301796 +0000
++++ frontend/menu.c
+@@ -29,7 +29,6 @@
+ #include "cspace.h"
+ #include "libpicofe/plat.h"
+ #include "libpicofe/input.h"
+-#include "libpicofe/linux/in_evdev.h"
+ #include "libpicofe/plat.h"
+ #include "../libpcsxcore/misc.h"
+ #include "../libpcsxcore/cdrom.h"
+@@ -42,6 +41,10 @@
+ #include "arm_features.h"
+ #include "revision.h"
+ 
++#ifndef __linux
++#define stat64 stat
++#endif
++
+ #define REARMED_BIRTHDAY_TIME 1293306830      /* 25 Dec 2010 */
+ 
+ #define array_size(x) (sizeof(x) / sizeof(x[0]))
+@@ -317,10 +320,6 @@ static void menu_sync_config(void)
+       case 2:  in_type2 = PSE_PAD_TYPE_GUNCON;    break;
+       default: in_type2 = PSE_PAD_TYPE_STANDARD;
+       }
+-      if (in_evdev_allow_abs_only != allow_abs_only_old) {
+-              in_probe();
+-              allow_abs_only_old = in_evdev_allow_abs_only;
+-      }
+ 
+       spu_config.iVolume = 768 + 128 * volume_boost;
+       pl_rearmed_cbs.frameskip = frameskip - 1;
+@@ -346,7 +345,6 @@ static void menu_set_defconfig(void)
+ 
+       region = 0;
+       in_type_sel1 = in_type_sel2 = 0;
+-      in_evdev_allow_abs_only = 0;
+ 
+       menu_sync_config();
+ }
+@@ -457,7 +455,6 @@ static const struct {
+       CE_INTVAL(spu_config.iTempo),
+       CE_INTVAL(spu_config.iUseThread),
+       CE_INTVAL(config_save_counter),
+-      CE_INTVAL(in_evdev_allow_abs_only),
+       CE_INTVAL(volume_boost),
+       CE_INTVAL(psx_clock),
+       CE_INTVAL(new_dynarec_hacks),
+@@ -1215,7 +1212,6 @@ static menu_entry e_menu_keyconfig[] =
+       mee_label     (""),
+       mee_enum      ("Port 1 device",     0, in_type_sel1,    men_in_type_sel),
+       mee_enum      ("Port 2 device",     0, in_type_sel2,    men_in_type_sel),
+-      mee_onoff_h   ("Nubs as buttons",   MA_CTRL_NUBS_BTNS,  in_evdev_allow_abs_only, 1, h_nub_btns),
+       mee_onoff_h   ("Vibration",         MA_CTRL_VIBRATION,  in_enable_vibration, 1, h_vibration),
+       mee_range     ("Analog deadzone",   MA_CTRL_DEADZONE,   analog_deadzone, 1, 99),
+       mee_onoff_h   ("No TS Gun trigger", 0, g_opts, OPT_TSGUN_NOTRIGGER, h_notsgun),



Home | Main Index | Thread Index | Old Index