games/widelands: update 1.0 → 1.1
This commit is contained in:
parent
b6fcf27436
commit
87dea8c965
@ -1,7 +1,6 @@
|
||||
PORTNAME= widelands
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.0
|
||||
PORTREVISION= 4
|
||||
DISTVERSION= 1.1
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
@ -14,18 +13,22 @@ LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
LIB_DEPENDS= libpng.so:graphics/png \
|
||||
libicuuc.so:devel/icu \
|
||||
libboost_system.so:devel/boost-libs \
|
||||
libcurl.so:ftp/curl
|
||||
libminizip.so:archivers/minizip
|
||||
BUILD_DEPENDS= ${PREFIX}/include/asio.hpp:net/asio
|
||||
|
||||
USES= cmake compiler:c++11-lib cpe gettext gl python:build sdl
|
||||
USES= cmake compiler:c++11-lib cpe gettext gl pkgconfig \
|
||||
python:build sdl
|
||||
USE_GITHUB= yes
|
||||
USE_GL= gl glew
|
||||
USE_SDL= sdl2 mixer2 image2 ttf2
|
||||
CMAKE_ARGS= -DWL_INSTALL_BASEDIR="${PREFIX}" \
|
||||
CMAKE_ARGS= -DWL_INSTALL_BINDIR=bin \
|
||||
-DWL_INSTALL_BASEDIR="${PREFIX}" \
|
||||
-DWL_INSTALL_DATADIR="${DATADIR}" \
|
||||
-DWL_INSTALL_DOCDIR="${DOCSDIR}" \
|
||||
-DWL_VERSION="${DISTVERSION}" \
|
||||
-DWL_OPTIMIZE_FLAGS="" \
|
||||
-Wno-dev
|
||||
CMAKE_BUILD_TYPE=None
|
||||
|
||||
PORTSCOUT= limit:^[0-9]+\.
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1623849836
|
||||
SHA256 (widelands-widelands-v1.0_GH0.tar.gz) = 1dab0c4062873cc72c5e0558f9e9620b0ef185f1a78923a77c4ce5b9ed76031a
|
||||
SIZE (widelands-widelands-v1.0_GH0.tar.gz) = 792124780
|
||||
TIMESTAMP = 1666614684
|
||||
SHA256 (widelands-widelands-v1.1_GH0.tar.gz) = 6853fcf3daec9b66005691e5bcb00326634baf0985ad89a7e6511502612f6412
|
||||
SIZE (widelands-widelands-v1.1_GH0.tar.gz) = 416104611
|
||||
|
@ -1,109 +1,40 @@
|
||||
--- CMakeLists.txt.orig 2021-06-14 09:22:20 UTC
|
||||
--- CMakeLists.txt.orig 2022-10-22 11:51:16 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -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()
|
||||
|
||||
-
|
||||
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")
|
||||
- link_libraries("GL")
|
||||
+ link_libraries(OpenGL::GL)
|
||||
add_compile_definitions(WL_USE_GLVND)
|
||||
message(STATUS "Adding linker flags for GLVND.")
|
||||
@@ -372,7 +372,7 @@ else()
|
||||
endif()
|
||||
@@ -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")
|
||||
- if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
+ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR TRUE)
|
||||
message(STATUS "Compiler warnings will be ignored.")
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND
|
||||
(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.2))
|
||||
@@ -403,12 +403,12 @@ endif()
|
||||
if(USE_FLTO_IF_AVAILABLE STREQUAL "yes")
|
||||
# Cross-compile-unit optimization not supported by gcc with debug on!
|
||||
# Therefore, this may only be done with Release builds.
|
||||
-if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
+if(TRUE OR 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")
|
||||
+ if (TRUE OR CMAKE_SYSTEM MATCHES "Linux")
|
||||
# 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))
|
||||
+ if(TRUE OR ("${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)
|
||||
@@ -499,7 +499,7 @@ endif (OPTION_BUILD_TESTS)
|
||||
|
||||
install (
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION
|
||||
- DESTINATION ${WL_INSTALL_BASEDIR}
|
||||
+ DESTINATION ${WL_INSTALL_DOCDIR}
|
||||
CONFIGURATIONS Debug;Release
|
||||
CONFIGURATIONS Debug;Release;None
|
||||
COMPONENT CoreVersionFile
|
||||
)
|
||||
@@ -463,10 +418,9 @@ install(
|
||||
@@ -556,10 +556,9 @@ install(
|
||||
|
||||
install(
|
||||
FILES
|
||||
@ -112,31 +43,6 @@
|
||||
ChangeLog
|
||||
- DESTINATION ${WL_INSTALL_BASEDIR}
|
||||
+ DESTINATION ${WL_INSTALL_DOCDIR}
|
||||
CONFIGURATIONS Debug;Release
|
||||
CONFIGURATIONS Debug;Release;None
|
||||
COMPONENT CoreLicenseFiles
|
||||
)
|
||||
@@ -474,7 +428,7 @@ install(
|
||||
install(
|
||||
DIRECTORY
|
||||
doc
|
||||
- DESTINATION ${WL_INSTALL_BASEDIR}
|
||||
+ DESTINATION ${WL_INSTALL_DOCDIR}
|
||||
CONFIGURATIONS Debug
|
||||
COMPONENT DocFiles
|
||||
PATTERN "CMakeLists.txt" EXCLUDE
|
||||
@@ -482,6 +436,7 @@ install(
|
||||
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${WL_INSTALL_DATADIR}/locale)
|
||||
|
||||
+if(OPTION_BUILD_TRANSLATIONS)
|
||||
install(
|
||||
DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/locale/
|
||||
@@ -489,6 +444,7 @@ install(
|
||||
CONFIGURATIONS Debug;Release
|
||||
COMPONENT CoreLanguageFiles
|
||||
)
|
||||
+endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
add_subdirectory(xdg)
|
||||
|
@ -1,18 +1,21 @@
|
||||
--- cmake/WlFunctions.cmake.orig 2021-06-14 09:22:20 UTC
|
||||
--- cmake/WlFunctions.cmake.orig 2022-10-22 11:51:16 UTC
|
||||
+++ cmake/WlFunctions.cmake
|
||||
@@ -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()
|
||||
@@ -93,8 +93,8 @@ macro(_common_compile_tasks)
|
||||
|
||||
if(ARG_USES_MINIZIP)
|
||||
if(MINIZIP_STATIC_LIBRARIES)
|
||||
- target_link_libraries(${NAME} minizip)
|
||||
- message(STATUS "Link ${NAME} with minizip")
|
||||
+ target_link_libraries(${NAME} ${MINIZIP_STATIC_LIBRARIES})
|
||||
+ message(STATUS "Link ${NAME} with ${MINIZIP_STATIC_LIBRARIES}")
|
||||
else()
|
||||
target_link_libraries(${NAME} third_party_minizip)
|
||||
message(STATUS "Link ${NAME} with third_party_minizip")
|
||||
@@ -103,7 +103,6 @@ macro(_common_compile_tasks)
|
||||
|
||||
if(ARG_USES_ATOMIC AND NOT APPLE AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
||||
# clang on linux needs explicit linkage against standard library atomic
|
||||
- target_link_libraries(${NAME} atomic)
|
||||
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"
|
||||
- install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
|
||||
+ install(TARGETS ${NAME} DESTINATION "bin" COMPONENT ExecutableFiles)
|
||||
endfunction()
|
||||
if(ARG_USES_ZLIB)
|
||||
|
13
games/widelands/files/patch-src_CMakeLists.txt
Normal file
13
games/widelands/files/patch-src_CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
--- src/CMakeLists.txt.orig 2022-10-22 11:51:16 UTC
|
||||
+++ src/CMakeLists.txt
|
||||
@@ -77,7 +77,9 @@ else()
|
||||
# If pkg-config is ever needed to find other libraries, move the include outside the if() block
|
||||
include(FindPkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
- pkg_check_modules(MINIZIP minizip)
|
||||
+ pkg_check_modules(PC_MINIZIP minizip)
|
||||
+ find_path(MINIZIP_INCLUDE_DIRS NAMES mztools.h PATH_SUFFIXES minizip HINTS ${PC_MINIZIP_INCLUDE_DIRS})
|
||||
+ find_library(MINIZIP_STATIC_LIBRARIES NAMES minizip HINTS ${PC_MINIZIP_LIBRARY_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
@ -1,13 +0,0 @@
|
||||
Fix build with Boost 1.77.
|
||||
|
||||
Index: src/network/bufferedconnection.h
|
||||
--- src/network/bufferedconnection.h.orig
|
||||
+++ src/network/bufferedconnection.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef WL_NETWORK_BUFFEREDCONNECTION_H
|
||||
#define WL_NETWORK_BUFFEREDCONNECTION_H
|
||||
|
||||
+#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <thread>
|
@ -1,11 +0,0 @@
|
||||
--- 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});
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- xdg/CMakeLists.txt.orig 2021-06-14 09:22:20 UTC
|
||||
+++ xdg/CMakeLists.txt
|
||||
@@ -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 ../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 ../share/man/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}/${XDG_APPLICATION_ID}.desktop DESTINATION ../share/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}.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 ||: )")
|
||||
- install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/../share/icons/hicolor ||: )")
|
||||
-else (GTK_UPDATE_ICON_CACHE)
|
||||
- message(WARNING "gtk-update-icon-cache not found!")
|
||||
-endif (GTK_UPDATE_ICON_CACHE)
|
Loading…
Reference in New Issue
Block a user