diff --git a/emulators/gngb/Makefile b/emulators/gngb/Makefile index 993900fe16d2..c500f77e77a9 100644 --- a/emulators/gngb/Makefile +++ b/emulators/gngb/Makefile @@ -3,37 +3,28 @@ PORTNAME= gngb PORTVERSION= 20060309 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= emulators MASTER_SITES= http://m.peponas.free.fr/gngb/download/ MAINTAINER= ports@FreeBSD.org COMMENT= GameBoy(tm) emulator -USE_SDL= sdl -USES= gmake -GNU_CONFIGURE= yes +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= gmake localbase USE_CSTD= gnu89 +USE_SDL= sdl +GNU_CONFIGURE= yes PLIST_FILES= bin/gngb \ man/man1/gngb.1.gz -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +OPTIONS_DEFINE= OPENGL - -.if defined(WITH_GL) -USE_GL= gl -.else -CONFIGURE_ARGS+= --disable-gl -.endif - -pre-everything:: -.if !defined(WITH_GL) - @${ECHO_MSG} - @${ECHO_MSG} "You can enable OpenGL support by defining WITH_GL" - @${ECHO_MSG} -.endif +OPENGL_USE= GL=gl +OPENGL_CONFIGURE_ENABLE=gl post-patch: @${REINPLACE_CMD} -e \ diff --git a/emulators/gngb/files/patch-memory.c b/emulators/gngb/files/patch-src_memory.c similarity index 85% rename from emulators/gngb/files/patch-memory.c rename to emulators/gngb/files/patch-src_memory.c index b4531627a400..39918cf7327c 100644 --- a/emulators/gngb/files/patch-memory.c +++ b/emulators/gngb/files/patch-src_memory.c @@ -1,6 +1,6 @@ ---- src/memory.c.orig Sat Apr 29 02:13:47 2006 -+++ src/memory.c Sat Sep 9 18:12:36 2006 -@@ -67,7 +67,7 @@ +--- src/memory.c.orig 2006-04-28 17:13:47 UTC ++++ src/memory.c +@@ -67,7 +67,7 @@ Uint8 ram_mask; MEM_READ_ENTRY mem_read_tab[0x10]; MEM_WRITE_ENTRY mem_write_tab[0x10]; @@ -9,7 +9,7 @@ void (*select_rom_page)(Uint16 adr,Uint8 v); void (*select_ram_page)(Uint16 adr,Uint8 v); -@@ -742,6 +742,13 @@ +@@ -742,6 +742,13 @@ __inline__ void update_gb_pad(void) { if (!conf.play_movie) { if (conf.use_joy) { @@ -23,7 +23,7 @@ if ((joy_but[jmap[PAD_START]]) || (key[kmap[PAD_START]])) gb_pad|=0x08; /* Start */ if ((joy_but[jmap[PAD_SELECT]]) || (key[kmap[PAD_SELECT]])) gb_pad|=0x04; /* Select */ if ((joy_but[jmap[PAD_A]]) || (key[kmap[PAD_A]])) gb_pad|=0x01; /* A */ -@@ -752,18 +759,10 @@ +@@ -752,19 +759,11 @@ __inline__ void update_gb_pad(void) { if ((joy_axis[jmap[PAD_UP]]<-10000) || (key[kmap[PAD_UP]])) gb_pad|=0x40; if ((joy_axis[jmap[PAD_DOWN]]>10000) || (key[kmap[PAD_DOWN]])) gb_pad|=0x80;*/ @@ -34,11 +34,12 @@ if (joy_x_posjoy_y_max) joy_y_max=joy_y_pos; if (joy_y_pos(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10; + if ((joy_y_pos<(joy_y_mid-joy_y_qua)) || (key[kmap[PAD_UP]])) gb_pad|=0x40; diff --git a/emulators/gngb/files/patch-save.c b/emulators/gngb/files/patch-src_save.c similarity index 69% rename from emulators/gngb/files/patch-save.c rename to emulators/gngb/files/patch-src_save.c index a74527520dad..3e4ead524f52 100644 --- a/emulators/gngb/files/patch-save.c +++ b/emulators/gngb/files/patch-src_save.c @@ -1,5 +1,5 @@ ---- src/save.c.orig Sun Aug 15 19:46:58 2004 -+++ src/save.c Sun Aug 15 19:47:44 2004 +--- src/save.c.orig 2003-04-03 13:27:29 UTC ++++ src/save.c @@ -8,6 +8,7 @@ #define FILENAME_LEN 1024