Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2014 23:54:39 +0000 (UTC)
From:      Gerald Pfeifer <gerald@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r347544 - in head/emulators/fceux: . files
Message-ID:  <201403082354.s28Nsdjn022932@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gerald
Date: Sat Mar  8 23:54:39 2014
New Revision: 347544
URL: http://svnweb.freebsd.org/changeset/ports/347544
QAT: https://qat.redports.org/buildarchive/r347544/

Log:
  Update to version 2.2.2 of fceux plus
  - convert to staging;
  - simplify MASTER_SITES;
  - leverage USES more;
  - remove all *.dll *.chm as we don't need those;
  - replace including <bsd.port.pre.mk> and <bsd.port.post.mk>;
  - simplify scons related patch.
  
  PR:		185251
  Submitted by:	chris petrik <c.petrik.sosa@gmail.com>

Added:
  head/emulators/fceux/files/patch-src-lua-engine   (contents, props changed)
Modified:
  head/emulators/fceux/Makefile
  head/emulators/fceux/distinfo
  head/emulators/fceux/files/patch-SConstruct
  head/emulators/fceux/pkg-plist

Modified: head/emulators/fceux/Makefile
==============================================================================
--- head/emulators/fceux/Makefile	Sat Mar  8 23:35:13 2014	(r347543)
+++ head/emulators/fceux/Makefile	Sat Mar  8 23:54:39 2014	(r347544)
@@ -2,31 +2,28 @@
 # $FreeBSD$
 
 PORTNAME=	fceux
-PORTVERSION=	2.2.1.1
-PORTREVISION=	2
+PORTVERSION=	2.2.2
 CATEGORIES=	emulators
-MASTER_SITES=	SF/fceultra/Source%20Code/${PORTVERSION:R}%20src/
+MASTER_SITES=	SF/fceultra/Source%20Code/${PORTVERSION}%20src/
 DISTNAME=	${PORTNAME}-${PORTVERSION}.src
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Portable NES/Famicom emulator based on Bero's original FCE
 
-USES=		pkgconfig
-USE_SCONS=	yes
+LICENSE=	GPLv2
+
+USES=		dos2unix pkgconfig scons
 SCONS_BUILDENV=	CC="${CC}" CXX="${CXX}" \
 		CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
 		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
-SCONS_ARGS+=	--prefix="${PREFIX}"
-USE_SDL=	sdl
-USE_DOS2UNIX=	yes
+SCONS_ARGS+=	--prefix="${STAGEDIR}${PREFIX}"
+USE_SDL=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 RUN_DEPENDS+=	zenity:${PORTSDIR}/x11/zenity
 
-MAN6=		fceux.6 fceux-net-server.6
-
 OPTIONS_DEFINE=	FRAMESKIP OPENGL DEBUG LUA CREATE_AVI LOGO
 OPTIONS_SINGLE=	GUI
 OPTIONS_SINGLE_GUI=	GTK2 GTK3
@@ -39,7 +36,6 @@ LOGO_DESC=		Enable a logoscreen when cre
 GTK2_DESC=		Enable GTK2 GUI (SDL)
 GTK3_DESC=		Enable GTK3 GUI (SDL)
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MFRAMESKIP}
@@ -95,8 +91,6 @@ SCONS_ARGS+=	DEBUG=1
 SCONS_ARGS+=	DEBUG=0
 .endif
 
-.include <bsd.port.pre.mk>
-
 # Go find a better compiler, base cc does not support mm3dnow.h,
 # breaking the build:
 #
@@ -115,23 +109,39 @@ USE_GCC=	yes
 .endif
 .endif
 
+post-extract:
+	@${RM} ${WRKSRC}/output/*.dll ${WRKSRC}/output/*.chm
+
 post-patch:
-	${REINPLACE_CMD} -e 's|%%PKGCONFIG%%|${LOCALBASE}/bin/pkg-config|g' \
+	${REINPLACE_CMD} -e 's|pkg-config|%%PKGCONFIG%%|g' \
+		${WRKSRC}/SConstruct
+	${REINPLACE_CMD} -e 's|sdl-config|%%SDLCONFIG%%|g' \
+		${WRKSRC}/SConstruct
+	${REINPLACE_CMD} -e 's|%%PKGCONFIG%%|${LOCALBASE}/bin/pkgconf|g' \
 		-e 's|%%SDLCONFIG%%|${LOCALBASE}/bin/sdl-config|g' \
 		${WRKSRC}/SConstruct
 	${REINPLACE_CMD} -e 's|usr|usr/local|g' ${WRKSRC}/fceux.desktop
+	${REINPLACE_CMD} -e '107 s|Exit(1)|#Exit(1)|g' \
+		${WRKSRC}/SConstruct
+	${REINPLACE_CMD} -e '194 s|/usr/local|${STAGEDIR}${PREFIX}|g' \
+		${WRKSRC}/SConstruct
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for file in TODO-PROJECT Videolog.txt cheat.html faq fcs.txt fm2.txt protocol.txt snes9x-lua.html
-	@${CP} ${WRKSRC}/documentation/${file} ${DOCSDIR}
+	@${CP} ${WRKSRC}/documentation/${file} ${STAGEDIR}${DOCSDIR}
 .endfor
-	@${MV} ${WRKSRC}/documentation/tech ${DOCSDIR}
+	@${MV} ${WRKSRC}/documentation/tech ${STAGEDIR}${DOCSDIR}
 .endif
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
 	${INSTALL_DATA} ${WRKSRC}/fceux.desktop \
-		${PREFIX}/share/applications/fceux.desktop
+		${STAGEDIR}${PREFIX}/share/applications/fceux.desktop
 	@${INSTALL_DATA} ${WRKSRC}/fceux.png \
-		${PREFIX}/share/pixmaps/fceux.png
+		${STAGEDIR}${PREFIX}/share/pixmaps/fceux.png
+	@${INSTALL_MAN} ${WRKSRC}/documentation/fceux-net-server.6 \
+		${STAGEDIR}${MAN6PREFIX}/man/man6
+	@${INSTALL_MAN} ${WRKSRC}/documentation/fceux.6 \
+		${STAGEDIR}${MAN6PREFIX}/man/man6
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/emulators/fceux/distinfo
==============================================================================
--- head/emulators/fceux/distinfo	Sat Mar  8 23:35:13 2014	(r347543)
+++ head/emulators/fceux/distinfo	Sat Mar  8 23:54:39 2014	(r347544)
@@ -1,2 +1,2 @@
-SHA256 (fceux-2.2.1.1.src.tar.gz) = afb0b3b8e1d2eea40c59777ef538b69b16164ae53c406106e541099534db828c
-SIZE (fceux-2.2.1.1.src.tar.gz) = 8878420
+SHA256 (fceux-2.2.2.src.tar.gz) = 804d11bdb4a195f3a580ce5d2d01be877582763378637e16186a22459f5fe5e1
+SIZE (fceux-2.2.2.src.tar.gz) = 9249858

Modified: head/emulators/fceux/files/patch-SConstruct
==============================================================================
--- head/emulators/fceux/files/patch-SConstruct	Sat Mar  8 23:35:13 2014	(r347543)
+++ head/emulators/fceux/files/patch-SConstruct	Sat Mar  8 23:54:39 2014	(r347544)
@@ -1,51 +1,6 @@
---- SConstruct.bak	2013-03-24 08:54:38.000000000 +0000
-+++ SConstruct	2013-03-24 09:04:53.000000000 +0000
-@@ -17,7 +17,7 @@
-   BoolVariable('FRAMESKIP', 'Enable frameskipping', 1),
-   BoolVariable('OPENGL',    'Enable OpenGL support', 1),
-   BoolVariable('LSB_FIRST', 'Least signficant byte first (non-PPC)', 1),
--  BoolVariable('DEBUG',     'Build with debugging symbols', 1),
-+  BoolVariable('DEBUG',     'Build with debugging symbols', 0),
-   BoolVariable('LUA',       'Enable Lua support', 1),
-   BoolVariable('SYSTEM_LUA','Use system lua instead of static lua provided with fceux', 1),
-   BoolVariable('SYSTEM_MINIZIP', 'Use system minizip instead of static minizip provided with fceux', 0),
-@@ -35,8 +35,8 @@
- env = Environment(options = opts)
- 
- #### Uncomment this for a public release ###
--env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
--env['DEBUG'] = 0
-+#env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
-+#env['DEBUG'] = 0
- ############################################
- 
- # LSB_FIRST must be off for PPC to compile
-@@ -101,13 +101,13 @@
-     if not conf.CheckLib('SDL'):
-       print 'Did not find libSDL or SDL.lib, exiting!'
-       Exit(1)
--    env.ParseConfig('sdl-config --cflags --libs')
-+    env.ParseConfig('%%SDLCONFIG%% --cflags --libs')
-   if env['GTK']:
-     if not conf.CheckLib('gtk-x11-2.0'):
-       print 'Could not find libgtk-2.0, exiting!'
-       Exit(1)
-     # Add compiler and linker flags from pkg-config
--    config_string = 'pkg-config --cflags --libs gtk+-2.0'
-+    config_string = '%%PKGCONFIG%% --cflags --libs gtk+-2.0'
-     if env['PLATFORM'] == 'darwin':
-       config_string = 'PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ ' + config_string
-     env.ParseConfig(config_string)
-@@ -115,7 +115,7 @@
-     env.Append(CCFLAGS = ["-D_GTK"])
-   if env['GTK3']:
-     # Add compiler and linker flags from pkg-config
--    config_string = 'pkg-config --cflags --libs gtk+-3.0'
-+    config_string = '%%PKGCONFIG%% --cflags --libs gtk+-3.0'
-     if env['PLATFORM'] == 'darwin':
-       config_string = 'PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ ' + config_string
-     env.ParseConfig(config_string)
-@@ -134,11 +134,11 @@
+--- SConstruct.bak	2013-12-28 05:22:18.356797171 -0600
++++ SConstruct	2013-12-28 05:23:52.750132324 -0600
+@@ -138,8 +138,8 @@
        # Should work on any *nix
        env.Append(CCFLAGS = ["-DLUA_USE_LINUX"])
      lua_available = False
@@ -53,37 +8,16 @@
 -      env.Append(LINKFLAGS = ["-ldl", "-llua5.1"])
 +    if conf.CheckLib('lua-5.1'):
 +      env.Append(LINKFLAGS = ["-llua-5.1"])
+       env.Append(CCFLAGS = ["-I/usr/include/lua5.1"])
        lua_available = True
      elif conf.CheckLib('lua'):
--      env.Append(LINKFLAGS = ["-ldl", "-llua"])
-+      env.Append(LINKFLAGS = ["-llua"])
-       lua_available = True
-     if lua_available == False:
-       print 'Could not find liblua, exiting!'
-@@ -156,6 +156,7 @@
-    
-   if env['OPENGL'] and conf.CheckLibWithHeader('GL', 'GL/gl.h', 'c', autoadd=1):
-     conf.env.Append(CCFLAGS = "-DOPENGL")
-+    env.ParseConfig('%%PKGCONFIG%% --cflags --libs gl')
-   conf.env.Append(CPPDEFINES = ['PSS_STYLE=1'])
-   
-   env = conf.Finish()
-@@ -173,7 +174,7 @@
-   env.Append(CPPDEFINES=["_DEBUG"], CCFLAGS = ['-g'])
- else:
-   env.Append(CCFLAGS = ['-O2'])
--
-+  env.Append(CPPDEFINES=["PUBLIC_RELEASE"])
- if env['PLATFORM'] != 'win32' and env['PLATFORM'] != 'cygwin' and env['CREATE_AVI']:
-   env.Append(CPPDEFINES=["CREATE_AVI"])
- else:
-@@ -200,18 +201,18 @@
+@@ -207,18 +207,18 @@
  auxlib_dst = 'bin/auxlib.lua'
  auxlib_inst_dst = prefix + '/share/fceux/auxlib.lua'
  
--fceux_h_src = 'src/drivers/win/help/fceux.chm'
+-fceux_h_src = 'output/fceux.chm'
 -fceux_h_dst = 'bin/fceux.chm'
-+#fceux_h_src = 'src/drivers/win/help/fceux.chm'
++#fceux_h_src = 'output/fceux.chm'
 +#fceux_h_dst = 'bin/fceux.chm'
  
 -env.Command(fceux_h_dst, fceux_h_src, [Copy(fceux_h_dst, fceux_h_src)])

Added: head/emulators/fceux/files/patch-src-lua-engine
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/fceux/files/patch-src-lua-engine	Sat Mar  8 23:54:39 2014	(r347544)
@@ -0,0 +1,15 @@
+--- src/lua-engine.cpp.bak	2013-12-28 06:09:01.096799825 -0600
++++ src/lua-engine.cpp	2013-12-28 06:10:59.276805867 -0600
+@@ -83,9 +83,9 @@
+ 
+ extern "C"
+ {
+-#include <lua.h>
+-#include <lauxlib.h>
+-#include <lualib.h>
++#include <lua51/lua.h>
++#include <lua51/lauxlib.h>
++#include <lua51/lualib.h>
+ #ifdef WIN32
+ #include <lstate.h>
+ 	int iuplua_open(lua_State * L);

Modified: head/emulators/fceux/pkg-plist
==============================================================================
--- head/emulators/fceux/pkg-plist	Sat Mar  8 23:35:13 2014	(r347543)
+++ head/emulators/fceux/pkg-plist	Sat Mar  8 23:54:39 2014	(r347544)
@@ -71,7 +71,6 @@ share/pixmaps/fceux.png
 %%DATADIR%%/palettes/FCEUX.pal
 %%DATADIR%%/palettes/nestopia_rgb.pal
 %%DATADIR%%/palettes/nestopia_yuv.pal
-%%DATADIR%%/taseditor.chm
 %%DATADIR%%/tools/taseditor_patterns.txt
 %%PORTDOCS%%%%DOCSDIR%%/TODO-PROJECT
 %%PORTDOCS%%%%DOCSDIR%%/Videolog.txt
@@ -96,6 +95,8 @@ share/pixmaps/fceux.png
 %%PORTDOCS%%%%DOCSDIR%%/tech/ppu/loopy2.txt
 %%PORTDOCS%%%%DOCSDIR%%/tech/readme.now
 %%PORTDOCS%%%%DOCSDIR%%/tech/readme.sound
+man/man6/fceux-net-server.6.gz
+man/man6/fceux.6.gz
 @dirrm %%DATADIR%%/tools
 @dirrm %%DATADIR%%/palettes
 @dirrm %%DATADIR%%/luaScripts/taseditor



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403082354.s28Nsdjn022932>