Initial import of gambatte-0.4.0:

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 commit is contained in:
wiz 2009-01-03 18:45:45 +00:00
parent b6d6c5d121
commit 2db27f0134
7 changed files with 128 additions and 0 deletions

4
emulators/gambatte/DESCR Normal file
View file

@ -0,0 +1,4 @@
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.

View file

@ -0,0 +1,37 @@
# $NetBSD: Makefile,v 1.1.1.1 2009/01/03 18:45:45 wiz Exp $
#
DISTNAME= gambatte_src-0.4.0
PKGNAME= ${DISTNAME:S/_src//}
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gambatte/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://gambatte.sourceforge.net/
COMMENT= Gameboy emulator
BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
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,${LOCALBASE}/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"

5
emulators/gambatte/PLIST Normal file
View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2009/01/03 18:45:45 wiz Exp $
${PLIST.qt}bin/gambatte_qt
bin/gambatte_sdl
share/doc/gambatte/README
@dirrm share/doc/gambatte

View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1.1.1 2009/01/03 18:45:45 wiz Exp $
SHA1 (gambatte_src-0.4.0.tar.gz) = 013bb248dee2962c6998a9bc8efdd7af5e13b001
RMD160 (gambatte_src-0.4.0.tar.gz) = cea4e9a345e64d32abddf7f7a960b7a740cc2b2f
Size (gambatte_src-0.4.0.tar.gz) = 802988 bytes
SHA1 (patch-aa) = 96fd6b152afa1ec603864068b747ac50ec830b7d
SHA1 (patch-ab) = c9d7cf6ca8bfa98c0d970a60ecfc34812756447e

View file

@ -0,0 +1,30 @@
# $NetBSD: options.mk,v 1.1.1.1 2009/01/03 18:45:45 wiz 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,32 @@
$NetBSD: patch-aa,v 1.1.1.1 2009/01/03 18:45:45 wiz Exp $
--- gambatte_qt/src/framework/SDL_Joystick/src/bsd/SDL_sysjoystick.c.orig 2008-10-27 23:03:47.000000000 +0000
+++ gambatte_qt/src/framework/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,13 @@
$NetBSD: patch-ab,v 1.1.1.1 2009/01/03 18:45:45 wiz Exp $
--- gambatte_qt/src/framework/framework.pro.orig 2008-10-27 23:03:48.000000000 +0000
+++ gambatte_qt/src/framework/framework.pro
@@ -106,6 +106,8 @@ else:unix {
# framework/fullmodetogglers/xf86vidmodetoggler.h
LIBS += -L/usr/X11R6/lib \
-lXv \
+ -lusbhid \
+ ${LIBOSSAUDIO} \
-lXrandr #\
# -lXxf86vm \
# -lXinerama