diff --git a/games/DDNet/Makefile b/games/DDNet/Makefile index 87a1262f1e02..957d4c117a50 100644 --- a/games/DDNet/Makefile +++ b/games/DDNet/Makefile @@ -1,70 +1,81 @@ PORTNAME= DDNet -PORTVERSION= 15.8.1 +PORTVERSION= 15.9 CATEGORIES= games MASTER_SITES= https://ddnet.tw/downloads/ MAINTAINER= amdmi3@FreeBSD.org 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 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 CLIENT_CMAKE_BOOL= CLIENT 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 WEBSOCKETS_DESC= Enable WebSocket support for server WEBSOCKETS_CMAKE_BOOL= WEBSOCKETS WEBSOCKETS_LIB_DEPENDS= libwebsockets.so:net/libwebsockets MYSQL_DESC= Enable MySQL/MariaDB support for server MYSQL_CMAKE_BOOL= MYSQL MYSQL_USES= mysql MYSQL_LIB_DEPENDS= libmysqlcppconn.so:databases/mysql-connector-c++ VIDEORECORDER_DESC= Video recording support using FFmpeg to the client VIDEORECORDER_CMAKE_BOOL=VIDEORECORDER 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 .for dep in glew pnglite wavpack zlib @${RM} -r ${WRKSRC}/src/engine/external/${dep} .endfor post-patch: @${REINPLACE_CMD} -e '/find_package.*Git/ d' ${WRKSRC}/CMakeLists.txt post-patch-TEST-off: @${REINPLACE_CMD} -e '/find_package.*GTest/ d' ${WRKSRC}/CMakeLists.txt .include 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,25 +1,27 @@ %%CLIENT%%bin/DDNet -bin/DDNet-Server +%%SERVER%%bin/DDNet-Server lib/ddnet/config_retrieve lib/ddnet/config_store lib/ddnet/crapnet lib/ddnet/dilate lib/ddnet/dummy_map lib/ddnet/fake_server lib/ddnet/map_convert_07 lib/ddnet/map_diff lib/ddnet/map_extract lib/ddnet/map_optimize lib/ddnet/map_replace_image lib/ddnet/map_resave 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