diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2014-02-07 15:54:25 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2014-02-07 15:54:25 +0000 |
commit | 5f05a9fd77856624527c2303066f339b88d85045 (patch) | |
tree | f9aee7ca3ae69240b5c62f2fb1e692385c58f221 | |
parent | 3f6a19468cf36c3df9ad37069a2873172a683746 (diff) | |
download | ports-5f05a9fd77856624527c2303066f339b88d85045.tar.gz ports-5f05a9fd77856624527c2303066f339b88d85045.zip |
Notes
-rw-r--r-- | emulators/generator/Makefile | 56 | ||||
-rw-r--r-- | emulators/generator/files/patch-hdr__registers.h | 23 | ||||
-rw-r--r-- | emulators/generator/files/patch-main__reg68k.c | 13 |
3 files changed, 60 insertions, 32 deletions
diff --git a/emulators/generator/Makefile b/emulators/generator/Makefile index 4c85ca1330c9..e70872d01fd4 100644 --- a/emulators/generator/Makefile +++ b/emulators/generator/Makefile @@ -10,58 +10,50 @@ MASTER_SITES= http://www.squish.net/generator/files/ MAINTAINER= ports@FreeBSD.org COMMENT= SEGA Genesis emulator -LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg +LICENSE= GPLv2 +LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg + +USES= gmake USE_GNOME= gtk12 USE_SDL= sdl -USES= gmake - GNU_CONFIGURE= yes -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ARGS+=--with-gtk - +CONFIGURE_ARGS= --with-gtk MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \ AUTOHEADER="${TRUE}" MAKE_JOBS_UNSAFE= yes -OPTIONS_DEFINE= OPTIMIZED_CFLAGS RAZE SDL -RAZE_DESC= Use RAZE z80 emulation (only for i386) -SDL_DESC= Use SDL for audio +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib PLIST_FILES= bin/${PORTNAME}-gtk -.include <bsd.port.pre.mk> +OPTIONS_DEFINE= OPTIMIZED_CFLAGS SDL +OPTIONS_DEFINE_i386= RAZE -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} -CONFIGURE_ARGS+=--with-gcc=3 -.else -CONFIGURE_ARGS+=--without-gcc -.endif +OPTIMIZED_CFLAGS_CONFIGURE_ON= --with-gcc=3 +OPTIMIZED_CFLAGS_CONFIGURE_OFF= --without-gcc +RAZE_DESC= Use RAZE z80 emulation +RAZE_BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm +RAZE_CONFIGURE_ON= --with-raze +SDL_DESC= Use SDL for audio +SDL_CONFIGURE_ON= --with-sdl-audio -.if ${PORT_OPTIONS:MRAZE} && ${ARCH} == "i386" -BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm -CONFIGURE_ARGS+=--with-raze -.else +.include <bsd.port.options.mk> + +.if empty(PORT_OPTIONS:MRAZE) CONFIGURE_ARGS+=--with-cmz80 .endif -.if ${PORT_OPTIONS:MSDL} -CONFIGURE_ARGS+=--with-sdl-audio -.endif +.include <bsd.port.pre.mk> post-patch: .if ${ARCH} != "amd64" && ${ARCH} != "i386" # These architectures do not support "-minline-all-stringops" - @${REINPLACE_CMD} -e 's|-minline-all-stringops||g' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} -. if ${ARCH} == "alpha" -# "-ffast-math" does not work on alpha - @${REINPLACE_CMD} -e 's|-ffast-math||g' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} -. endif + @${REINPLACE_CMD} -e \ + 's|-minline-all-stringops||g' ${WRKSRC}/configure .endif - @${REINPLACE_CMD} -e '/%define %1 @UNDERSCORE@%1 /d' \ - ${WRKSRC}/raze/raze.asm.in + @${REINPLACE_CMD} -e \ + '/%define %1 @UNDERSCORE@%1 /d' ${WRKSRC}/raze/raze.asm.in .include <bsd.port.post.mk> diff --git a/emulators/generator/files/patch-hdr__registers.h b/emulators/generator/files/patch-hdr__registers.h new file mode 100644 index 000000000000..63a9d64842a0 --- /dev/null +++ b/emulators/generator/files/patch-hdr__registers.h @@ -0,0 +1,23 @@ +--- hdr/registers.h.orig ++++ hdr/registers.h +@@ -3,17 +3,17 @@ + call a C function, then when that C function returns these registers are + still what they were before we made the call. */ + +-#ifdef PROCESSOR_ARM ++#if defined(PROCESSOR_ARM) && !defined(__clang__) + register uint32 reg68k_pc asm ("r7"); + register uint32 *reg68k_regs asm ("r8"); + register t_sr reg68k_sr asm ("r9"); + #else +-# ifdef PROCESSOR_SPARC ++# if defined(PROCESSOR_SPARC) && !defined(__clang__) + register uint32 reg68k_pc asm ("5"); + register uint32 *reg68k_regs asm ("6"); + register t_sr reg68k_sr asm ("7"); + # else +-# ifdef PROCESSOR_INTEL ++# if defined(PROCESSOR_INTEL) && !defined(__clang__) + register uint32 reg68k_pc asm ("%ebx"); + register uint32 *reg68k_regs asm ("%edi"); + register t_sr reg68k_sr asm ("%esi"); diff --git a/emulators/generator/files/patch-main__reg68k.c b/emulators/generator/files/patch-main__reg68k.c new file mode 100644 index 000000000000..c4004e45001d --- /dev/null +++ b/emulators/generator/files/patch-main__reg68k.c @@ -0,0 +1,13 @@ +--- main/reg68k.c.orig ++++ main/reg68k.c +@@ -20,8 +20,8 @@ + + /*** global variables ***/ + +-#if (!(defined(PROCESSOR_ARM) || defined(PROCESSOR_SPARC) \ +- || defined(PROCESSOR_INTEL))) ++#if ((!(defined(PROCESSOR_ARM) || defined(PROCESSOR_SPARC) \ ++ || defined(PROCESSOR_INTEL))) || defined(__clang__)) + uint32 reg68k_pc; + uint32 *reg68k_regs; + t_sr reg68k_sr; |