Index: head/emulators/gngb/Makefile =================================================================== --- head/emulators/gngb/Makefile (revision 425481) +++ head/emulators/gngb/Makefile (revision 425482) @@ -1,44 +1,35 @@ # Created by: Yukihiro Nakai # $FreeBSD$ 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 +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= gmake localbase +USE_CSTD= gnu89 USE_SDL= sdl -USES= gmake GNU_CONFIGURE= yes -USE_CSTD= gnu89 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 \ 's|"$$SDL_CONFIG" = yes|-n "$$SDL_CONFIG"|g ; \ s|sdl-config |$$SDL_CONFIG |g ; \ s|$$OPT||g' ${WRKSRC}/configure .include Index: head/emulators/gngb/files/patch-save.c =================================================================== --- head/emulators/gngb/files/patch-save.c (revision 425481) +++ head/emulators/gngb/files/patch-save.c (nonexistent) @@ -1,10 +0,0 @@ ---- src/save.c.orig Sun Aug 15 19:46:58 2004 -+++ src/save.c Sun Aug 15 19:47:44 2004 -@@ -8,6 +8,7 @@ - - #define FILENAME_LEN 1024 - static SDL_Surface *savestate_bmp=NULL; -+void movie_add_pad(Uint8 pad); - - void get_filename_ext(char *f,char *ext) { - /* char *a=getenv("HOME");*/ Property changes on: head/emulators/gngb/files/patch-save.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/emulators/gngb/files/patch-memory.c =================================================================== --- head/emulators/gngb/files/patch-memory.c (revision 425481) +++ head/emulators/gngb/files/patch-memory.c (nonexistent) @@ -1,44 +0,0 @@ ---- 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 @@ - MEM_READ_ENTRY mem_read_tab[0x10]; - MEM_WRITE_ENTRY mem_write_tab[0x10]; - --Sint16 joy_x_min=0;joy_x_max=0;joy_y_min=0;joy_y_max=0; -+Sint16 joy_x_min=0,joy_x_max=0,joy_y_min=0,joy_y_max=0; - - void (*select_rom_page)(Uint16 adr,Uint8 v); - void (*select_ram_page)(Uint16 adr,Uint8 v); -@@ -742,6 +742,13 @@ - if (!conf.play_movie) { - - if (conf.use_joy) { -+ Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; -+ Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; -+ Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2; -+ Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2; -+ Sint16 joy_x_qua=joy_x_mid / 2; -+ Sint16 joy_y_qua=joy_y_mid / 2; -+ - 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 @@ - 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;*/ - -- Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; -- Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; -- - if (joy_x_pos>joy_x_max) joy_x_max=joy_x_pos; - 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; Property changes on: head/emulators/gngb/files/patch-memory.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/emulators/gngb/files/patch-src_memory.c =================================================================== --- head/emulators/gngb/files/patch-src_memory.c (nonexistent) +++ head/emulators/gngb/files/patch-src_memory.c (revision 425482) @@ -0,0 +1,45 @@ +--- 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]; + +-Sint16 joy_x_min=0;joy_x_max=0;joy_y_min=0;joy_y_max=0; ++Sint16 joy_x_min=0,joy_x_max=0,joy_y_min=0,joy_y_max=0; + + void (*select_rom_page)(Uint16 adr,Uint8 v); + void (*select_ram_page)(Uint16 adr,Uint8 v); +@@ -742,6 +742,13 @@ __inline__ void update_gb_pad(void) { + if (!conf.play_movie) { + + if (conf.use_joy) { ++ Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; ++ Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; ++ Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2; ++ Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2; ++ Sint16 joy_x_qua=joy_x_mid / 2; ++ Sint16 joy_y_qua=joy_y_mid / 2; ++ + 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,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;*/ + +- Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; +- Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; +- + if (joy_x_pos>joy_x_max) joy_x_max=joy_x_pos; + 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; Property changes on: head/emulators/gngb/files/patch-src_memory.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/emulators/gngb/files/patch-src_save.c =================================================================== --- head/emulators/gngb/files/patch-src_save.c (nonexistent) +++ head/emulators/gngb/files/patch-src_save.c (revision 425482) @@ -0,0 +1,10 @@ +--- src/save.c.orig 2003-04-03 13:27:29 UTC ++++ src/save.c +@@ -8,6 +8,7 @@ + + #define FILENAME_LEN 1024 + static SDL_Surface *savestate_bmp=NULL; ++void movie_add_pad(Uint8 pad); + + void get_filename_ext(char *f,char *ext) { + /* char *a=getenv("HOME");*/ Property changes on: head/emulators/gngb/files/patch-src_save.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property