summaryrefslogtreecommitdiff
path: root/emulators/libretro-nestopia
diff options
context:
space:
mode:
authorsnj <snj@pkgsrc.org>2015-04-10 03:16:17 +0000
committersnj <snj@pkgsrc.org>2015-04-10 03:16:17 +0000
commitf4c656cec487b0607f07184416e40caf90382de0 (patch)
treebd74d423ed855a5faefc86816bc4879200e0c818 /emulators/libretro-nestopia
parentf7c24fa87f7879843eccca8a50f0b8d7bdeb8442 (diff)
downloadpkgsrc-f4c656cec487b0607f07184416e40caf90382de0.tar.gz
Add libretro-nestopia, a retroarch core based on the nestopia (undead
edition) emulator.
Diffstat (limited to 'emulators/libretro-nestopia')
-rw-r--r--emulators/libretro-nestopia/DESCR8
-rw-r--r--emulators/libretro-nestopia/Makefile30
-rw-r--r--emulators/libretro-nestopia/PLIST3
-rw-r--r--emulators/libretro-nestopia/distinfo7
-rw-r--r--emulators/libretro-nestopia/patches/patch-libretro_Makefile16
-rw-r--r--emulators/libretro-nestopia/patches/patch-libretro_libretro.cpp18
6 files changed, 82 insertions, 0 deletions
diff --git a/emulators/libretro-nestopia/DESCR b/emulators/libretro-nestopia/DESCR
new file mode 100644
index 00000000000..886413ab949
--- /dev/null
+++ b/emulators/libretro-nestopia/DESCR
@@ -0,0 +1,8 @@
+Libretro is a simple but powerful development interface that allows for the
+easy creation of emulators, games and multimedia applications that can plug
+straight into any libretro-compatible frontend. This development interface is
+open to others so that they can run these pluggable emulator and game cores
+also in their own programs or devices.
+
+This core is based on the Nestopia UE (Undead Edition) Nintendo Entertainment
+System emulator.
diff --git a/emulators/libretro-nestopia/Makefile b/emulators/libretro-nestopia/Makefile
new file mode 100644
index 00000000000..757e4a71bd5
--- /dev/null
+++ b/emulators/libretro-nestopia/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2015/04/10 03:16:17 snj Exp $
+
+DISTNAME= 2c586b592597751f015ac30e05d2a180a1ffd723
+PKGNAME= libretro-nestopia-20150319
+CATEGORIES= emulators
+MASTER_SITES= ${MASTER_SITE_GITHUB:=libretro/nestopia/archive/}
+EXTRACT_SUFX= .zip
+
+MAINTAINER= snj@NetBSD.org
+HOMEPAGE= https://github.com/libretro/nestopia
+COMMENT= Libretro core based on the Nestopia UE emulator
+LICENSE= gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/nestopia-${DISTNAME}
+BUILD_DIRS= libretro
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake
+
+INSTALLATION_DIRS+= ${PREFIX}/lib/libretro
+INSTALLATION_DIRS+= share/libretro-nestopia
+
+CFLAGS+= -DPREFIX=\"${PREFIX}\"
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/libretro/nestopia_libretro.so \
+ ${DESTDIR}${PREFIX}/lib/libretro/nestopia_libretro.so
+ ${INSTALL_DATA} ${WRKSRC}/NstDatabase.xml \
+ ${DESTDIR}${PREFIX}/share/libretro-nestopia
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/libretro-nestopia/PLIST b/emulators/libretro-nestopia/PLIST
new file mode 100644
index 00000000000..894e7a73f4a
--- /dev/null
+++ b/emulators/libretro-nestopia/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2015/04/10 03:16:18 snj Exp $
+lib/libretro/nestopia_libretro.so
+share/libretro-nestopia/NstDatabase.xml
diff --git a/emulators/libretro-nestopia/distinfo b/emulators/libretro-nestopia/distinfo
new file mode 100644
index 00000000000..0bd7a61e654
--- /dev/null
+++ b/emulators/libretro-nestopia/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2015/04/10 03:16:18 snj Exp $
+
+SHA1 (2c586b592597751f015ac30e05d2a180a1ffd723.zip) = e1d97ba63472ab41afd7439cd1b839ce8704bf9b
+RMD160 (2c586b592597751f015ac30e05d2a180a1ffd723.zip) = 1b61cf3f745d84f748222fe4de9b1985f4a7d9f9
+Size (2c586b592597751f015ac30e05d2a180a1ffd723.zip) = 2161787 bytes
+SHA1 (patch-libretro_Makefile) = b9ab72caf2b42158e8adbf705cede20cd9ceb42b
+SHA1 (patch-libretro_libretro.cpp) = c8887390e4d0ac4b82ddfa87154303778f1567d6
diff --git a/emulators/libretro-nestopia/patches/patch-libretro_Makefile b/emulators/libretro-nestopia/patches/patch-libretro_Makefile
new file mode 100644
index 00000000000..09c8fc75ea4
--- /dev/null
+++ b/emulators/libretro-nestopia/patches/patch-libretro_Makefile
@@ -0,0 +1,16 @@
+$NetBSD: patch-libretro_Makefile,v 1.1 2015/04/10 03:16:18 snj Exp $
+
+Don't pass -O3 unconditionally.
+
+--- libretro/Makefile.orig 2015-04-09 20:00:41.000000000 -0700
++++ libretro/Makefile 2015-04-09 20:00:50.000000000 -0700
+@@ -196,9 +196,6 @@ ifeq ($(DEBUG), 1)
+ else ifeq ($(platform), ps3)
+ CFLAGS += -O2
+ CXXFLAGS += -O2
+-else
+- CFLAGS += -O3
+- CXXFLAGS += -O3
+ endif
+
+ CORE_DIR = ..
diff --git a/emulators/libretro-nestopia/patches/patch-libretro_libretro.cpp b/emulators/libretro-nestopia/patches/patch-libretro_libretro.cpp
new file mode 100644
index 00000000000..0708fac9d99
--- /dev/null
+++ b/emulators/libretro-nestopia/patches/patch-libretro_libretro.cpp
@@ -0,0 +1,18 @@
+$NetBSD: patch-libretro_libretro.cpp,v 1.1 2015/04/10 03:16:18 snj Exp $
+
+retroarch normally expects to find the NstDatabase.xml file in
+~/.config/retroarch/bios, but there's no real reason to be editing it.
+Rather than have users manually copy the file into place, we install it
+system-wide and look for it there instead.
+
+--- libretro/libretro.cpp.orig 2015-03-19 19:54:18.000000000 -0700
++++ libretro/libretro.cpp 2015-03-29 23:31:42.000000000 -0700
+@@ -624,7 +624,7 @@ bool retro_load_game(const struct retro_
+ if (!environ_cb(RETRO_ENVIRONMENT_GET_OVERSCAN, &use_overscan))
+ use_overscan = true;
+
+- snprintf(db_path, sizeof(db_path), "%s%cNstDatabase.xml", dir, slash);
++ snprintf(db_path, sizeof(db_path), "%s/share/libretro-nestopia/NstDatabase.xml", PREFIX);
+
+ if (log_cb)
+ log_cb(RETRO_LOG_INFO, "NstDatabase.xml path: %s\n", db_path);