git: bc3622e6e5fc - main - games/powder-toy: remove bogus patches and fix icons

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Mon, 16 Jan 2023 16:31:09 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bc3622e6e5fcb85a279ba4310866e490b7ec4b0c

commit bc3622e6e5fcb85a279ba4310866e490b7ec4b0c
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2023-01-16 15:23:56 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2023-01-16 16:31:02 +0000

    games/powder-toy: remove bogus patches and fix icons
---
 games/powder-toy/Makefile                                    | 12 +++++++-----
 .../powder-toy/files/patch-resources_powder.template.desktop |  8 ++++++++
 games/powder-toy/files_/patch-resources_powder.appdata.xml   | 11 -----------
 games/powder-toy/files_/patch-resources_powder.desktop       | 12 ------------
 games/powder-toy/pkg-plist                                   |  2 +-
 5 files changed, 16 insertions(+), 29 deletions(-)

diff --git a/games/powder-toy/Makefile b/games/powder-toy/Makefile
index f4e344329676..2bad8d6cf2ef 100644
--- a/games/powder-toy/Makefile
+++ b/games/powder-toy/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	powder-toy
 DISTVERSIONPREFIX=	v
 DISTVERSION=	97.0.352
+PORTREVISION=	1
 CATEGORIES=	games
 
 MAINTAINER=	amdmi3@FreeBSD.org
@@ -43,13 +44,14 @@ do-install:
 	${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 32 48 256
+.for s in 16 24 32 48 256
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps
-	${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe${${s} == 256:?:_${s}}.png \
-		${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/powder-toy.png
 .endfor
-	${INSTALL_DATA} ${WRKSRC}/resources/generated_icons/icon_exe_32.png \
-		${STAGEDIR}${PREFIX}/share/pixmaps/powder-toy.png
+	${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}
diff --git a/games/powder-toy/files/patch-resources_powder.template.desktop b/games/powder-toy/files/patch-resources_powder.template.desktop
new file mode 100644
index 000000000000..e60b76b7e182
--- /dev/null
+++ b/games/powder-toy/files/patch-resources_powder.template.desktop
@@ -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@
diff --git a/games/powder-toy/files_/patch-resources_powder.appdata.xml b/games/powder-toy/files_/patch-resources_powder.appdata.xml
deleted file mode 100644
index b6bc4e2b6685..000000000000
--- a/games/powder-toy/files_/patch-resources_powder.appdata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
---- resources/powder.appdata.xml.orig	2020-02-27 03:38:53 UTC
-+++ resources/powder.appdata.xml
-@@ -8,7 +8,7 @@
-   <content_rating type="oars-1.1">
-     <content_attribute id="social-chat">moderate</content_attribute>
-   </content_rating>
--  <launchable type="desktop-id">powder.desktop</launchable>
-+  <launchable type="desktop-id">powder-toy.desktop</launchable>
-   <description>
-     <p>
-       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!
diff --git a/games/powder-toy/files_/patch-resources_powder.desktop b/games/powder-toy/files_/patch-resources_powder.desktop
deleted file mode 100644
index eecd45588cbf..000000000000
--- a/games/powder-toy/files_/patch-resources_powder.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
---- resources/powder.desktop.orig	2019-02-17 19:08:04 UTC
-+++ 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/pkg-plist b/games/powder-toy/pkg-plist
index 46bab49ed0f4..c44befb1ae41 100644
--- a/games/powder-toy/pkg-plist
+++ b/games/powder-toy/pkg-plist
@@ -2,7 +2,7 @@ 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
-share/pixmaps/powder-toy.png