Sat Jan 3 18:45:45 2009 UTC ()
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.

Status:

Vendor Tag:	TNF
Release Tags:	pkgsrc-20090103


(wiz)
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/Makefile
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/PLIST
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/distinfo
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/DESCR
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/options.mk
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/patches/patch-aa
diff -r0 -r1.1.1.1 pkgsrc/emulators/gambatte/patches/patch-ab

File Added: pkgsrc/emulators/gambatte/Makefile
# $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"

File Added: pkgsrc/emulators/gambatte/PLIST
@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

File Added: pkgsrc/emulators/gambatte/distinfo
$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

File Added: pkgsrc/emulators/gambatte/DESCR
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.

File Added: pkgsrc/emulators/gambatte/Attic/options.mk
# $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

File Added: pkgsrc/emulators/gambatte/patches/Attic/patch-aa
$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);

File Added: pkgsrc/emulators/gambatte/patches/Attic/patch-ab
$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