pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/gpsp-rpi Import gpsp-rpi-20150205 as emulato...
details: https://anonhg.NetBSD.org/pkgsrc/rev/aa01f4db888c
branches: trunk
changeset: 646252:aa01f4db888c
user: jmcneill <jmcneill%pkgsrc.org@localhost>
date: Fri Feb 06 02:02:03 2015 +0000
description:
Import gpsp-rpi-20150205 as emulators/gpsp-rpi.
gameplaySP (gpSP for short) is a GBA emulator written completely from
scratch. It is still pretty young (only having started a 3 months prior
to the first release) and thus rather immature, but it does a decent
job of playing a number of games, and is being improved upon somewhat
regularly. It is currently somewhat minimalistic, in the sourcecode,
presentation, and features. Its number one focus is to deliver a GBA
gaming experience in the most playable way that PSP can manage, with
frills being secondary (although still a consideration, at least for
some of them).
This version of gpSP is optimized for the Raspberry Pi.
diffstat:
emulators/gpsp-rpi/DESCR | 11 +++++
emulators/gpsp-rpi/Makefile | 38 ++++++++++++++++++
emulators/gpsp-rpi/PLIST | 2 +
emulators/gpsp-rpi/distinfo | 8 +++
emulators/gpsp-rpi/patches/patch-arm_warm.c | 59 +++++++++++++++++++++++++++++
emulators/gpsp-rpi/patches/patch-arm_warm.h | 13 ++++++
emulators/gpsp-rpi/patches/patch-main.c | 22 ++++++++++
7 files changed, 153 insertions(+), 0 deletions(-)
diffs (181 lines):
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/DESCR Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,11 @@
+gameplaySP (gpSP for short) is a GBA emulator written completely from
+scratch. It is still pretty young (only having started a 3 months prior
+to the first release) and thus rather immature, but it does a decent
+job of playing a number of games, and is being improved upon somewhat
+regularly. It is currently somewhat minimalistic, in the sourcecode,
+presentation, and features. Its number one focus is to deliver a GBA
+gaming experience in the most playable way that PSP can manage, with
+frills being secondary (although still a consideration, at least for
+some of them).
+
+This version of gpSP is optimized for the Raspberry Pi.
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/Makefile Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+
+DISTNAME= gpsp-rpi-20150205
+CATEGORIES= emulators
+MASTER_SITES= http://ftp.NetBSD.org/pub/NetBSD/misc/jmcneill/rpi/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= port-arm%NetBSD.org@localhost
+HOMEPAGE= https://github.com/DPRCZ/gpsp
+COMMENT= Gameboy Advance emulator (Raspberry Pi version)
+LICENSE= gnu-gpl-v2
+
+ONLY_FOR_PLATFORM= NetBSD-*-*arm*
+
+WRKSRC= ${WRKDIR}/gpsp-master
+USE_TOOLS+= gmake
+
+SUBST_CLASSES+= vc
+SUBST_STAGE.vc= pre-configure
+SUBST_MESSAGE.vc= Fixing path to VideoCore libraries.
+SUBST_FILES.vc= raspberrypi/Makefile
+SUBST_SED.vc+= -e 's;/opt/vc;${PREFIX};g'
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+BUILDLINK_TRANSFORM+= rm:-ldl
+
+INSTALLATION_DIRS= bin
+
+do-build:
+ cd ${WRKSRC}/raspberrypi && gmake
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/raspberrypi/gpsp \
+ ${DESTDIR}${PREFIX}/bin
+
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../misc/raspberrypi-userland/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/PLIST Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+bin/gpsp
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/distinfo Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+
+SHA1 (gpsp-rpi-20150205.zip) = f7c40cdd9e450d168b0d7cf009977c5f2287012c
+RMD160 (gpsp-rpi-20150205.zip) = 5a53e210f30a69f147d5c223a18fd51ea7d47a1e
+Size (gpsp-rpi-20150205.zip) = 350074 bytes
+SHA1 (patch-arm_warm.c) = b8c4eff30767fa78f54ad4114e00e8559349b10f
+SHA1 (patch-arm_warm.h) = 94b534399319a690d0ead735837b283212d80793
+SHA1 (patch-main.c) = bc88bbec2dcdbbc38afd21a13067fbbe805c50c1
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/patches/patch-arm_warm.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/patches/patch-arm_warm.c Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-arm_warm.c,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+
+--- arm/warm.c.orig 2015-01-06 20:57:45.000000000 +0000
++++ arm/warm.c
+@@ -42,15 +42,18 @@
+ #define WARM_CODE
+ #include "warm.h"
+
++#if defined(__linux__)
+ /* provided by glibc */
+ extern long init_module(void *, unsigned long, const char *);
+ extern long delete_module(const char *, unsigned int);
++#endif
+
+ static int warm_fd = -1;
+ static int kernel_version;
+
+ static void sys_cacheflush(void *start, void *end)
+ {
++#if defined(__linux__)
+ #ifdef __ARM_EABI__
+ /* EABI version */
+ int num = __ARM_NR_cacheflush;
+@@ -68,12 +71,16 @@ static void sys_cacheflush(void *start,
+ "swi %2" : : "r" (start), "r" (end), "i" __ARM_NR_cacheflush
+ : "r0", "r1", "r2", "r3");
+ #endif
++#else
++ __clear_cache(start, end);
++#endif
+ }
+
+ /* Those are here because system() occasionaly fails on Wiz
+ * with errno 12 for some unknown reason */
+ static int manual_insmod_26(const char *fname, const char *opts)
+ {
++#if defined(__linux__)
+ unsigned long len, read_len;
+ int ret = -1;
+ void *buff;
+@@ -104,11 +111,18 @@ fail1:
+ fail0:
+ fclose(f);
+ return ret;
++#else
++ return -1;
++#endif
+ }
+
+ static int manual_rmmod(const char *name)
+ {
++#if defined(__linux__)
+ return delete_module(name, O_NONBLOCK|O_EXCL);
++#else
++ return 0;
++#endif
+ }
+
+ int warm_init(void)
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/patches/patch-arm_warm.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/patches/patch-arm_warm.h Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-arm_warm.h,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+
+--- arm/warm.h.orig 2015-01-06 20:57:45.000000000 +0000
++++ arm/warm.h
+@@ -72,7 +72,7 @@ void warm_finish(void);
+ /* internal */
+ #ifdef WARM_CODE
+
+-#include <linux/ioctl.h>
++#include <sys/ioctl.h>
+
+ #define WARM_IOCTL_BASE 'A'
+
diff -r 259a7793881a -r aa01f4db888c emulators/gpsp-rpi/patches/patch-main.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gpsp-rpi/patches/patch-main.c Fri Feb 06 02:02:03 2015 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-main.c,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
+
+--- main.c.orig 2015-01-06 20:57:45.000000000 +0000
++++ main.c
+@@ -257,7 +257,7 @@ int main(int argc, char *argv[])
+
+ init_video();
+
+- sprintf(bios_filename, "%s" PATH_SEPARATOR "%s", main_path, "gba_bios.bin");
++ sprintf(bios_filename, "%s/.gpsp/gba_bios.bin", getenv("HOME"));
+ ret = load_bios(bios_filename);
+ if (ret != 0)
+ ret = load_bios("gba_bios.bin");
+@@ -278,7 +278,7 @@ int main(int argc, char *argv[])
+ #ifdef PND_BUILD
+ debug_screen_printl("in <SD card>/pandora/appdata/gpsp/ . ");
+ #else
+- debug_screen_printl("in the same directory as gpSP. ");
++ debug_screen_printl("in $HOME/.gpsp/ . ");
+ #endif
+ debug_screen_printl(" ");
+ debug_screen_printl("Press any button to exit. ");
Home |
Main Index |
Thread Index |
Old Index