git: 2b9b2ccd9c04 - main - games/widelands: update build21 → 1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Mar 2022 15:07:18 UTC
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=2b9b2ccd9c044f4d07f2fa18d6cf7a9e98933914 commit 2b9b2ccd9c044f4d07f2fa18d6cf7a9e98933914 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2021-06-22 13:33:32 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-03-14 15:06:41 +0000 games/widelands: update build21 → 1.0 --- games/widelands/Makefile | 29 +++---- games/widelands/distinfo | 6 +- games/widelands/files/patch-CMakeLists.txt | 99 +++++++++++++++++++--- .../widelands/files/patch-cmake_WlFunctions.cmake | 13 ++- .../files/patch-src_game__io_game_preload_packet.h | 11 --- .../files/patch-src_network_net__addons.cc | 11 +++ games/widelands/files/patch-src_wui_savegamedata.h | 10 --- games/widelands/files/patch-xdg_CMakeLists.txt | 21 +++-- 8 files changed, 136 insertions(+), 64 deletions(-) diff --git a/games/widelands/Makefile b/games/widelands/Makefile index dcd207debe1f..2222c3eacf5f 100644 --- a/games/widelands/Makefile +++ b/games/widelands/Makefile @@ -1,12 +1,9 @@ # Created by: Bartosz Fabianowski <freebsd@chillt.de> PORTNAME= widelands -DISTVERSION= build21 -PORTREVISION= 4 +DISTVERSIONPREFIX= v +DISTVERSION= 1.0 CATEGORIES= games -MASTER_SITES= https://launchpad.net/widelands/${DISTVERSION}/${DISTVERSION}/+download/ \ - https://mirror.amdmi3.ru/distfiles/ -EXTRACT_SUFX= -source.tar.gz MAINTAINER= amdmi3@FreeBSD.org COMMENT= Realtime strategy game inspired by Settlers II @@ -16,28 +13,28 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libpng.so:graphics/png \ libicuuc.so:devel/icu \ - libboost_regex.so:devel/boost-libs + libboost_system.so:devel/boost-libs \ + libcurl.so:ftp/curl USES= cmake compiler:c++11-lib cpe gettext gl python:build sdl +USE_GITHUB= yes +USE_GL= gl glew +USE_SDL= sdl2 mixer2 image2 ttf2 CMAKE_ARGS= -DWL_INSTALL_BASEDIR="${PREFIX}" \ -DWL_INSTALL_DATADIR="${DATADIR}" \ -DWL_INSTALL_DOCDIR="${DOCSDIR}" \ -DWL_VERSION="${DISTVERSION}" \ - -DWL_OPTIMIZE_FLAGS="" -USE_GL= gl glew -USE_SDL= sdl2 mixer2 image2 ttf2 + -DWL_OPTIMIZE_FLAGS="" \ + -Wno-dev PORTDATA= * PORTDOCS= * -DESKTOP_ENTRIES="Widelands" \ - "" \ - "${DATADIR}/pics/wl-ico-64.png" \ - "widelands" \ - "Game;StrategyGame;" \ - "" +OPTIONS_DEFINE= DOCS LTO TEST +OPTIONS_DEFAULT=LTO -OPTIONS_DEFINE= DOCS +LTO_CMAKE_ON= -DUSE_FLTO_IF_AVAILABLE:STRING="yes" +TEST_CMAKE_BOOL=OPTION_BUILD_TESTS post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ diff --git a/games/widelands/distinfo b/games/widelands/distinfo index 827a61b167a5..7024fe662d66 100644 --- a/games/widelands/distinfo +++ b/games/widelands/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1595332760 -SHA256 (widelands-build21-source.tar.gz) = 601e0e4c6f91b3fb0ece2cd1b83ecfb02344a1b9194fbb70ef3f70e06994e357 -SIZE (widelands-build21-source.tar.gz) = 381374149 +TIMESTAMP = 1623849836 +SHA256 (widelands-widelands-v1.0_GH0.tar.gz) = 1dab0c4062873cc72c5e0558f9e9620b0ef185f1a78923a77c4ce5b9ed76031a +SIZE (widelands-widelands-v1.0_GH0.tar.gz) = 792124780 diff --git a/games/widelands/files/patch-CMakeLists.txt b/games/widelands/files/patch-CMakeLists.txt index 34216b9853f8..855e522366d1 100644 --- a/games/widelands/files/patch-CMakeLists.txt +++ b/games/widelands/files/patch-CMakeLists.txt @@ -1,14 +1,52 @@ ---- CMakeLists.txt.orig 2020-07-12 19:33:44 UTC +--- CMakeLists.txt.orig 2021-06-14 09:22:20 UTC +++ CMakeLists.txt -@@ -202,7 +202,6 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE") - option(OPTION_ASAN "Build with AddressSanitizer" ON) - else() +@@ -175,45 +175,8 @@ endif() + # TODO(sirver): One day, this should be enabled. Then we have no more cycles in our dependencies.... + # set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES ON) + +-if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") +- find_path(FILE_WL_RELEASE "WL_RELEASE" ${CMAKE_CURRENT_SOURCE_DIR}) +- if(${FILE_WL_RELEASE} STREQUAL "FILE_WL_RELEASE-NOTFOUND") +- set(CMAKE_BUILD_TYPE Debug) +- else() +- set(CMAKE_BUILD_TYPE Release) +- endif() +-endif (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") + +-if(CMAKE_BUILD_TYPE STREQUAL "Debug") +- if(MSVC) +- set(WL_DEBUG_FLAGS "-DDEBUG") +- else() +- set(WL_DEBUG_FLAGS "-g -DDEBUG") +- endif() +- option(OPTION_ASAN "Build with AddressSanitizer" ON) +-elseif(CMAKE_BUILD_TYPE STREQUAL "Release") +- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2)) +- message(STATUS "GCC >6.2.0 breaks -03, setting -02") +- set(WL_OPTIMIZE_FLAGS "-O2") +- else() +- set(WL_OPTIMIZE_FLAGS "-O3") +- endif () +- set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE") +- option(OPTION_ASAN "Build with AddressSanitizer" OFF) +-elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") +- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.2)) +- message(STATUS "GCC >6.2.0 breaks -03, setting -02") +- set(WL_OPTIMIZE_FLAGS "-O2") +- else() +- set(WL_OPTIMIZE_FLAGS "-O3") +- endif () +- set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE") +- option(OPTION_ASAN "Build with AddressSanitizer" ON) +-else() - message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") - endif() +-endif() - wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11") -@@ -219,7 +218,7 @@ endif(OPTION_ASAN) +- + if(OPTION_ASAN) + message(STATUS "Using AddressSanitizer https://clang.llvm.org/docs/AddressSanitizer.html") + # See https://clang.llvm.org/docs/AddressSanitizer.html +@@ -226,7 +189,7 @@ endif(OPTION_ASAN) # This is set to avoid linker errors when using GLVND-libs on Linux if("${OpenGL_GL_PREFERENCE}" STREQUAL "GLVND") @@ -17,7 +55,46 @@ add_compile_definitions(WL_USE_GLVND) message(STATUS "Adding linker flags for GLVND.") endif() -@@ -352,7 +351,7 @@ endif (OPTION_BUILD_TESTS) +@@ -255,8 +218,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-unreachable-code") + wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-documentation") + +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=deprecated") +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=non-pod-varargs") + + wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Qunused-arguments") + +@@ -311,10 +272,6 @@ endif() + + if(NOT MSVC) + # Turn some warnings into errors. +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=format-security") +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=return-type") +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=shadow") +- wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized") + + wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11") + endif() +@@ -327,9 +284,8 @@ if(USE_FLTO_IF_AVAILABLE STREQUAL "yes") + if(CMAKE_BUILD_TYPE STREQUAL "Release") + # Only tested on Linux. Might work also on other platforms. + # If tested and found good, remove this check +- if (CMAKE_SYSTEM MATCHES "Linux") ++ if (CMAKE_SYSTEM MATCHES "Linux|FreeBSD") + # Usage of -flto tested only with gcc 8.3 and 9.3 (2020-04); when in doubt, leaving it out.. +- if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)) + # + # The execution jumps between compile units rather often. -flot allows optimization across + # comple units. Binary size reduced by >15% on tested environments. This does not directly +@@ -341,7 +297,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") + wl_add_flag(WL_GENERIC_CXX_FLAGS "-flto") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") + message(STATUS "Enabling link-time optimizations") +- endif() + endif(CMAKE_SYSTEM MATCHES "Linux") + endif(CMAKE_BUILD_TYPE STREQUAL "Release") + endif(USE_FLTO_IF_AVAILABLE STREQUAL "yes") +@@ -414,7 +369,7 @@ endif (OPTION_BUILD_TESTS) install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION @@ -26,7 +103,7 @@ CONFIGURATIONS Debug;Release COMPONENT CoreVersionFile ) -@@ -401,10 +400,9 @@ install( +@@ -463,10 +418,9 @@ install( install( FILES @@ -38,7 +115,7 @@ CONFIGURATIONS Debug;Release COMPONENT CoreLicenseFiles ) -@@ -412,7 +410,7 @@ install( +@@ -474,7 +428,7 @@ install( install( DIRECTORY doc diff --git a/games/widelands/files/patch-cmake_WlFunctions.cmake b/games/widelands/files/patch-cmake_WlFunctions.cmake index 2c6c08d202a0..e0cd40514c95 100644 --- a/games/widelands/files/patch-cmake_WlFunctions.cmake +++ b/games/widelands/files/patch-cmake_WlFunctions.cmake @@ -1,6 +1,15 @@ ---- cmake/WlFunctions.cmake.orig 2020-07-12 19:33:44 UTC +--- cmake/WlFunctions.cmake.orig 2021-06-14 09:22:20 UTC +++ cmake/WlFunctions.cmake -@@ -289,5 +289,5 @@ function(wl_binary NAME) +@@ -132,7 +132,7 @@ macro(_common_compile_tasks) + if (OPTION_BUILD_WINSTATIC) + target_link_libraries(${NAME} ${TARGET_LINK_FLAGS} CURL::libcurl ${CURL_EXTRA_LIBS} gdi32 crypt32 wldap32 nghttp2) + else() +- target_link_libraries(${NAME} curl) ++ target_link_libraries(${NAME} CURL::libcurl) + endif() + endif() + +@@ -325,5 +325,5 @@ function(wl_binary NAME) #Quoting the CMake documentation on DESTINATION: #"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX" diff --git a/games/widelands/files/patch-src_game__io_game_preload_packet.h b/games/widelands/files/patch-src_game__io_game_preload_packet.h deleted file mode 100644 index ef5ffd175b4b..000000000000 --- a/games/widelands/files/patch-src_game__io_game_preload_packet.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/game_io/game_preload_packet.h.orig 2020-07-12 19:33:44 UTC -+++ src/game_io/game_preload_packet.h -@@ -20,6 +20,8 @@ - #ifndef WL_GAME_IO_GAME_PRELOAD_PACKET_H - #define WL_GAME_IO_GAME_PRELOAD_PACKET_H - -+#include <ctime> -+ - #include "game_io/game_data_packet.h" - #include "logic/game_controller.h" - diff --git a/games/widelands/files/patch-src_network_net__addons.cc b/games/widelands/files/patch-src_network_net__addons.cc new file mode 100644 index 000000000000..a2e01b40dbdc --- /dev/null +++ b/games/widelands/files/patch-src_network_net__addons.cc @@ -0,0 +1,11 @@ +--- src/network/net_addons.cc.orig 2021-06-14 09:22:20 UTC ++++ src/network/net_addons.cc +@@ -179,7 +179,7 @@ std::vector<AddOnInfo> NetAddons::refresh_remotes() { + const std::string name = next_word(output); + const std::string msg = next_word(output); + const std::string v = next_word(output); +- const uint32_t t = next_number(output); ++ const std::time_t t = next_number(output); + info.user_comments.push_back(AddOnComment{name, msg, string_to_version(v), t}); + } + diff --git a/games/widelands/files/patch-src_wui_savegamedata.h b/games/widelands/files/patch-src_wui_savegamedata.h deleted file mode 100644 index 9728e1d703a1..000000000000 --- a/games/widelands/files/patch-src_wui_savegamedata.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/wui/savegamedata.h.orig 2020-07-12 19:33:44 UTC -+++ src/wui/savegamedata.h -@@ -2,6 +2,7 @@ - #define WL_WUI_SAVEGAMEDATA_H - - #include <string> -+#include <ctime> - - #include "io/filesystem/filesystem.h" - #include "logic/game_controller.h" diff --git a/games/widelands/files/patch-xdg_CMakeLists.txt b/games/widelands/files/patch-xdg_CMakeLists.txt index f6b4b61fa396..1caa6570e532 100644 --- a/games/widelands/files/patch-xdg_CMakeLists.txt +++ b/games/widelands/files/patch-xdg_CMakeLists.txt @@ -1,20 +1,22 @@ ---- xdg/CMakeLists.txt.orig 2020-07-12 19:33:44 UTC +--- xdg/CMakeLists.txt.orig 2021-06-14 09:22:20 UTC +++ xdg/CMakeLists.txt -@@ -5,20 +5,8 @@ set(XDG_APPLICATION_ID "org.widelands.Widelands") - +@@ -6,19 +6,12 @@ set(XDG_APPLICATION_ID "org.widelands.Widelands") list(APPEND icon_sizes "16" "32" "48" "64" "128") foreach (icon_size ${icon_sizes}) -- #install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png) + #install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png) - install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ../share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png) + install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png) endforeach (icon_size ${icon_sizes}) --#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6) + #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ../share/man/man6) --#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION share/man/man6) + #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ../share/applications) --#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION share/applications) + #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ../share/metainfo) -- ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo) + -find_program(GTK_UPDATE_ICON_CACHE NAMES gtk-update-icon-cache) -if (GTK_UPDATE_ICON_CACHE) - #install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor ||: )") @@ -22,6 +24,3 @@ -else (GTK_UPDATE_ICON_CACHE) - message(WARNING "gtk-update-icon-cache not found!") -endif (GTK_UPDATE_ICON_CACHE) -+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION share/man/man6) -+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION share/applications) -+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo)