svn commit: r357255 - in head/emulators/zsnes: . files

Danilo Egea Gondolfo danilo at FreeBSD.org
Tue Jun 10 04:09:41 UTC 2014


Author: danilo
Date: Tue Jun 10 04:09:40 2014
New Revision: 357255
URL: http://svnweb.freebsd.org/changeset/ports/357255
QAT: https://qat.redports.org/buildarchive/r357255/

Log:
  - Fix build with clang
  - Use options helpers
  
  PR:		ports/190852
  Submitted by:	Naram Qashat <cyberbotx at cyberbotx.com>

Added:
  head/emulators/zsnes/files/patch-tools_depbuild.cpp   (contents, props changed)
Modified:
  head/emulators/zsnes/Makefile

Modified: head/emulators/zsnes/Makefile
==============================================================================
--- head/emulators/zsnes/Makefile	Tue Jun 10 03:53:03 2014	(r357254)
+++ head/emulators/zsnes/Makefile	Tue Jun 10 04:09:40 2014	(r357255)
@@ -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

Added: head/emulators/zsnes/files/patch-tools_depbuild.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/zsnes/files/patch-tools_depbuild.cpp	Tue Jun 10 04:09:40 2014	(r357255)
@@ -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;


More information about the svn-ports-head mailing list