Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2017 13:49:55 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r437129 - in head/games: . powder-toy powder-toy/files
Message-ID:  <201703281349.v2SDntrH004586@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Tue Mar 28 13:49:55 2017
New Revision: 437129
URL: https://svnweb.freebsd.org/changeset/ports/437129

Log:
  Have you ever wanted to blow something up? Or maybe you always
  dreamt of operating an atomic power plant? Do you have a will to
  develop your own CPU? The Powder Toy lets you to do all of these,
  and even more!
  
  The Powder Toy is a free physics sandbox game, which simulates air
  pressure and velocity, heat, gravity and a countless number of
  interactions between different substances! The game provides you
  with various building materials, liquids, gases and electronic
  components which can be used to construct complex machines, guns,
  bombs, realistic terrains and almost anything else. You can then
  mine them and watch cool explosions, add intricate wirings, play
  with little stickmen or operate your machine. You can browse and
  play thousands of different saves made by the community or upload
  your own - we welcome your creations!
  
  WWW: http://powdertoy.co.uk/

Added:
  head/games/powder-toy/
  head/games/powder-toy/Makefile   (contents, props changed)
  head/games/powder-toy/distinfo   (contents, props changed)
  head/games/powder-toy/files/
  head/games/powder-toy/files/patch-SConscript   (contents, props changed)
  head/games/powder-toy/files/patch-src_Config.h   (contents, props changed)
  head/games/powder-toy/files/powder-toy.sh.in   (contents, props changed)
  head/games/powder-toy/pkg-descr   (contents, props changed)
  head/games/powder-toy/pkg-plist   (contents, props changed)
Modified:
  head/games/Makefile

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Tue Mar 28 13:44:41 2017	(r437128)
+++ head/games/Makefile	Tue Mar 28 13:49:55 2017	(r437129)
@@ -762,6 +762,7 @@
     SUBDIR += popstar
     SUBDIR += pouetchess
     SUBDIR += powder
+    SUBDIR += powder-toy
     SUBDIR += powermanga
     SUBDIR += powwow
     SUBDIR += ppracer

Added: head/games/powder-toy/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/Makefile	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,60 @@
+# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	powder-toy
+PORTVERSION=	91.5
+DISTVERSIONPREFIX=	v
+DISTVERSIONSUFFIX=	.330 # build number, not part of official version
+CATEGORIES=	games
+
+MAINTAINER=	amdmi3@FreeBSD.org
+COMMENT=	'Falling sand' physics sandbox with air pressure and velocity support
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libfftw3f.so:math/fftw3-float \
+		libfftw3.so:math/fftw3
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	simtr
+GH_PROJECT=	The-Powder-Toy
+
+USES=		scons localbase:ldflags lua:51
+USE_SDL=	sdl
+USE_XORG=	x11
+
+MAKE_ENV=	LINKFLAGS="${LINKFLAGS}"
+
+SUB_FILES=	${PORTNAME}.sh
+
+PORTDOCS=	README TODO
+
+DESKTOP_ENTRIES="The Powder Toy" \
+		"" \
+		"${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
+		"${PORTNAME}" \
+		"Game;Simulation;" \
+		""
+
+OPTIONS_DEFINE=		DOCS OPTIMIZED_CFLAGS SSE
+OPTIONS_DEFAULT=	OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT_amd64=	SSE
+OPTIMIZED_CFLAGS_CXXFLAGS=	-O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer
+SSE_MAKE_ARGS_OFF=	--no-sse
+
+post-patch:
+	@${REINPLACE_CMD} -e '/#include/ s|lua5.1/|lua51/|' ${WRKSRC}/src/lua/LuaCompat.h
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_PROGRAM} ${WRKSRC}/build/powder* ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
+	${INSTALL_DATA} ${WRKSRC}/resources/powder.ico ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.ico
+
+do-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for f in ${PORTDOCS}
+	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
+.endfor
+
+.include <bsd.port.mk>

Added: head/games/powder-toy/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/distinfo	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1490270691
+SHA256 (simtr-The-Powder-Toy-v91.5.330_GH0.tar.gz) = 9a7de557e771f88e823d06cc21d16f1fbbca930ce751720bc9035d00073d6635
+SIZE (simtr-The-Powder-Toy-v91.5.330_GH0.tar.gz) = 877087

Added: head/games/powder-toy/files/patch-SConscript
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/files/patch-SConscript	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,123 @@
+--- SConscript.orig	2016-07-27 02:21:28 UTC
++++ SConscript
+@@ -41,6 +41,7 @@ def AddSconsOption(name, default, hasArg
+ AddSconsOption('win', False, False, "Target Windows.")
+ AddSconsOption('lin', False, False, "Target Linux.")
+ AddSconsOption('mac', False, False, "Target Mac OS X.")
++AddSconsOption('bsd', False, False, "Target FreeBSD.")
+ AddSconsOption('msvc', False, False, "Use the Microsoft Visual Studio compiler.")
+ AddSconsOption("tool", False, True, "Tool prefix appended before gcc/g++.")
+ 
+@@ -79,7 +80,7 @@ AddSconsOption("output", False, True, "E
+ 
+ #detect platform automatically, but it can be overrided
+ tool = GetOption('tool')
+-isX86 = platform.machine() in ["AMD64", "i386", "i686", "x86", "x86_64"]
++isX86 = platform.machine() in ["amd64", "AMD64", "i386", "i686", "x86", "x86_64"]
+ platform = compilePlatform = platform.system()
+ if GetOption('win'):
+ 	platform = "Windows"
+@@ -87,7 +88,9 @@ elif GetOption('lin'):
+ 	platform = "Linux"
+ elif GetOption('mac'):
+ 	platform = "Darwin"
+-elif compilePlatform not in ["Linux", "Windows", "Darwin"]:
++elif GetOption('bsd'):
++	platform = "FreeBSD"
++elif compilePlatform not in ["Linux", "Windows", "Darwin", "FreeBSD"]:
+ 	FatalError("Unknown platform: {0}".format(platform))
+ 
+ msvc = GetOption('msvc')
+@@ -100,7 +103,7 @@ if GetOption('msvc'):
+ elif platform == "Windows" and not GetOption('msvc'):
+ 	env = Environment(tools=['mingw'], ENV={'PATH' : os.environ['PATH']})
+ else:
+-	env = Environment(tools=['default'], ENV={'PATH' : os.environ['PATH']})
++	env = Environment(tools=['default'], ENV=os.environ)
+ 
+ #attempt to automatically find cross compiler
+ if not tool and compilePlatform == "Linux" and compilePlatform != platform:
+@@ -242,7 +245,7 @@ def findLibs(env, conf):
+ 
+ 	if not GetOption('renderer'):
+ 		#Look for SDL
+-		runSdlConfig = platform == "Linux" or compilePlatform == "Linux"
++		runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD"
+ 		if platform == "Darwin" and conf.CheckFramework("SDL"):
+ 			runSdlConfig = False
+ 		elif not conf.CheckLib("SDL"):
+@@ -267,7 +270,7 @@ def findLibs(env, conf):
+ 
+ 	if not GetOption('nolua') and not GetOption('renderer'):
+ 		#Look for Lua
+-		luaver = "lua5.1"
++		luaver = "lua-51"
+ 		if GetOption('luajit'):
+ 			if not conf.CheckLib(['luajit-5.1', 'luajit5.1', 'luajit', 'libluajit']):
+ 				FatalError("luajit development library not found or not installed")
+@@ -277,13 +280,13 @@ def findLibs(env, conf):
+ 			if not conf.CheckLib(['lua5.2', 'lua-5.2', 'lua52', 'lua']):
+ 				FatalError("lua5.2 development library not found or not installed")
+ 			env.Append(CPPDEFINES=["LUA_COMPAT_ALL"])
+-			luaver = "lua5.2"
++			luaver = "lua-52"
+ 		else:
+ 			if not conf.CheckLib(['lua5.1', 'lua-5.1', 'lua51', 'lua']):
+ 				if platform != "Darwin" or not conf.CheckFramework("Lua"):
+ 					FatalError("lua5.1 development library not found or not installed")
+ 		foundpkg = False
+-		if platform == "Linux":
++		if platform == "Linux" or platform == "FreeBSD":
+ 			try:
+ 				env.ParseConfig("pkg-config --cflags {0}".format(luaver))
+ 				env.ParseConfig("pkg-config --libs {0}".format(luaver))
+@@ -297,9 +300,9 @@ def findLibs(env, conf):
+ 			if GetOption('luajit'):
+ 				foundheader = conf.CheckCHeader('luajit-2.0/lua.h')
+ 			elif GetOption('lua52'):
+-				foundheader = conf.CheckCHeader('lua5.2/lua.h')
++				foundheader = conf.CheckCHeader('lua52/lua.h')
+ 			else:
+-				foundheader = conf.CheckCHeader('lua5.1/lua.h')
++				foundheader = conf.CheckCHeader('lua51/lua.h')
+ 			if not foundheader:
+ 				if conf.CheckCHeader('lua.h'):
+ 					env.Append(CPPDEFINES=["LUA_R_INCL"])
+@@ -340,7 +343,7 @@ def findLibs(env, conf):
+ 
+ 	#Look for OpenGL libraries
+ 	if GetOption('opengl'):
+-		if platform == "Linux":
++		if platform == "Linux" or platform == "FreeBSD":
+ 			if not conf.CheckLib('GL'):
+ 				FatalError("libGL not found or not installed")
+ 			try:
+@@ -357,7 +360,7 @@ def findLibs(env, conf):
+ 			if not conf.CheckFramework("OpenGL"):
+ 				FatalError("OpenGL framework not found or not installed")
+ 
+-	if platform == "Linux":
++	if platform == "Linux" or platform == "FreeBSD":
+ 		if not conf.CheckLib('X11'):
+ 			FatalError("X11 development library not found or not installed")
+ 
+@@ -411,7 +414,7 @@ if platform == "Windows":
+ 			env.Append(LINKFLAGS=['/NODEFAULTLIB:msvcrt.lib'])
+ 	else:
+ 		env.Append(LINKFLAGS=['-mwindows'])
+-elif platform == "Linux":
++elif platform == "Linux" or platform == "FreeBSD":
+ 	env.Append(CPPDEFINES=['LIN'])
+ elif platform == "Darwin":
+ 	env.Append(CPPDEFINES=['MACOSX'])
+@@ -464,9 +467,7 @@ elif GetOption('release'):
+ 		else:
+ 			env.Append(CCFLAGS=['/MD'])
+ 	else:
+-		env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer'])
+-		if platform != "Darwin":
+-			env.Append(CCFLAGS=['-funsafe-loop-optimizations'])
++		pass
+ 
+ if GetOption('static'):
+ 	if platform == "Windows":

Added: head/games/powder-toy/files/patch-src_Config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/files/patch-src_Config.h	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,11 @@
+--- src/Config.h.orig	2016-07-27 02:21:28 UTC
++++ src/Config.h
+@@ -35,7 +35,7 @@
+ #endif
+ //VersionInfoEnd
+ 
+-//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
++#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
+ 
+ #if !(defined(MACOSX) && defined(DEBUG))
+ #define HIGH_QUALITY_RESAMPLE			//High quality image resampling, slower but much higher quality than my terribad linear interpolation

Added: head/games/powder-toy/files/powder-toy.sh.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/files/powder-toy.sh.in	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,5 @@
+#!/bin/sh -eu
+
+mkdir -p $HOME/.powdertoy
+cd $HOME/.powdertoy
+exec %%PREFIX%%/libexec/powder-toy "$@"

Added: head/games/powder-toy/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/pkg-descr	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,17 @@
+Have you ever wanted to blow something up? Or maybe you always
+dreamt of operating an atomic power plant? Do you have a will to
+develop your own CPU? The Powder Toy lets you to do all of these,
+and even more!
+
+The Powder Toy is a free physics sandbox game, which simulates air
+pressure and velocity, heat, gravity and a countless number of
+interactions between different substances! The game provides you
+with various building materials, liquids, gases and electronic
+components which can be used to construct complex machines, guns,
+bombs, realistic terrains and almost anything else. You can then
+mine them and watch cool explosions, add intricate wirings, play
+with little stickmen or operate your machine. You can browse and
+play thousands of different saves made by the community or upload
+your own - we welcome your creations!
+
+WWW: http://powdertoy.co.uk/

Added: head/games/powder-toy/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/powder-toy/pkg-plist	Tue Mar 28 13:49:55 2017	(r437129)
@@ -0,0 +1,3 @@
+bin/powder-toy
+libexec/powder-toy
+share/pixmaps/powder-toy.ico



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