aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-11-01 13:11:07 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-11-01 13:17:58 +0000
commitdec61bb0a1d02b46da9e9d6d293d5afad576131f (patch)
tree3d5574a21d4e8f8ffeeb206d50a973d660ccbe27
parent315a41c0b7da15fa53af36599469c65ea01ebd4f (diff)
downloadports-dec61bb0a1d02b46da9e9d6d293d5afad576131f.tar.gz
ports-dec61bb0a1d02b46da9e9d6d293d5afad576131f.zip
games/xonotic: fix installed icon files
- Instead of broken .ico, install complete set of png and svg icons - Switch to upstream .desktop file as well PR: 267484 Reported by: yuri
-rw-r--r--games/xonotic/Makefile18
-rw-r--r--games/xonotic/files/patch-misc_logos_xonotic.desktop11
-rw-r--r--games/xonotic/pkg-plist13
3 files changed, 33 insertions, 9 deletions
diff --git a/games/xonotic/Makefile b/games/xonotic/Makefile
index 667c96c39a76..b989d89872a5 100644
--- a/games/xonotic/Makefile
+++ b/games/xonotic/Makefile
@@ -1,5 +1,6 @@
PORTNAME= xonotic
PORTVERSION= 0.8.5
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://nl.dl.xonotic.org/ \
http://mirror.bitmissile.com/xonotic/releases/
@@ -30,6 +31,7 @@ PORTDATA= *
OPTIONS_MULTI= COMPONENTS
OPTIONS_MULTI_COMPONENTS=CLIENT DEDICATED
OPTIONS_DEFAULT= CLIENT DEDICATED
+OPTIONS_SUB= yes
CLIENT_DESC= Build client
CLIENT_LIB_DEPENDS= libtheora.so:multimedia/libtheora \
@@ -40,17 +42,9 @@ CLIENT_LIB_DEPENDS= libtheora.so:multimedia/libtheora \
CLIENT_USES= sdl xorg
CLIENT_USE= SDL=sdl2 XORG=x11
CLIENT_ALL_TARGET= sdl-release
-CLIENT_PLIST_FILES= bin/${PORTNAME} share/pixmaps/${PORTNAME}.ico
-CLIENT_DESKTOP_ENTRIES= "Xonotic" \
- "" \
- "${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
- "${PORTNAME}" \
- "Game;Shooter;" \
- ""
DEDICATED_DESC= Build dedicated server
DEDICATED_ALL_TARGET= sv-release
-DEDICATED_PLIST_FILES= bin/${PORTNAME}-dedicated
post-patch:
@${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},' \
@@ -63,7 +57,13 @@ do-install:
do-install-CLIENT-on:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/darkplaces-sdl ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
- ${INSTALL_DATA} ${WRKSRC}/misc/logos/icons_ico/xonotic.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
+ ${INSTALL_DATA} ${WRKSRC}/misc/logos/xonotic.desktop ${STAGEDIR}${PREFIX}/share/applications/
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/
+ ${INSTALL_DATA} ${WRKSRC}/misc/logos/xonotic_icon.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/xonotic.svg
+.for s in 16 22 24 32 48 64 128 256 512
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/
+ ${INSTALL_DATA} ${WRKSRC}/misc/logos/icons_png/xonotic_${s}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/xonotic.png
+.endfor
do-install-DEDICATED-on:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/darkplaces-dedicated ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-dedicated
diff --git a/games/xonotic/files/patch-misc_logos_xonotic.desktop b/games/xonotic/files/patch-misc_logos_xonotic.desktop
new file mode 100644
index 000000000000..4239b43d80b1
--- /dev/null
+++ b/games/xonotic/files/patch-misc_logos_xonotic.desktop
@@ -0,0 +1,11 @@
+--- misc/logos/xonotic.desktop.orig 2022-06-27 17:32:04 UTC
++++ misc/logos/xonotic.desktop
+@@ -6,7 +6,7 @@ Comment=Multiplayer, deathmatch oriented first person
+ Comment[de]=Deathmatch- und Mehrspieler-orientierter Ego-Shooter
+ Comment[fr]=Jeu de tir à la première personne multijoueur
+ Icon=xonotic
+-Exec=xonotic-sdl
++Exec=xonotic
+ Terminal=false
+ PrefersNonDefaultGPU=true
+ StartupNotify=false
diff --git a/games/xonotic/pkg-plist b/games/xonotic/pkg-plist
new file mode 100644
index 000000000000..46c10f3005c2
--- /dev/null
+++ b/games/xonotic/pkg-plist
@@ -0,0 +1,13 @@
+%%CLIENT%%bin/xonotic
+%%DEDICATED%%bin/xonotic-dedicated
+%%CLIENT%%share/applications/xonotic.desktop
+%%CLIENT%%share/icons/hicolor/128x128/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/16x16/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/22x22/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/24x24/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/256x256/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/32x32/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/48x48/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/512x512/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/64x64/apps/xonotic.png
+%%CLIENT%%share/icons/hicolor/scalable/apps/xonotic.svg