aboutsummaryrefslogtreecommitdiff
path: root/games/DDNet
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-02-24 18:59:26 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-02-24 19:05:33 +0000
commitc15f801dad29dd908c8df3e0d0dbb114f1214558 (patch)
treeb19bc1481b4d4ef19afbc247a651e86b239c9706 /games/DDNet
parent236f23189f22af6972f0ef9d2496da4c8afbe054 (diff)
downloadports-c15f801dad29dd908c8df3e0d0dbb114f1214558.tar.gz
ports-c15f801dad29dd908c8df3e0d0dbb114f1214558.zip
Diffstat (limited to 'games/DDNet')
-rw-r--r--games/DDNet/Makefile19
-rw-r--r--games/DDNet/distinfo6
-rw-r--r--games/DDNet/files/patch-CMakeLists.txt24
-rw-r--r--games/DDNet/pkg-plist8
4 files changed, 47 insertions, 10 deletions
diff --git a/games/DDNet/Makefile b/games/DDNet/Makefile
index 87a1262f1e02..957d4c117a50 100644
--- a/games/DDNet/Makefile
+++ b/games/DDNet/Makefile
@@ -1,5 +1,5 @@
PORTNAME= DDNet
-PORTVERSION= 15.8.1
+PORTVERSION= 15.9
CATEGORIES= games
MASTER_SITES= https://ddnet.tw/downloads/
@@ -9,6 +9,8 @@ COMMENT= DDraceNetwork, a cooperative racing mod of Teeworlds
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/license.txt
+LIB_DEPENDS= libpnglite.so:graphics/pnglite
+
USES= cmake compiler:c++11-lang pkgconfig python sqlite:3 ssl tar:xz
CMAKE_ARGS= -DPYTHON_EXECUTABLE="${PYTHON_CMD}"
CMAKE_OFF= AUTOUPDATE DOWNLOAD_GTEST PREFER_BUNDLED_LIBS
@@ -18,8 +20,10 @@ CXXFLAGS+= -DBINARY_DIR="\\\"${PREFIX}/bin\\\""
PORTDATA= *
DATADIR= ${PREFIX}/share/ddnet
-OPTIONS_DEFINE= CLIENT TEST WEBSOCKETS MYSQL VIDEORECORDER UPNP
-OPTIONS_DEFAULT= CLIENT TEST VIDEORECORDER UPNP
+OPTIONS_DEFINE= TEST WEBSOCKETS MYSQL VIDEORECORDER UPNP
+OPTIONS_MULTI= COMPONENTS
+OPTIONS_MULTI_COMPONENTS=CLIENT SERVER
+OPTIONS_DEFAULT= CLIENT SERVER TEST VIDEORECORDER UPNP
OPTIONS_SUB= yes
CLIENT_DESC= Build game client
@@ -28,13 +32,19 @@ CLIENT_USES= gettext gl sdl xorg desktop-file-utils
CLIENT_USE= GL=gl,glew SDL=sdl2
CLIENT_LIB_DEPENDS= libfreetype.so:print/freetype2 \
libwavpack.so:audio/wavpack \
- libpnglite.so:graphics/pnglite \
libopusfile.so:audio/opusfile \
libopus.so:audio/opus \
libogg.so:audio/libogg \
libnotify.so:devel/libnotify \
libcurl.so:ftp/curl
+SERVER_DESC= Build game server
+SERVER_CMAKE_BOOL= SERVER
+# does not build without these libs, but does not need them in
+# runtime either
+SERVER_BUILD_DEPENDS= glew>=0:graphics/glew \
+ wavpack>=0:audio/wavpack
+
TEST_BUILD_DEPENDS= googletest>=0:devel/googletest
TEST_TEST_TARGET= run_tests
@@ -54,6 +64,7 @@ VIDEORECORDER_LIB_DEPENDS=libavcodec.so:multimedia/ffmpeg
UPNP_DESC= UPnP support for the server
UPNP_CMAKE_BOOL= UPNP
UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc
+UPNP_IMPLIES= SERVER
post-extract:
# json-parser and md5 are left intact
diff --git a/games/DDNet/distinfo b/games/DDNet/distinfo
index d36430724746..58f4348f5d66 100644
--- a/games/DDNet/distinfo
+++ b/games/DDNet/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1640797431
-SHA256 (DDNet-15.8.1.tar.xz) = c95665d7618d9c2d494c942cd6fcf4a511cc59dfa61a7b48fcc3944dae8d661b
-SIZE (DDNet-15.8.1.tar.xz) = 27092832
+TIMESTAMP = 1644795339
+SHA256 (DDNet-15.9.tar.xz) = dfd0409719a1ca11087323a13df915b58b02b0ec67bd7f99af62aeb833b17acf
+SIZE (DDNet-15.9.tar.xz) = 26690820
diff --git a/games/DDNet/files/patch-CMakeLists.txt b/games/DDNet/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d87f98845d88
--- /dev/null
+++ b/games/DDNet/files/patch-CMakeLists.txt
@@ -0,0 +1,24 @@
+--- CMakeLists.txt.orig 2022-02-12 22:26:38 UTC
++++ CMakeLists.txt
+@@ -2566,11 +2566,17 @@ if(NOT DEV)
+ install(TARGETS ${TARGET_ANTIBOT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT server)
+ endif()
+ install(TARGETS ${TARGETS_TOOLS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT tools)
+- install(FILES other/ddnet.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications COMPONENT client)
+- install(FILES other/ddnet.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo COMPONENT client)
++ if(CLIENT)
++ install(FILES other/ddnet.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications COMPONENT client)
++ install(FILES other/ddnet.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo COMPONENT client)
++ endif()
+ foreach(SIZE 16 32 48 256)
+- install(FILES other/icons/DDNet_${SIZE}x${SIZE}x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet.png COMPONENT client)
+- install(FILES other/icons/DDNet-Server_${SIZE}x${SIZE}x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet-server.png COMPONENT server)
++ if(CLIENT)
++ install(FILES other/icons/DDNet_${SIZE}x${SIZE}x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet.png COMPONENT client)
++ endif()
++ if(SERVER)
++ install(FILES other/icons/DDNet-Server_${SIZE}x${SIZE}x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME ddnet-server.png COMPONENT server)
++ endif()
+ endforeach()
+ endif()
+
diff --git a/games/DDNet/pkg-plist b/games/DDNet/pkg-plist
index 9d2ad8e54570..5be0080002ca 100644
--- a/games/DDNet/pkg-plist
+++ b/games/DDNet/pkg-plist
@@ -1,5 +1,5 @@
%%CLIENT%%bin/DDNet
-bin/DDNet-Server
+%%SERVER%%bin/DDNet-Server
lib/ddnet/config_retrieve
lib/ddnet/config_store
lib/ddnet/crapnet
@@ -16,10 +16,12 @@ lib/ddnet/packetgen
lib/ddnet/unicode_confusables
lib/ddnet/uuid
%%CLIENT%%share/applications/ddnet.desktop
-%%CLIENT%%share/icons/hicolor/128x128/apps/ddnet.png
%%CLIENT%%share/icons/hicolor/16x16/apps/ddnet.png
+%%SERVER%%share/icons/hicolor/16x16/apps/ddnet-server.png
%%CLIENT%%share/icons/hicolor/256x256/apps/ddnet.png
+%%SERVER%%share/icons/hicolor/256x256/apps/ddnet-server.png
%%CLIENT%%share/icons/hicolor/32x32/apps/ddnet.png
+%%SERVER%%share/icons/hicolor/32x32/apps/ddnet-server.png
%%CLIENT%%share/icons/hicolor/48x48/apps/ddnet.png
-%%CLIENT%%share/icons/hicolor/512x512/apps/ddnet.png
+%%SERVER%%share/icons/hicolor/48x48/apps/ddnet-server.png
%%CLIENT%%share/metainfo/ddnet.appdata.xml