Import gambatte-dev-5.5.0 as wip/gambatte-dev.

Gambatte is an accuracy-focused, open-source, cross-platform Game
Boy / Game Boy Color emulator written in C++. It is based on hundreds
of corner case hardware tests, as well as previous documentation
and reverse engineering efforts.

This is the development version of gambatte.
This commit is contained in:
Blue Rats 2013-12-24 13:24:16 +00:00 committed by Thomas Klausner
parent 66c1386fc6
commit 4efe924fb2
7 changed files with 136 additions and 0 deletions

6
gambatte-dev/DESCR Normal file
View File

@ -0,0 +1,6 @@
Gambatte is an accuracy-focused, open-source, cross-platform Game
Boy / Game Boy Color emulator written in C++. It is based on hundreds
of corner case hardware tests, as well as previous documentation
and reverse engineering efforts.
This is the development version of gambatte.

40
gambatte-dev/Makefile Normal file
View File

@ -0,0 +1,40 @@
# $NetBSD: Makefile,v 1.1 2013/12/24 13:24:17 othyro Exp $
#
DISTNAME= gambatte_src-r550
PKGNAME= ${DISTNAME:C/_.*/-dev-5.5.0/1}
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gambatte/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://gambatte.sourceforge.net/
COMMENT= Game Boy Color emulator
LICENSE= gnu-gpl-v2
BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
PKG_DESTDIR_SUPPORT= user-destdir
USE_LANGUAGES= c c++
INSTALLATION_DIRS= bin share/doc/gambatte
SUBST_CLASSES+= sdl
SUBST_FILES.sdl= gambatte_sdl/SConstruct
SUBST_MESSAGE.sdl= Fixing path to sdl-config.
SUBST_SED.sdl= -e "s,sdl-config,${PREFIX}/bin/sdl-config,"
SUBST_STAGE.sdl= pre-build
.include "options.mk"
do-build:
cd ${WRKSRC}/libgambatte && ${SETENV} ${MAKE_ENV} scons
cd ${WRKSRC}/gambatte_sdl && ${SETENV} ${MAKE_ENV} scons
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gambatte_sdl/gambatte_sdl \
${DESTDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/gambatte
.include "../../devel/SDL/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

4
gambatte-dev/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $NetBSD: PLIST,v 1.1 2013/12/24 13:24:17 othyro Exp $
${PLIST.qt}bin/gambatte_qt
bin/gambatte_sdl
share/doc/gambatte/README

7
gambatte-dev/distinfo Normal file
View File

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2013/12/24 13:24:17 othyro Exp $
SHA1 (gambatte_src-r550.tar.gz) = 91841a8da04f1a9661e0ef3f4f83ac8e94849ba1
RMD160 (gambatte_src-r550.tar.gz) = 72877edbf8b98dff3c7b22f39c5c42225aa1d5ec
Size (gambatte_src-r550.tar.gz) = 520348 bytes
SHA1 (patch-aa) = 524f2689f0ffcc70ba4c4d4377b481502ed58b49
SHA1 (patch-ab) = 9fd24ea3d738d3c97a68317f861863bcc6564c9d

30
gambatte-dev/options.mk Normal file
View File

@ -0,0 +1,30 @@
# $NetBSD: options.mk,v 1.1 2013/12/24 13:24:17 othyro Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gambatte
PKG_SUPPORTED_OPTIONS= qt
.include "../../mk/bsd.options.mk"
PLIST_VARS= qt
.if !empty(PKG_OPTIONS:Mqt)
# does not work well without GL:
# Xlib: extension "GLX" missing on display ":0.0".
# QGLContext::makeCurrent(): Cannot make invalid context current.
# Segmentation fault (core dumped)
PLIST.qt= yes
post-build:
cd ${WRKSRC}/gambatte_qt && \
${SETENV} ${MAKE_ENV} ${QTDIR}/bin/qmake && \
${SETENV} ${MAKE_ENV} ${MAKE}
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/gambatte_qt/bin/gambatte_qt \
${DESTDIR}${PREFIX}/bin
.include "../../x11/qt4-libs/buildlink3.mk"
.include "../../x11/qt4-tools/buildlink3.mk"
.include "../../x11/libXv/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.endif

View File

@ -0,0 +1,34 @@
$NetBSD: patch-aa,v 1.1 2013/12/24 13:24:17 othyro Exp $
Adds NetBSD support.
--- gambatte_qt/src/framework/src/SDL_Joystick/src/bsd/SDL_sysjoystick.c.orig 2010-02-02 22:47:39.000000000 +0000
+++ gambatte_qt/src/framework/src/SDL_Joystick/src/bsd/SDL_sysjoystick.c
@@ -135,6 +135,9 @@ static char *joydevnames[MAX_JOYS];
static int report_alloc(struct report *, struct report_desc *, int);
static void report_free(struct report *);
+#ifdef __NetBSD__
+#define USBHID_UCR_DATA
+#endif
#ifdef USBHID_UCR_DATA
#define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
#else
@@ -304,7 +307,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
goto usberr;
}
-#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
+#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111) || defined(__NetBSD__)
hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
#else
hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
@@ -443,7 +446,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
return;
}
-#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
+#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111) || defined(__NetBSD__)
hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
#else
hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);

View File

@ -0,0 +1,15 @@
$NetBSD: patch-ab,v 1.1 2013/12/24 13:24:17 othyro Exp $
Add usbhid and OSSAUDIO libraries.
--- gambatte_qt/src/framework/framework.pro.orig 2012-02-26 15:11:35.000000000 +0000
+++ gambatte_qt/src/framework/framework.pro
@@ -153,6 +153,8 @@ else:unix {
-lX11 \
-lXext \
-lXv \
+ -lusbhid \
+ ${LIBOSSAUDIO} \
-lXrandr #\
# -lXxf86vm \
# -lXinerama