diff options
author | wiz <wiz@pkgsrc.org> | 2009-01-03 18:45:45 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2009-01-03 18:45:45 +0000 |
commit | 2db27f01343e3f12d6b4a5eecbd356abef7d649c (patch) | |
tree | a669bd19f9beaa5f80be75905baf0da1d5b68ad6 /emulators/gambatte | |
parent | b6d6c5d12160c1c11658910a19954d5018f226bd (diff) | |
download | pkgsrc-2db27f01343e3f12d6b4a5eecbd356abef7d649c.tar.gz |
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.
Diffstat (limited to 'emulators/gambatte')
-rw-r--r-- | emulators/gambatte/DESCR | 4 | ||||
-rw-r--r-- | emulators/gambatte/Makefile | 37 | ||||
-rw-r--r-- | emulators/gambatte/PLIST | 5 | ||||
-rw-r--r-- | emulators/gambatte/distinfo | 7 | ||||
-rw-r--r-- | emulators/gambatte/options.mk | 30 | ||||
-rw-r--r-- | emulators/gambatte/patches/patch-aa | 32 | ||||
-rw-r--r-- | emulators/gambatte/patches/patch-ab | 13 |
7 files changed, 128 insertions, 0 deletions
diff --git a/emulators/gambatte/DESCR b/emulators/gambatte/DESCR new file mode 100644 index 00000000000..bd5eac919c1 --- /dev/null +++ b/emulators/gambatte/DESCR @@ -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. diff --git a/emulators/gambatte/Makefile b/emulators/gambatte/Makefile new file mode 100644 index 00000000000..249312b5d31 --- /dev/null +++ b/emulators/gambatte/Makefile @@ -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" diff --git a/emulators/gambatte/PLIST b/emulators/gambatte/PLIST new file mode 100644 index 00000000000..2900f17bcdd --- /dev/null +++ b/emulators/gambatte/PLIST @@ -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 diff --git a/emulators/gambatte/distinfo b/emulators/gambatte/distinfo new file mode 100644 index 00000000000..ba567d8aec0 --- /dev/null +++ b/emulators/gambatte/distinfo @@ -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 diff --git a/emulators/gambatte/options.mk b/emulators/gambatte/options.mk new file mode 100644 index 00000000000..0d9c00cfe00 --- /dev/null +++ b/emulators/gambatte/options.mk @@ -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 diff --git a/emulators/gambatte/patches/patch-aa b/emulators/gambatte/patches/patch-aa new file mode 100644 index 00000000000..4e78cec2f72 --- /dev/null +++ b/emulators/gambatte/patches/patch-aa @@ -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); diff --git a/emulators/gambatte/patches/patch-ab b/emulators/gambatte/patches/patch-ab new file mode 100644 index 00000000000..2c958850a0d --- /dev/null +++ b/emulators/gambatte/patches/patch-ab @@ -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 |