diff options
author | krion <krion@FreeBSD.org> | 2003-12-04 16:28:03 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2003-12-04 16:28:03 +0800 |
commit | a9171f12e0e7ed24fdce233b330a5224fd260cfa (patch) | |
tree | 319a0cddf04fab930dc1457871485935de39aab8 /emulators/generator | |
parent | 5304ab1ca2455668437e9921b5d4d7894ea5b1dd (diff) | |
download | freebsd-ports-graphics-a9171f12e0e7ed24fdce233b330a5224fd260cfa.tar.gz freebsd-ports-graphics-a9171f12e0e7ed24fdce233b330a5224fd260cfa.tar.zst freebsd-ports-graphics-a9171f12e0e7ed24fdce233b330a5224fd260cfa.zip |
- Update to version 0.35
PR: 59610
Submitted by: Ports Fury
Diffstat (limited to 'emulators/generator')
-rw-r--r-- | emulators/generator/Makefile | 55 | ||||
-rw-r--r-- | emulators/generator/distinfo | 2 | ||||
-rw-r--r-- | emulators/generator/files/patch-configure | 11 | ||||
-rw-r--r-- | emulators/generator/files/patch-configure.in | 11 | ||||
-rw-r--r-- | emulators/generator/files/patch-hdr::generator.h | 41 | ||||
-rw-r--r-- | emulators/generator/files/patch-main-Makefile.in | 20 | ||||
-rw-r--r-- | emulators/generator/files/patch-main-ui-gtk.c | 136 | ||||
-rw-r--r-- | emulators/generator/files/patch-main::ui-gtk.c | 11 |
8 files changed, 73 insertions, 214 deletions
diff --git a/emulators/generator/Makefile b/emulators/generator/Makefile index c71260df25f..20cea8efa76 100644 --- a/emulators/generator/Makefile +++ b/emulators/generator/Makefile @@ -6,57 +6,42 @@ # PORTNAME= generator -PORTVERSION= 0.34 +PORTVERSION= 0.35 CATEGORIES= emulators MASTER_SITES= http://www.squish.net/generator/files/ MAINTAINER= ports@FreeBSD.org COMMENT= SEGA Genesis emulator -# apparently the configure script can't handle this -NOT_FOR_ARCHS= alpha +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg -LIB_DEPENDS= gtk12.2:${PORTSDIR}/x11-toolkits/gtk12 \ - SDL-1.1.5:${PORTSDIR}/devel/sdl12 -.if (${MACHINE_ARCH} == "i386") -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm -.endif - -SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config -GTK_CONFIG?= ${X11BASE}/bin/gtk12-config - -USE_GMAKE= yes +USE_GNOME= gtk12 +USE_SDL= yes USE_REINPLACE= yes +USE_GMAKE= yes GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --with-gtk +MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \ + AUTOHEADER="${TRUE}" + +.include <bsd.port.pre.mk> -.if (${MACHINE_ARCH} == "i386") +.if ${ARCH} == "i386" +BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm CONFIGURE_ARGS+= --with-raze .else CONFIGURE_ARGS+= --with-cmz80 .endif -MAKE_ENV+= GTK_CONFIG="${GTK_CONFIG}" \ - SDL_CONFIG="${SDL_CONFIG}" -CONFIGURE_ENV+= GTK_CONFIG="${GTK_CONFIG}" \ - SDL_CONFIG="${SDL_CONFIG}" - -.include <bsd.port.pre.mk> - post-patch: -.if ${OSVERSION} >= 500035 - @${REINPLACE_CMD} -e \ - 's|-malign-loops|-falign-loops|g ; \ - s|-malign-jumps|-falign-jumps|g ; \ - s|-malign-functions|-falign-functions|g' ${WRKSRC}/configure.in - @${REINPLACE_CMD} -e \ - 's|-malign-loops|-falign-loops|g ; \ - s|-malign-jumps|-falign-jumps|g ; \ - s|-malign-functions|-falign-functions|g' ${WRKSRC}/configure -.endif - -.if ${OSVERSION} >= 501102 -BROKEN= "Fails to compile due to gcc3.3 preprocessor" -.endif + @${REINPLACE_CMD} -e 's|-O3||g ; \ + s|-minline-all-stringops||g ; \ + s|-march=pentium||g ; \ + s|-malign-loops=5||g ; \ + s|-malign-jumps=5||g ; \ + s|-malign-functions=5||g' ${WRKSRC}/configure .include <bsd.port.post.mk> diff --git a/emulators/generator/distinfo b/emulators/generator/distinfo index fad3e378309..15abadc95f8 100644 --- a/emulators/generator/distinfo +++ b/emulators/generator/distinfo @@ -1 +1 @@ -MD5 (generator-0.34.tar.gz) = 8eb154bc0d0f644800c865175f22b873 +MD5 (generator-0.35.tar.gz) = 86f23702f2f7b38172863d080bb94630 diff --git a/emulators/generator/files/patch-configure b/emulators/generator/files/patch-configure deleted file mode 100644 index 73b1b4022e0..00000000000 --- a/emulators/generator/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig Sat Oct 20 16:05:45 2001 -+++ configure Mon Apr 7 02:18:27 2003 -@@ -1575,7 +1575,7 @@ - if [ "x$GCCVER" != "xno" ]; then - echo "$as_me:1576: result: Turning on gcc optimisations" >&5 - echo "${ECHO_T}Turning on gcc optimisations" >&6 -- CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer" -+ CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer" - if [ "x$GCCVER" = "x3" ]; then - echo "$as_me:1580: result: Turning on gcc 3 optimisations" >&5 - echo "${ECHO_T}Turning on gcc 3 optimisations" >&6 diff --git a/emulators/generator/files/patch-configure.in b/emulators/generator/files/patch-configure.in deleted file mode 100644 index 563616dac47..00000000000 --- a/emulators/generator/files/patch-configure.in +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.in.orig Sat Oct 20 15:34:19 2001 -+++ configure.in Mon Apr 7 02:18:22 2003 -@@ -118,7 +118,7 @@ - else - if [[ "x$GCCVER" != "xno" ]]; then - AC_MSG_RESULT(Turning on gcc optimisations) -- CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer" -+ CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer" - if [[ "x$GCCVER" = "x3" ]]; then - AC_MSG_RESULT(Turning on gcc 3 optimisations) - CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno" diff --git a/emulators/generator/files/patch-hdr::generator.h b/emulators/generator/files/patch-hdr::generator.h new file mode 100644 index 00000000000..648ed05d7d7 --- /dev/null +++ b/emulators/generator/files/patch-hdr::generator.h @@ -0,0 +1,41 @@ +--- hdr/generator.h.orig Mon May 5 03:50:43 2003 ++++ hdr/generator.h Sun Nov 23 04:46:22 2003 +@@ -13,6 +13,10 @@ + void gen_softreset(void); + void gen_loadmemrom(const char *rom, int romlen); + ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + #if defined(linux) + #include <byteswap.h> + #define SWAP16(x) bswap_16((x)) +@@ -21,6 +25,10 @@ + #include <machine/endian.h> + #define SWAP16(x) bswap_16((x)) + #define SWAP32(x) bswap_32((x)) ++#elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 ++ #include <sys/endian.h> ++ #define SWAP16(x) (be16toh(x)) ++ #define SWAP32(x) (be32toh(x)) + #else + #define SWAP16(y) (( ((y)>>8) & 0x00ff) | (( ((y)<<8) & 0xff00))) + #define SWAP32(y) (( ((y)>>24) & 0x000000ff) | \ +@@ -221,11 +229,11 @@ + # define LOG_DEBUG3(x) /* ui_log_debug3 ## x */ + # define LOG_DEBUG2(x) /* ui_log_debug2 ## x */ + # define LOG_DEBUG1(x) /* ui_log_debug1 ## x */ +-# define LOG_USER(x) ui_log_user ## x +-# define LOG_VERBOSE(x) ui_log_verbose ## x +-# define LOG_NORMAL(x) ui_log_normal ## x +-# define LOG_CRITICAL(x) ui_log_critical ## x +-# define LOG_REQUEST(x) ui_log_request ## x ++# define LOG_USER(x) ui_log_user x ++# define LOG_VERBOSE(x) ui_log_verbose x ++# define LOG_NORMAL(x) ui_log_normal x ++# define LOG_CRITICAL(x) ui_log_critical x ++# define LOG_REQUEST(x) ui_log_request x + #endif + + typedef struct { diff --git a/emulators/generator/files/patch-main-Makefile.in b/emulators/generator/files/patch-main-Makefile.in deleted file mode 100644 index 4da493a73a0..00000000000 --- a/emulators/generator/files/patch-main-Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ ---- main/Makefile.in.orig Mon Apr 7 01:54:22 2003 -+++ main/Makefile.in Mon Apr 7 01:54:57 2003 -@@ -222,7 +222,7 @@ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ -- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ -+ f=`echo $$p1|sed 's/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \ - else :; fi; \ -@@ -231,7 +231,7 @@ - uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ -- f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ -+ f=`echo $$p|sed 's/$(EXEEXT)$$//;s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ - done diff --git a/emulators/generator/files/patch-main-ui-gtk.c b/emulators/generator/files/patch-main-ui-gtk.c deleted file mode 100644 index 3465f38c47d..00000000000 --- a/emulators/generator/files/patch-main-ui-gtk.c +++ /dev/null @@ -1,136 +0,0 @@ ---- main/ui-gtk.c.orig Sun Oct 14 18:02:05 2001 -+++ main/ui-gtk.c Mon Apr 7 01:40:55 2003 -@@ -18,7 +18,8 @@ - /* need Xlib.h for XAutoRepeatOff - how poo is X */ - #include "X11/Xlib.h" - --#include "SDL.h" -+#include <SDL.h> -+#include <SDL_joystick.h> - - #include "generator.h" - #include "snprintf.h" -@@ -98,6 +99,8 @@ - static int ui_query_response = -1; /* query response */ - t_gtkkeys ui_cont[2]; /* keyboard key codes */ - static int ui_musicfile = -1; /* fd of output file for GYM/GNM logging */ -+static int ui_joysticks = 0; /* number of joysticks */ -+static SDL_Joystick *js_handle[2] = { NULL, NULL }; - - static enum { - SCREEN_100, SCREEN_200, SCREEN_FULL -@@ -120,6 +123,7 @@ - static int ui_gtk_query(const char *msg, int style); - static void ui_gtk_opts_to_menu(void); - static void ui_simpleplot(void); -+static void ui_sdl_events (void); - - /*** Program entry point ***/ - -@@ -129,6 +133,8 @@ - GtkWidget *button, *draw, *obj; - struct passwd *passwd; - struct stat statbuf; -+ int i; -+ const char *name; - - gtk_set_locale(); - gtk_init(&argc, &argv); -@@ -209,10 +215,21 @@ - GDK_WINDOW_XWINDOW(draw->window)); - putenv(SDL_windowhack); - } -- if (SDL_Init(SDL_INIT_VIDEO) < 0) { -+ if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) { - fprintf(stderr, "Couldn't initialise SDL: %s\n", SDL_GetError()); - return -1; - } -+ ui_joysticks = SDL_NumJoysticks(); -+ /* Print information about the joysticks */ -+ fprintf(stderr, "%d joysticks detected\n", ui_joysticks); -+ for (i = 0; i < ui_joysticks; ++i) { -+ name = SDL_JoystickName(i); -+ fprintf(stderr, "Joystick %d: %s\n", i, name ? name : "Unknown Joystick"); -+ } -+ js_handle[0] = SDL_JoystickOpen(0); -+ js_handle[1] = SDL_JoystickOpen(1); -+ SDL_JoystickEventState(SDL_ENABLE); -+ - ui_gtk_sizechange(); - ui_gtk_newoptions(); - ui_gtk_opts_to_menu(); -@@ -264,9 +281,11 @@ - if (ui_running) { - while (gtk_events_pending()) - gtk_main_iteration_do(0); -+ ui_sdl_events(); - ui_newframe(); - event_doframe(); - } else { -+ ui_sdl_events(); - gtk_main(); - } - } -@@ -1529,6 +1548,62 @@ - } - } - } -+ -+static void -+ui_sdl_events (void) -+{ -+ SDL_Event event; -+ -+#define LEFT(event) ((event.jaxis.value < -16384) ? 1 : 0) -+#define RIGHT(event) ((event.jaxis.value > 16384) ? 1 : 0) -+#define UP(event) ((event.jaxis.value < -16384) ? 1 : 0) -+#define DOWN(event) ((event.jaxis.value > 16384) ? 1 : 0) -+#define PRESS(event) ((event.type == SDL_JOYBUTTONDOWN) ? 1 : 0) -+ -+ while (SDL_PollEvent(&event)) { -+ switch (event.type) { -+ case SDL_JOYAXISMOTION: -+ if (event.jaxis.which > 1) -+ break; -+ switch (event.jaxis.axis) { -+ case 0: /* left & right */ -+ mem68k_cont[event.jaxis.which].left = LEFT(event); -+ mem68k_cont[event.jaxis.which].right = RIGHT(event); -+ break; -+ case 1: /* up & down */ -+ mem68k_cont[event.jaxis.which].up = UP(event); -+ mem68k_cont[event.jaxis.which].down = DOWN(event); -+ break; -+ default: -+ break; -+ } -+ break; -+ case SDL_JOYBUTTONDOWN: -+ case SDL_JOYBUTTONUP: -+ if (event.jbutton.which > 1) -+ break; -+ switch (event.jbutton.button) { -+ case 0: -+ mem68k_cont[event.jbutton.which].a = PRESS(event); -+ break; -+ case 1: -+ mem68k_cont[event.jbutton.which].b = PRESS(event); -+ break; -+ case 2: -+ mem68k_cont[event.jbutton.which].c = PRESS(event); -+ break; -+ case 3: -+ mem68k_cont[event.jbutton.which].start = PRESS(event); -+ break; -+ default: -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+ } -+} - - void ui_gtk_mainenter(void) - { diff --git a/emulators/generator/files/patch-main::ui-gtk.c b/emulators/generator/files/patch-main::ui-gtk.c new file mode 100644 index 00000000000..9b6181f968b --- /dev/null +++ b/emulators/generator/files/patch-main::ui-gtk.c @@ -0,0 +1,11 @@ +--- main/ui-gtk.c.orig Sun May 4 09:09:51 2003 ++++ main/ui-gtk.c Sun Nov 23 04:32:57 2003 +@@ -739,7 +739,7 @@ + /* logging is done this way because this was the best I could come up with + whilst battling with macros that can only take fixed numbers of arguments */ + +-#define LOG_FUNC(name,level,txt) void ui_log_ ## name ## (const char *text, ...) \ ++#define LOG_FUNC(name,level,txt) void ui_log_ ## name (const char *text, ...) \ + { \ + va_list ap; \ + if (gen_loglevel >= level) { \ |