From nobody@FreeBSD.org  Sat Jun  8 01:02:59 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id D27CC75A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Jun 2013 01:02:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id C32251C2C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Jun 2013 01:02:59 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5812xbS052041
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 8 Jun 2013 01:02:59 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5812xjk052040;
	Sat, 8 Jun 2013 01:02:59 GMT
	(envelope-from nobody)
Message-Id: <201306080102.r5812xjk052040@oldred.freebsd.org>
Date: Sat, 8 Jun 2013 01:02:59 GMT
From: Green Dog <fiziologus@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Update] emulators/mednafen to 0.8.D.3
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179421
>Category:       ports
>Synopsis:       [Update] emulators/mednafen to 0.8.D.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    acm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 08 01:10:00 UTC 2013
>Closed-Date:    Fri Feb 28 21:11:45 UTC 2014
>Last-Modified:  Fri Feb 28 21:20:00 UTC 2014
>Originator:     Green Dog
>Release:        
>Organization:
>Environment:
>Description:
Update emulators/mednafen to 0.8.D.3 (latest stable)

Fix build in amd64 (zlib), add build options, cleanup.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN mednafen/Makefile mednafen/Makefile
--- mednafen/Makefile	2013-04-26 20:39:14.000000000 +0400
+++ mednafen/Makefile	2013-06-08 00:58:04.000000000 +0400
@@ -1,8 +1,7 @@
 # $FreeBSD: emulators/mednafen/Makefile 316624 2013-04-26 16:39:14Z bapt $
 
 PORTNAME=	mednafen
-PORTVERSION=	0.8.B
-PORTREVISION=	8
+PORTVERSION=	0.8.D.3
 PORTEPOCH=	1
 CATEGORIES=	emulators games
 MASTER_SITES=	SF/${PORTNAME}/Mednafen/${PORTVERSION}
@@ -10,42 +9,125 @@
 MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Portable multi-system emulator
 
-LIB_DEPENDS=	cdio.13:${PORTSDIR}/sysutils/libcdio \
-		sndfile.1:${PORTSDIR}/audio/libsndfile \
-		vorbis.4:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS=	cdio:${PORTSDIR}/sysutils/libcdio \
+		sndfile:${PORTSDIR}/audio/libsndfile \
+		vorbis:${PORTSDIR}/audio/libvorbis
 
 USE_BZIP2=	yes
-USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 USE_SDL=	sdl net
-USE_XORG=	x11
-USE_GL=		glut
+USE_GL=		gl glu
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD}
+LDFLAGS+=	-L${LOCALBASE}/lib
 WRKSRC=	${WRKDIR}/${PORTNAME}
 SUB_FILES=	pkg-message
 
-OPTIONS_DEFINE=	NLS DOCS
+CONFIGURE_ARGS+=	--disable-alsa --disable-alsatest \
+			--with-sdl-prefix=${LOCALBASE}
+USES+=		iconv pkgconfig:build
+
+MAKE_JOBS_SAFE=	yes
+
+OPTIONS_DEFINE=	NLS DOCS JACK
+OPTIONS_MULTI=	EMU
+
+OPTIONS_MULTI_EMU=	GB GBA LINX NES NGP PCE PCFX SMS SWAN
+
+OPTIONS_DEFAULT=	GB GBA LINX NES NGP PCE PCFX SMS SWAN
+
+GB_DESC=	build with GameBoy emulation
+GBA_DESC=	build with GameBoy Advance emulation
+LINX_DESC=	build with Atari Lynx emulation
+NES_DESC=	build with Nintendo Entertainment System emulation
+NGP_DESC=	build with Neo Geo Pocket emulation
+PCE_DESC=	build with PC Engine(TurboGrafx 16) emulation
+PCFX_DESC=	build with PC-FX emulation
+SMS_DESC=	build with SMS+GG emulation
+SWAN_DESC=	build with WonderSwan emulation
+JACK_DESC=	support the JACK audio API
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MNLS}
 USES+=	gettext
 PLIST_SUB+=	NLS=""
-FLAG_NLS=	true
+CONFIGURE_ARGS+=	--enable-nls
 .else
 CONFIGURE_ARGS+=	--disable-nls
 PLIST_SUB+=	NLS="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MJACK}
+CONFIGURE_ARGS+=	--enable-jack
+LIB_DEPENDS+=		jack:${PORTSDIR}/audio/jack
+.else
+CONFIGURE_ARGS+=	--disable-jack
+.endif
+
+.if ${PORT_OPTIONS:MGB}
+CONFIGURE_ARGS+=	--enable-gb
+.else
+CONFIGURE_ARGS+=	--disable-gb
+.endif
+
+.if ${PORT_OPTIONS:MGBA}
+CONFIGURE_ARGS+=	--enable-gba
+.else
+CONFIGURE_ARGS+=	--disable-gba
+.endif
+
+.if ${PORT_OPTIONS:MLINX}
+CONFIGURE_ARGS+=	--enable-lynx
+.else
+CONFIGURE_ARGS+=	--disable-lynx
+.endif
+
+.if ${PORT_OPTIONS:MNES}
+CONFIGURE_ARGS+=	--enable-nes
+.else
+CONFIGURE_ARGS+=	--disable-nes
+.endif
+
+.if ${PORT_OPTIONS:MNGP}
+CONFIGURE_ARGS+=	--enable-ngp
+.else
+CONFIGURE_ARGS+=	--disable-ngp
+.endif
+
+.if ${PORT_OPTIONS:MPCE}
+CONFIGURE_ARGS+=	--enable-pce
+.else
+CONFIGURE_ARGS+=	--disable-pce
+.endif
+
+.if ${PORT_OPTIONS:MPCFX}
+CONFIGURE_ARGS+=	--enable-pcfx
+.else
+CONFIGURE_ARGS+=	--disable-pcfx
+.endif
+
+.if ${PORT_OPTIONS:MSMS}
+CONFIGURE_ARGS+=	--enable-sms
+.else
+CONFIGURE_ARGS+=	--disable-sms
+.endif
+
+.if ${PORT_OPTIONS:MSWAN}
+CONFIGURE_ARGS+=	--enable-wswan
+.else
+CONFIGURE_ARGS+=	--disable-wswan
+.endif
+
 .if ${ARCH}==sparc64
 BROKEN=		does not compile on ${ARCH} due to internal compiler error
 .endif
 
 pre-configure:
-	@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|g' -e \
-		's|/usr/local|${LOCALBASE}|g' -e 's|/usr/X11R6|${LOCALBASE}|g' \
+	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+		-e 's|/usr/X11R6|${LOCALBASE}|g' \
 			${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|NetBSD|FreeBSD|' \
+		${WRKSRC}/include/trio/triodef.h
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
diff -ruN mednafen/distinfo mednafen/distinfo
--- mednafen/distinfo	2012-07-14 17:54:48.000000000 +0400
+++ mednafen/distinfo	2013-06-03 22:31:04.000000000 +0400
@@ -1,2 +1,2 @@
-SHA256 (mednafen-0.8.B.tar.bz2) = d7f5122ddab321f971833733f20858e2300693b1b489cc78f06aa7fd08f0b892
-SIZE (mednafen-0.8.B.tar.bz2) = 2414246
+SHA256 (mednafen-0.8.D.3.tar.bz2) = d678178f0dc03c89c7a0c83bf0c721af406ee53dfa79295432ab13722ed0eea2
+SIZE (mednafen-0.8.D.3.tar.bz2) = 2442705
diff -ruN mednafen/files/patch-src__file.cpp mednafen/files/patch-src__file.cpp
--- mednafen/files/patch-src__file.cpp	1970-01-01 03:00:00.000000000 +0300
+++ mednafen/files/patch-src__file.cpp	2013-06-07 18:54:34.000000000 +0400
@@ -0,0 +1,29 @@
+--- src/file.cpp.orig	2009-05-15 06:12:55.000000000 +0400
++++ src/file.cpp	2013-06-07 18:52:21.000000000 +0400
+@@ -229,7 +229,7 @@
+    goto doret;
+   }
+ 
+-  while((howmany = gzread(tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
++  while((howmany = gzread((gzFile)tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
+   {
+    cur_size += howmany;
+    cur_alloced <<= 1;
+@@ -282,7 +282,7 @@
+  }
+  else if(type == MDFN_FILETYPE_GZIP)
+  {
+-  gzclose(tz);
++  gzclose((gzFile)tz);
+  }
+  else if(type == MDFN_FILETYPE_ZIP)
+  {
+@@ -444,7 +444,7 @@
+ 
+    if(!(fceufp = MakeMemWrap(t, 1)))
+    {
+-    gzclose(t);
++    gzclose((gzFile)t);
+     return(0);
+    }
+ 
diff -ruN mednafen/pkg-descr mednafen/pkg-descr
--- mednafen/pkg-descr	2012-07-14 17:54:48.000000000 +0400
+++ mednafen/pkg-descr	2013-06-08 00:54:44.000000000 +0400
@@ -13,4 +13,4 @@
 slightly less latency, although the latency differences may not be perceptible
 to most people.
 
-WWW:	http://mednafen.sf.net/
+WWW: http://mednafen.sf.net/


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->acm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jun 8 01:10:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179421 
State-Changed-From-To: open->closed 
State-Changed-By: rene 
State-Changed-When: Fri Feb 28 21:11:20 UTC 2014 
State-Changed-Why:  
Committed with further modernizations, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179421 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/179421: commit references a PR
Date: Fri, 28 Feb 2014 21:11:18 +0000 (UTC)

 Author: rene
 Date: Fri Feb 28 21:11:09 2014
 New Revision: 346577
 URL: http://svnweb.freebsd.org/changeset/ports/346577
 QAT: https://qat.redports.org/buildarchive/r346577/
 
 Log:
   From PR submitter:
   - Update to 0.8.D.3 (latest stable)
   - Fix build on amd64 regarding zlib
   - Add options to select devices to emulate
   
   From myself:
   - Convert to option helpers
   - Stage support
   - Fix build on FreeBSD 10
   
   PR:		ports/179421
   Submitted by:	"Green Dog"
   Approved by:	maintainer timeout (acm, 8 months 3 weeks)
 
 Added:
   head/emulators/mednafen/files/patch-src__file.cpp   (contents, props changed)
   head/emulators/mednafen/files/patch-src__pcfx__pcfx.cpp   (contents, props changed)
 Modified:
   head/emulators/mednafen/Makefile
   head/emulators/mednafen/distinfo
   head/emulators/mednafen/pkg-descr
 
 Modified: head/emulators/mednafen/Makefile
 ==============================================================================
 --- head/emulators/mednafen/Makefile	Fri Feb 28 20:59:39 2014	(r346576)
 +++ head/emulators/mednafen/Makefile	Fri Feb 28 21:11:09 2014	(r346577)
 @@ -1,8 +1,7 @@
  # $FreeBSD$
  
  PORTNAME=	mednafen
 -PORTVERSION=	0.8.B
 -PORTREVISION=	8
 +PORTVERSION=	0.8.D.3
  PORTEPOCH=	1
  CATEGORIES=	emulators games
  MASTER_SITES=	SF/${PORTNAME}/Mednafen/${PORTVERSION}
 @@ -10,54 +9,71 @@ MASTER_SITES=	SF/${PORTNAME}/Mednafen/${
  MAINTAINER=	acm@FreeBSD.org
  COMMENT=	Portable multi-system emulator
  
 -LIB_DEPENDS=	cdio.13:${PORTSDIR}/sysutils/libcdio \
 -		sndfile.1:${PORTSDIR}/audio/libsndfile \
 -		vorbis.4:${PORTSDIR}/audio/libvorbis
 -
 -BROKEN=		Does not build
 -DEPRECATED=	Broken for more than 6 month
 -EXPIRATION_DATE=	2014-02-27
 +LICENSE=	GPLv2
 +
 +LIB_DEPENDS=	libcdio.so:${PORTSDIR}/sysutils/libcdio \
 +		libsndfile.so:${PORTSDIR}/audio/libsndfile \
 +		libvorbis.so:${PORTSDIR}/audio/libvorbis
  
 -MAKE_JOBS_UNSAFE=	yes
 -USES=		gmake
  USE_BZIP2=	yes
  GNU_CONFIGURE=	yes
  USE_SDL=	sdl net
 -USE_XORG=	x11
 -USE_GL=		glut
 +USE_GL=		gl glu
  CPPFLAGS+=	-I${LOCALBASE}/include
 -LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD}
 +LDFLAGS+=	-L${LOCALBASE}/lib
  WRKSRC=	${WRKDIR}/${PORTNAME}
  SUB_FILES=	pkg-message
  
 -OPTIONS_DEFINE=	NLS DOCS
 +CONFIGURE_ARGS+=--disable-alsa --disable-alsatest \
 +		--with-sdl-prefix=${LOCALBASE}
 +
 +USES=		iconv pkgconfig:build
  
 -NO_STAGE=	yes
 -.include <bsd.port.options.mk>
 +OPTIONS_DEFINE=	NLS DOCS JACK
 +OPTIONS_MULTI=	EMU
 +OPTIONS_MULTI_EMU=	GB GBA LINX NES NGP PCE PCFX SMS SWAN
 +OPTIONS_DEFAULT=	GB GBA LINX NES NGP PCE PCFX SMS SWAN
 +
 +GB_DESC=	build with GameBoy emulation
 +GBA_DESC=	build with GameBoy Advance emulation
 +LINX_DESC=	build with Atari Lynx emulation
 +NES_DESC=	build with Nintendo Entertainment System emulation
 +NGP_DESC=	build with Neo Geo Pocket emulation
 +PCE_DESC=	build with PC Engine (TurboGrafx 16) emulation
 +PCFX_DESC=	build with PC-FX emulation
 +SMS_DESC=	build with SMS+GG emulation
 +SWAN_DESC=	build with WonderSWan emulation
 +JACK_DESC=	support the JACK audio API
 +
 +OPTIONS_SUB=	yes
 +
 +NLS_USES=	gettext
 +NLS_CONFIGURE_ENABLE=nls
 +
 +JACK_LIB_DEPENDS=libjack.so:${PORTSDIR}/audio/jack
 +JACK_CONFIGURE_ENABLE=jack
 +
 +GB_CONFIGURE_ENABLE=gb
 +GBA_CONFIGURE_ENABLE=gba
 +LINX_CONFIGURE_ENABLE=lynx
 +NES_CONFIGURE_ENABLE=nes
 +NGP_CONFIGURE_ENABLE=ngp
 +PCE_CONFIGURE_ENABLE=pce
 +PCFX_CONFIGURE_ENABLE=pcfx
 +SMS_CONFIGURE_ENABLE=sms
 +SWAN_CONFIGURE_ENABLE=wswan
  
 -.if ${PORT_OPTIONS:MNLS}
 -USES+=	gettext
 -PLIST_SUB+=	NLS=""
 -FLAG_NLS=	true
 -.else
 -CONFIGURE_ARGS+=	--disable-nls
 -PLIST_SUB+=	NLS="@comment "
 -.endif
 -
 -.if ${ARCH}==sparc64
 -BROKEN=		does not compile on ${ARCH} due to internal compiler error
 -.endif
 +BROKEN_sparc64=	does not compile due to internal compiler error
  
  pre-configure:
 -	@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|g' -e \
 -		's|/usr/local|${LOCALBASE}|g' -e 's|/usr/X11R6|${LOCALBASE}|g' \
 -			${WRKSRC}/configure
 +	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
 +		-e 's|/usr/X11R6|${LOCALBASE}|g' \
 +		${WRKSRC}/configure
 +	@${REINPLACE_CMD} -e 's|NetBSD|FreeBSD|' \
 +		${WRKSRC}/include/trio/triodef.h
  
  post-install:
 -.if ${PORT_OPTIONS:MDOCS}
 -	@${MKDIR} ${DOCSDIR}
 -	@${INSTALL_DATA} ${WRKSRC}/Documentation/mednafen.html ${DOCSDIR}
 -.endif
 -	@${CAT} ${PKGMESSAGE}
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 +	@${INSTALL_DATA} ${WRKSRC}/Documentation/mednafen.html ${STAGEDIR}${DOCSDIR}
  
  .include <bsd.port.mk>
 
 Modified: head/emulators/mednafen/distinfo
 ==============================================================================
 --- head/emulators/mednafen/distinfo	Fri Feb 28 20:59:39 2014	(r346576)
 +++ head/emulators/mednafen/distinfo	Fri Feb 28 21:11:09 2014	(r346577)
 @@ -1,2 +1,2 @@
 -SHA256 (mednafen-0.8.B.tar.bz2) = d7f5122ddab321f971833733f20858e2300693b1b489cc78f06aa7fd08f0b892
 -SIZE (mednafen-0.8.B.tar.bz2) = 2414246
 +SHA256 (mednafen-0.8.D.3.tar.bz2) = d678178f0dc03c89c7a0c83bf0c721af406ee53dfa79295432ab13722ed0eea2
 +SIZE (mednafen-0.8.D.3.tar.bz2) = 2442705
 
 Added: head/emulators/mednafen/files/patch-src__file.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/emulators/mednafen/files/patch-src__file.cpp	Fri Feb 28 21:11:09 2014	(r346577)
 @@ -0,0 +1,29 @@
 +--- src/file.cpp.orig	2009-05-15 06:12:55.000000000 +0400
 ++++ src/file.cpp	2013-06-07 18:52:21.000000000 +0400
 +@@ -229,7 +229,7 @@
 +    goto doret;
 +   }
 + 
 +-  while((howmany = gzread(tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
 ++  while((howmany = gzread((gzFile)tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
 +   {
 +    cur_size += howmany;
 +    cur_alloced <<= 1;
 +@@ -282,7 +282,7 @@
 +  }
 +  else if(type == MDFN_FILETYPE_GZIP)
 +  {
 +-  gzclose(tz);
 ++  gzclose((gzFile)tz);
 +  }
 +  else if(type == MDFN_FILETYPE_ZIP)
 +  {
 +@@ -444,7 +444,7 @@
 + 
 +    if(!(fceufp = MakeMemWrap(t, 1)))
 +    {
 +-    gzclose(t);
 ++    gzclose((gzFile)t);
 +     return(0);
 +    }
 + 
 
 Added: head/emulators/mednafen/files/patch-src__pcfx__pcfx.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/emulators/mednafen/files/patch-src__pcfx__pcfx.cpp	Fri Feb 28 21:11:09 2014	(r346577)
 @@ -0,0 +1,10 @@
 +--- src/pcfx/pcfx.cpp.orig	2009-12-24 11:03:43.000000000 +0100
 ++++ src/pcfx/pcfx.cpp	2014-02-28 21:38:56.000000000 +0100
 +@@ -35,6 +35,7 @@
 + #include <errno.h>
 + #include <string.h>
 + #include <math.h>
 ++#include <unistd.h>
 + 
 + #ifdef WANT_PCFX_MMAP
 + #include <sys/mman.h>
 
 Modified: head/emulators/mednafen/pkg-descr
 ==============================================================================
 --- head/emulators/mednafen/pkg-descr	Fri Feb 28 20:59:39 2014	(r346576)
 +++ head/emulators/mednafen/pkg-descr	Fri Feb 28 21:11:09 2014	(r346577)
 @@ -13,4 +13,4 @@ a joystick is preferred over a keyboard 
  slightly less latency, although the latency differences may not be perceptible
  to most people.
  
 -WWW:	http://mednafen.sf.net/
 +WWW: http://mednafen.sf.net/
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
