1 # Created by: Alejandro Pulver <alejandro@varnet.biz>
8 MASTER_SITES= GOOGLE_CODE/${PORTNAME}
10 MAINTAINER= acm@FreeBSD.org
11 COMMENT= NeoGeo emulator
13 USES= compiler:features gmake
18 CONFIGURE_ARGS= --program-transform-name="" --disable-gp2x
21 CPPFLAGS+= ${CFLAGS} `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include
22 LDFLAGS+= `${SDL_CONFIG} --libs` -L${LOCALBASE}/lib
24 MAKE_ARGS+= CC_FOR_BUILD=${CC}
26 SUB_FILES= pkg-message
28 OPTIONS_DEFINE_i386= ASM RAZE STAR
29 OPTIONS_DEFAULT_i386= ASM
30 RAZE_DESC= Use Raze as z80 emulator (broken)
31 STAR_DESC= Use Starscream as 68k emulator (broken)
33 .include <bsd.port.pre.mk>
35 .if ${PORT_OPTIONS:MI386ASM} || ${PORT_OPTIONS:MRAZE} || \
37 BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
40 .if ${PORT_OPTIONS:MI386ASM}
41 CONFIGURE_ARGS+= --enable-i386asm
43 CONFIGURE_ARGS+= --disable-i386asm
46 .if ${PORT_OPTIONS:MRAZE}
47 CONFIGURE_ARGS+= --with-z80core=raze
50 CONFIGURE_ARGS+= --with-z80core=mamez80
53 .if ${PORT_OPTIONS:MSTAR}
54 CONFIGURE_ARGS+= --with-m68kcore=starscream
57 CONFIGURE_ARGS+= --with-m68kcore=gen68k
61 @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure
62 .if ${ARCH} == "x86_64"
63 @${REINPLACE_CMD} -e 's|-malign-double||' ${WRKSRC}/configure
65 .if ${COMPILER_TYPE} == "clang"
66 @${REINPLACE_CMD} -e 's|-frerun-loop-opt||; \
67 s|-falign-jumps=2||; s|-falign-loops=2||; \
68 s|-fschedule-insns2||; s|-malign-double||' \
71 @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' \
72 ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} \
73 ${WRKSRC}/src/generator68k/Makefile.in
76 ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
77 ${INSTALL_DATA} ${WRKSRC}/sample_gngeorc ${STAGEDIR}${EXAMPLESDIR}/gngeorc
79 .include <bsd.port.post.mk>