diff options
author | danilo <danilo@FreeBSD.org> | 2014-06-10 12:09:40 +0800 |
---|---|---|
committer | danilo <danilo@FreeBSD.org> | 2014-06-10 12:09:40 +0800 |
commit | 92dc4dff091bf315b6d18c25bc8470af4bfec641 (patch) | |
tree | 8949eb8c348a7cb095c31dab9907052f0dd31daf | |
parent | 08e591a2f351f64fae1b1f558e2bd6ecb151ebde (diff) | |
download | freebsd-ports-gnome-92dc4dff091bf315b6d18c25bc8470af4bfec641.tar.gz freebsd-ports-gnome-92dc4dff091bf315b6d18c25bc8470af4bfec641.tar.zst freebsd-ports-gnome-92dc4dff091bf315b6d18c25bc8470af4bfec641.zip |
- Fix build with clang
- Use options helpers
PR: ports/190852
Submitted by: Naram Qashat <cyberbotx@cyberbotx.com>
-rw-r--r-- | emulators/zsnes/Makefile | 45 | ||||
-rw-r--r-- | emulators/zsnes/files/patch-tools_depbuild.cpp | 11 |
2 files changed, 24 insertions, 32 deletions
diff --git a/emulators/zsnes/Makefile b/emulators/zsnes/Makefile index 3a42ac4d8a74..12b8b9e20275 100644 --- a/emulators/zsnes/Makefile +++ b/emulators/zsnes/Makefile @@ -34,44 +34,20 @@ CONFIGURE_ARGS+= --disable-cpucheck PLIST_FILES= bin/zsnes man/man1/zsnes.1.gz +DEBUGGER_CONFIGURE_ENABLE= debugger +JMA_CONFIGURE_ENABLE= jma +X11_CONFIGURE_WITH= x +OPENGL_CONFIGURE_ENABLE= opengl + +AO_LIB_DEPENDS= libao.so:${PORTSDIR}/audio/libao +AO_CONFIGURE_ENABLE= libao + CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15 CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/libpng15 LDFLAGS+= -L${LOCALBASE}/lib .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MDEBUGGER} -CONFIGURE_ARGS+= --enable-debugger -.else -CONFIGURE_ARGS+= --disable-debugger -.endif - -.if ${PORT_OPTIONS:MJMA} -CONFIGURE_ARGS+= --enable-jma -.else -CONFIGURE_ARGS+= --disable-jma -.endif - -.if ${PORT_OPTIONS:MX11} -CONFIGURE_ARGS+= --with-x -.else -CONFIGURE_ARGS+= --without-x -.endif - -.if ${PORT_OPTIONS:MOPENGL} -USE_GL= yes -CONFIGURE_ARGS+= --enable-opengl -.else -CONFIGURE_ARGS+= --disable-opengl -.endif - -.if ${PORT_OPTIONS:MAO} -LIB_DEPENDS+= ao:${PORTSDIR}/audio/libao -CONFIGURE_ARGS+= --enable-libao -.else -CONFIGURE_ARGS+= --disable-libao -.endif - post-patch: @${REINPLACE_CMD} -e \ 's|@CXX@ @CFLAGS@ -o|@CXX@ @CXXFLAGS@ @CPPFLAGS@ -o|g ; \ @@ -79,6 +55,11 @@ post-patch: ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -i "" -e \ 's|-O3||g' ${WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} -e 's|size_t argc|int argc|g' \ + ${WRKSRC}/parsegen.cpp ${WRKSRC}/tools/depbuild.cpp \ + ${WRKSRC}/tools/extraext.cpp ${WRKSRC}/tools/macroll.cpp \ + ${WRKSRC}/tools/minwhite.cpp ${WRKSRC}/tools/nreplace.cpp \ + ${WRKSRC}/tools/varrep.cpp do-install: ${INSTALL_PROGRAM} ${WRKSRC}/zsnes ${STAGEDIR}${PREFIX}/bin diff --git a/emulators/zsnes/files/patch-tools_depbuild.cpp b/emulators/zsnes/files/patch-tools_depbuild.cpp new file mode 100644 index 000000000000..32517c21d398 --- /dev/null +++ b/emulators/zsnes/files/patch-tools_depbuild.cpp @@ -0,0 +1,11 @@ +--- tools/depbuild.cpp.orig 2006-12-27 06:04:05.000000000 -0500 ++++ tools/depbuild.cpp 2014-06-09 23:45:07.000000000 -0400 +@@ -29,6 +29,8 @@ + #include "fileutil.h" + #include "strutil.h" + ++#include <unistd.h> ++ + string cc; + string nasm; + string cflags; |