Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

11
emulators/gpsp-rpi/DESCR Normal file
View File

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

View File

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

2
emulators/gpsp-rpi/PLIST Normal file
View File

@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1 2015/02/06 02:02:03 jmcneill Exp $
bin/gpsp

View File

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

View File

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

View File

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

View File

@@ -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. ");