summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-04-13 12:08:04 +0000
committernia <nia@pkgsrc.org>2019-04-13 12:08:04 +0000
commit5f2bdb9502edafdbd9a47a839e437ff01f41fb20 (patch)
tree5c9e3def47be1e05dcfcd13ec8506c9fda099890 /games
parentf3ab9fc410a3010bdd336d69105eba94b0a663d8 (diff)
downloadpkgsrc-5f2bdb9502edafdbd9a47a839e437ff01f41fb20.tar.gz
games/powder-toy: Add version 74.1
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.
Diffstat (limited to 'games')
-rw-r--r--games/Makefile3
-rw-r--r--games/powder-toy/DESCR5
-rw-r--r--games/powder-toy/Makefile63
-rw-r--r--games/powder-toy/PLIST12
-rw-r--r--games/powder-toy/distinfo10
-rw-r--r--games/powder-toy/options.mk42
-rw-r--r--games/powder-toy/patches/patch-SConscript78
-rw-r--r--games/powder-toy/patches/patch-resources_powder.appdata.xml14
-rw-r--r--games/powder-toy/patches/patch-resources_powder.desktop16
-rw-r--r--games/powder-toy/patches/patch-src_Config.h15
10 files changed, 257 insertions, 1 deletions
diff --git a/games/Makefile b/games/Makefile
index 442c8475a8f..98748a2dfc3 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.424 2019/04/11 20:56:34 nia Exp $
+# $NetBSD: Makefile,v 1.425 2019/04/13 12:08:04 nia Exp $
#
COMMENT= Games
@@ -283,6 +283,7 @@ SUBDIR+= plib
SUBDIR+= pmars
SUBDIR+= polyglot
SUBDIR+= powder
+SUBDIR+= powder-toy
SUBDIR+= powermanga
SUBDIR+= powwow
SUBDIR+= prboom
diff --git a/games/powder-toy/DESCR b/games/powder-toy/DESCR
new file mode 100644
index 00000000000..8dafee1fa37
--- /dev/null
+++ b/games/powder-toy/DESCR
@@ -0,0 +1,5 @@
+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.
diff --git a/games/powder-toy/Makefile b/games/powder-toy/Makefile
new file mode 100644
index 00000000000..6d5ae1ec42c
--- /dev/null
+++ b/games/powder-toy/Makefile
@@ -0,0 +1,63 @@
+# $NetBSD: Makefile,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+DISTNAME= powder-toy-94.1
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=ThePowderToy/}
+GITHUB_PROJECT= The-Powder-Toy
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= nia@NetBSD.org
+HOMEPAGE= https://powdertoy.co.uk/
+COMMENT= Desktop version of the 'falling sand' physics sandbox
+LICENSE= gnu-gpl-v3
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++11
+
+SCONS_ARGS+= ${_MAKE_JOBS}
+SCONS_ARGS+= --output=powder-toy
+
+CXXFLAGS+= -DNO_INSTALL_CHECK
+
+INSTALLATION_DIRS+= bin
+INSTALLATION_DIRS+= libexec
+INSTALLATION_DIRS+= share/appdata
+INSTALLATION_DIRS+= share/applications
+INSTALLATION_DIRS+= share/doc/powder-toy
+.for size in 16 24 32 48 128 256
+INSTALLATION_DIRS+= share/icons/hicolor/${size}x${size}/apps
+.endfor
+
+.include "options.mk"
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
+ CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
+ LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q}
+ ${SED} -e 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/powder-toy.sh.in > \
+ ${WRKDIR}/powder-toy.sh
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/README.md \
+ ${DESTDIR}${PREFIX}/share/doc/powder-toy
+ ${INSTALL_DATA} ${WRKSRC}/resources/powder.desktop \
+ ${DESTDIR}${PREFIX}/share/applications/powder-toy.desktop
+ ${INSTALL_DATA} ${WRKSRC}/resources/powder.appdata.xml \
+ ${DESTDIR}${PREFIX}/share/appdata/powder-toy.appdata.xml
+ ${INSTALL_SCRIPT} ${WRKDIR}/powder-toy.sh \
+ ${DESTDIR}${PREFIX}/bin/powder-toy
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/powder-toy \
+ ${DESTDIR}${PREFIX}/libexec
+.for size in 16 24 32 48 128 256
+ ${INSTALL_DATA} ${WRKSRC}/resources/icon/powder-${size}.png \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps/powder-toy.png
+.endfor
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/scons/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/powder-toy/PLIST b/games/powder-toy/PLIST
new file mode 100644
index 00000000000..79304037585
--- /dev/null
+++ b/games/powder-toy/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2019/04/13 12:08:04 nia Exp $
+bin/powder-toy
+libexec/powder-toy
+share/appdata/powder-toy.appdata.xml
+share/applications/powder-toy.desktop
+share/doc/powder-toy/README.md
+share/icons/hicolor/128x128/apps/powder-toy.png
+share/icons/hicolor/16x16/apps/powder-toy.png
+share/icons/hicolor/24x24/apps/powder-toy.png
+share/icons/hicolor/256x256/apps/powder-toy.png
+share/icons/hicolor/32x32/apps/powder-toy.png
+share/icons/hicolor/48x48/apps/powder-toy.png
diff --git a/games/powder-toy/distinfo b/games/powder-toy/distinfo
new file mode 100644
index 00000000000..5ed8b3bba4c
--- /dev/null
+++ b/games/powder-toy/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+SHA1 (powder-toy-94.1.tar.gz) = 14249c100e38971444bb96fd31ff26fd24cc2190
+RMD160 (powder-toy-94.1.tar.gz) = 88671b2007f2f1a2ecc3a079cc961d3475742f56
+SHA512 (powder-toy-94.1.tar.gz) = ecda20d206298ff605a3a361255a0766caceece4d268355e4dbf1d56ef78bd7c43e54560d1ad71f29a8c3572d66eca875d5539e1006b260e029561ab91bf34d4
+Size (powder-toy-94.1.tar.gz) = 1254309 bytes
+SHA1 (patch-SConscript) = e1b11abaf9100b2a509cefbfa713baf3c11a2c5a
+SHA1 (patch-resources_powder.appdata.xml) = e687b33b50c286ec2858bdf2024e201df4b8be8e
+SHA1 (patch-resources_powder.desktop) = 9c77feb557afbd2e5ad4fb0b5f15be1809214555
+SHA1 (patch-src_Config.h) = 01d9cced7a87b6f33b1974bf51dd9d93949d41a2
diff --git a/games/powder-toy/options.mk b/games/powder-toy/options.mk
new file mode 100644
index 00000000000..4e3d92e227e
--- /dev/null
+++ b/games/powder-toy/options.mk
@@ -0,0 +1,42 @@
+# $NetBSD: options.mk,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.powder-toy
+PKG_SUPPORTED_OPTIONS= debug fftw lua
+PKG_SUGGESTED_OPTIONS= fftw lua
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+PKG_SUPPORTED_OPTIONS+= simd
+.endif
+
+.if ${MACHINE_ARCH} == "x86_64"
+PKG_SUGGESTED_OPTIONS+= simd
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdebug)
+SCONS_ARGS+= --debugging
+.else
+SCONS_ARGS+= --release
+.endif
+
+.if !empty(PKG_OPTIONS:Mfftw)
+.include "../../math/fftwf/buildlink3.mk"
+.else
+SCONS_ARGS+= --nofft
+.endif
+
+.if !empty(PKG_OPTIONS:Mlua)
+.include "../../lang/lua51/buildlink3.mk"
+.else
+SCONS_ARGS+= --nolua
+.endif
+
+.if !empty(PKG_OPTIONS:Msimd)
+SCONS_ARGS+= --sse
+SCONS_ARGS+= --sse2
+.else
+SCONS_ARGS+= --no-sse
+.endif
diff --git a/games/powder-toy/patches/patch-SConscript b/games/powder-toy/patches/patch-SConscript
new file mode 100644
index 00000000000..41b9c140572
--- /dev/null
+++ b/games/powder-toy/patches/patch-SConscript
@@ -0,0 +1,78 @@
+$NetBSD: patch-SConscript,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+Support NetBSD.
+
+--- SConscript.orig 2019-02-21 05:23:45.000000000 +0000
++++ SConscript
+@@ -88,7 +88,7 @@ elif GetOption('lin'):
+ platform = "Linux"
+ elif GetOption('mac'):
+ platform = "Darwin"
+-elif compilePlatform not in ["Linux", "Windows", "Darwin", "FreeBSD"]:
++elif compilePlatform not in ["Linux", "Windows", "Darwin", "FreeBSD", "NetBSD"]:
+ FatalError("Unknown platform: {0}".format(platform))
+
+ msvc = GetOption('msvc')
+@@ -243,11 +243,11 @@ def findLibs(env, conf):
+ FatalError("libSDL2main not found or not installed")
+
+ #Look for SDL
+- runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD"
++ runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD" or platform == "NetBSD"
+ #if platform == "Darwin" and conf.CheckFramework("SDL"):
+ # runSdlConfig = False
+- if not conf.CheckLib("SDL2"):
+- FatalError("SDL2 development library not found or not installed")
++ #if not conf.CheckLib("SDL2"):
++ # FatalError("SDL2 development library not found or not installed")
+
+ if runSdlConfig:
+ try:
+@@ -267,10 +267,7 @@ def findLibs(env, conf):
+
+ if not GetOption('nolua') and not GetOption('renderer') and not GetOption('font'):
+ #Look for Lua
+- if platform == "FreeBSD":
+- luaver = "lua-5.1"
+- else:
+- luaver = "lua5.1"
++ luaver = "lua-5.1"
+ if GetOption('luajit'):
+ if not conf.CheckLib(['luajit-5.1', 'luajit5.1', 'luajit2.0', 'luajit', 'libluajit']):
+ FatalError("luajit development library not found or not installed")
+@@ -289,7 +286,7 @@ def findLibs(env, conf):
+ if platform != "Darwin" or not conf.CheckFramework("Lua"):
+ FatalError("lua5.1 development library not found or not installed")
+ foundpkg = False
+- if platform == "Linux" or platform == "FreeBSD":
++ if platform == "Linux" or platform == "FreeBSD" or platform == "NetBSD":
+ try:
+ env.ParseConfig("pkg-config --cflags {0}".format(luaver))
+ env.ParseConfig("pkg-config --libs {0}".format(luaver))
+@@ -346,7 +343,7 @@ def findLibs(env, conf):
+
+ #Look for OpenGL libraries
+ if GetOption('opengl'):
+- if platform == "Linux" or platform == "FreeBSD":
++ if platform == "Linux" or platform == "FreeBSD" or platform == "NetBSD":
+ if not conf.CheckLib('GL'):
+ FatalError("libGL not found or not installed")
+ try:
+@@ -363,7 +360,7 @@ def findLibs(env, conf):
+ if not conf.CheckFramework("OpenGL"):
+ FatalError("OpenGL framework not found or not installed")
+
+- if platform == "Linux" or platform == "FreeBSD":
++ if platform == "Linux" or platform == "FreeBSD" or platform == "NetBSD":
+ if not conf.CheckLib('X11'):
+ FatalError("X11 development library not found or not installed")
+
+@@ -418,7 +415,7 @@ if platform == "Windows":
+ env.Append(LINKFLAGS=['/NODEFAULTLIB:msvcrtd.lib'])
+ else:
+ env.Append(LINKFLAGS=['-mwindows'])
+-elif platform == "Linux" or platform == "FreeBSD":
++elif platform == "Linux" or platform == "FreeBSD" or platform == "NetBSD":
+ env.Append(CPPDEFINES=['LIN'])
+ elif platform == "Darwin":
+ env.Append(CPPDEFINES=['MACOSX'])
diff --git a/games/powder-toy/patches/patch-resources_powder.appdata.xml b/games/powder-toy/patches/patch-resources_powder.appdata.xml
new file mode 100644
index 00000000000..5cf4a29a036
--- /dev/null
+++ b/games/powder-toy/patches/patch-resources_powder.appdata.xml
@@ -0,0 +1,14 @@
+$NetBSD: patch-resources_powder.appdata.xml,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+Rename application to powder-toy.
+
+--- resources/powder.appdata.xml.orig 2019-02-21 05:23:45.000000000 +0000
++++ resources/powder.appdata.xml
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <component type="desktop">
+- <id>powder.desktop</id>
++ <id>powder-toy.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-3.0</project_license>
+ <name>Powder Toy</name>
diff --git a/games/powder-toy/patches/patch-resources_powder.desktop b/games/powder-toy/patches/patch-resources_powder.desktop
new file mode 100644
index 00000000000..f3e935d034e
--- /dev/null
+++ b/games/powder-toy/patches/patch-resources_powder.desktop
@@ -0,0 +1,16 @@
+$NetBSD: patch-resources_powder.desktop,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+Rename application to powder-toy.
+
+--- resources/powder.desktop.orig 2019-02-21 05:23:45.000000000 +0000
++++ resources/powder.desktop
+@@ -3,7 +3,7 @@ Version=1.0
+ Encoding=UTF-8
+ Name=Powder Toy
+ Comment=Physics sandbox game
+-Exec=powder
+-Icon=powder
++Exec=powder-toy
++Icon=powder-toy
+ Type=Application
+ Categories=Game;Simulation;
diff --git a/games/powder-toy/patches/patch-src_Config.h b/games/powder-toy/patches/patch-src_Config.h
new file mode 100644
index 00000000000..4e8394afaa8
--- /dev/null
+++ b/games/powder-toy/patches/patch-src_Config.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Config.h,v 1.1 2019/04/13 12:08:04 nia Exp $
+
+Disable auto-updater.
+
+--- src/Config.h.orig 2019-02-21 05:23:45.000000000 +0000
++++ src/Config.h
+@@ -40,7 +40,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