games/powder-toy: add -devel counterpart, pet portlint

This commit is contained in:
Dmitry Marakasov 2023-01-30 20:13:16 +03:00
parent 93b63f8943
commit e15b84c4c4
8 changed files with 114 additions and 3 deletions

View file

@ -782,6 +782,7 @@
SUBDIR += popstar
SUBDIR += powder
SUBDIR += powder-toy
SUBDIR += powder-toy-devel
SUBDIR += powermanga
SUBDIR += powwow
SUBDIR += prboom

View file

@ -0,0 +1,64 @@
PORTNAME= powder-toy
DISTVERSION= snapshot-253
CATEGORIES= games
PKGNAMESUFFIX= -devel
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= 'Falling sand' physics sandbox with air pressure and velocity support (snapshot version)
WWW= https://powdertoy.co.uk/ \
https://github.com/The-Powder-Toy/The-Powder-Toy
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
NOT_FOR_ARCHS= i386
LIB_DEPENDS= libfftw3f.so:math/fftw3-float \
libfftw3.so:math/fftw3 \
libcurl.so:ftp/curl \
libpng.so:graphics/png \
libjsoncpp.so:devel/jsoncpp
USES= compiler:c++17-lang luajit:luajit-openresty meson pkgconfig \
python:build sdl
USE_GITHUB= yes
GH_ACCOUNT= The-Powder-Toy
GH_PROJECT= The-Powder-Toy
USE_SDL= sdl2
MESON_ARGS= -Dapp_exe="${PORTNAME}"
CONFLICTS_INSTALL=powder-toy
PORTDOCS= README.md changelog.txt
OPTIONS_DEFINE= DOCS SSE
OPTIONS_DEFAULT_amd64= SSE
SSE_DESC= Enable SSE optimizations
SSE_MESON_ON= -Dx86_sse=auto
SSE_MESON_OFF= -Dx86_sse=none
post-patch:
@${REINPLACE_CMD} -e 's|python3|${PYTHON_CMD}|' ${WRKSRC}/meson.build
do-install:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/powder-toy ${STAGEDIR}${PREFIX}/bin/
${INSTALL_DATA} ${BUILD_WRKSRC}/resources/powder.desktop ${STAGEDIR}${PREFIX}/share/applications/uk.co.powdertoy.tpt.desktop # as mentioned in appdata
@${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata
${INSTALL_DATA} ${BUILD_WRKSRC}/resources/appdata.xml ${STAGEDIR}${PREFIX}/share/appdata/powder-toy.appdata.xml
.for s in 16 24 32 48 256
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
.endfor
${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe_16.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/16x16/apps/powder-toy.png
${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe_32.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/24x24/apps/powder-toy.png # for e.g. lxpanel
${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe_32.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/32x32/apps/powder-toy.png
${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe_48.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/powder-toy.png
${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/powder-toy.png
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/
.endfor
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1675089470
SHA256 (The-Powder-Toy-The-Powder-Toy-snapshot-253_GH0.tar.gz) = ece620808c3fffbe36cbfca6b48d18f366d51ef329a9d0d5355e142552a5a0a5
SIZE (The-Powder-Toy-The-Powder-Toy-snapshot-253_GH0.tar.gz) = 733793

View file

@ -0,0 +1,11 @@
--- resources/meson.build.orig 2023-01-04 02:02:45 UTC
+++ resources/meson.build
@@ -68,7 +68,7 @@ elif host_platform == 'darwin'
output: 'Info.plist',
configuration: conf_data,
)
-elif host_platform == 'linux'
+else
data_files += to_array.process(rendered_icons['icon_exe'], extra_args: 'icon_exe_png')
data_files += to_array.process(rendered_icons['icon_cps'], extra_args: 'icon_cps_png')
data_files += to_array.process('save.xml', extra_args: 'save_xml')

View file

@ -0,0 +1,8 @@
--- resources/powder.template.desktop.orig 2023-01-04 02:02:45 UTC
+++ resources/powder.template.desktop
@@ -5,4 +5,4 @@ Comment=@APPCOMMENT@
MimeType=application/vnd.powdertoy.save;x-scheme-handler/ptsave;
Categories=Game;Simulation;
Exec=@APPEXE@ %u
-Icon=@APPVENDOR@-@APPEXE@
+Icon=@APPEXE@

View file

@ -0,0 +1,15 @@
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!

View file

@ -0,0 +1,8 @@
bin/powder-toy
share/appdata/powder-toy.appdata.xml
share/applications/uk.co.powdertoy.tpt.desktop
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

View file

@ -18,15 +18,16 @@ LIB_DEPENDS= libfftw3f.so:math/fftw3-float \
libpng.so:graphics/png \
libjsoncpp.so:devel/jsoncpp
USES= compiler:c++17-lang desktop-file-utils luajit:luajit-openresty \
meson pkgconfig python:build sdl
USE_GITHUB= yes
GH_ACCOUNT= The-Powder-Toy
GH_PROJECT= The-Powder-Toy
USES= compiler:c++17-lang luajit:luajit-openresty meson pkgconfig \
python:build sdl
USE_SDL= sdl2
MESON_ARGS= -Dapp_exe="${PORTNAME}"
CONFLICTS_INSTALL=powder-toy-devel
PORTDOCS= README.md changelog.txt
OPTIONS_DEFINE= DOCS SSE