pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/x16-emulator Add a package for the Commander...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6b0a2e463a94
branches:  trunk
changeset: 406599:6b0a2e463a94
user:      thorpej <thorpej%pkgsrc.org@localhost>
date:      Sat Dec 28 19:32:18 2019 +0000

description:
Add a package for the Commander X16 computer system emulator.

diffstat:

 emulators/x16-emulator/DESCR                  |   1 +
 emulators/x16-emulator/Makefile               |  25 +++++++++++++++++++++++++
 emulators/x16-emulator/PLIST                  |   2 ++
 emulators/x16-emulator/distinfo               |   8 ++++++++
 emulators/x16-emulator/patches/patch-Makefile |  16 ++++++++++++++++
 emulators/x16-emulator/patches/patch-main.c   |  22 ++++++++++++++++++++++
 6 files changed, 74 insertions(+), 0 deletions(-)

diffs (98 lines):

diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/DESCR      Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,1 @@
+This is an emulator for the Commander X16 computer system.
diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/Makefile   Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2019/12/28 19:32:18 thorpej Exp $
+
+DISTNAME=      x16-emulator-35
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=commanderx16/}
+GITHUB_PROJECT=        x16-emulator
+GITHUB_TAG=    r${PKGVERSION_NOREV}
+
+MAINTAINER=    thorpej%NetBSD.org@localhost
+HOMEPAGE=      http://commanderx16.com/
+COMMENT=       Emulator for the Commander X16 computer system
+LICENSE=       2-clause-bsd
+
+DEPENDS+=      x16-rom-35{,nb*}:../../emulators/x16-rom
+MAKE_ENV+=     ROM_RELATIVE_PATH=../share/x16/
+
+USE_TOOLS+=    gmake
+
+INSTALLATION_DIRS+= bin
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/x16emu ${DESTDIR}${PREFIX}/bin
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/PLIST      Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2019/12/28 19:32:18 thorpej Exp $
+bin/x16emu
diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/distinfo   Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/12/28 19:32:18 thorpej Exp $
+
+SHA1 (x16-emulator-35.tar.gz) = 831e1acb2eecc5edb36f86925f00fabd6abb8321
+RMD160 (x16-emulator-35.tar.gz) = 1b5945db7ba879978bf77e7ad5362a93c9a464c0
+SHA512 (x16-emulator-35.tar.gz) = ec014b6ad13a7631d533b665c7544689629167261ffe0f0941c9381ea8cc6b3803a27deac0d76de7aa2fdae3dc438d8f0abbabe9f55ed0221e7fa0f0d39fbf3c
+Size (x16-emulator-35.tar.gz) = 123338 bytes
+SHA1 (patch-Makefile) = 450a069978bbd940d680437368dd880756879bd1
+SHA1 (patch-main.c) = db0721d145546dd60ed40b8e9151cd26493e07ad
diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/patches/patch-Makefile     Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-Makefile,v 1.1 2019/12/28 19:32:18 thorpej Exp $
+
+Allow the default location of the X16 ROM to be overridden.
+
+--- Makefile.orig      2019-12-28 18:52:41.000000000 +0000
++++ Makefile
+@@ -48,6 +48,9 @@ ifneq ("$(wildcard ./rom_labels.h)","")
+ HEADERS+=rom_labels.h
+ endif
+ 
++ifdef ROM_RELATIVE_PATH
++      CFLAGS+=-DROM_RELATIVE_PATH=\"$(ROM_RELATIVE_PATH)\"
++endif
+ 
+ all: $(OBJS) $(HEADERS)
+       $(CC) -o $(OUTPUT) $(OBJS) $(LDFLAGS)
diff -r 09cf318331b3 -r 6b0a2e463a94 emulators/x16-emulator/patches/patch-main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/x16-emulator/patches/patch-main.c       Sat Dec 28 19:32:18 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-main.c,v 1.1 2019/12/28 19:32:18 thorpej Exp $
+
+Allow the default location of the X16 ROM to be overridden.
+
+--- main.c.orig        2019-12-28 19:00:35.000000000 +0000
++++ main.c
+@@ -436,9 +436,13 @@ main(int argc, char **argv)
+ 
+       char *base_path = SDL_GetBasePath();
+ 
+-      // This causes the emulator to load ROM data from the executable's directory when
+-      // no ROM file is specified on the command line.
++      // This causes the emulator to load ROM data from the executable's
++      // directory (or somewhere nearby if ROM_RELATIVE_PATH is specified)
++      // when no ROM file is specified on the command line.
+       memcpy(rom_path, base_path, strlen(base_path) + 1);
++#ifdef ROM_RELATIVE_PATH
++      strncpy(rom_path + strlen(rom_path), ROM_RELATIVE_PATH, PATH_MAX - strlen(rom_path));
++#endif
+       strncpy(rom_path + strlen(rom_path), rom_filename, PATH_MAX - strlen(rom_path));
+ 
+       argc--;



Home | Main Index | Thread Index | Old Index