From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] widelands: update to 1.1.
Date: Sat, 03 Dec 2022 07:20:33 +0100 [thread overview]
Message-ID: <20221203062033.AOgNYoJG54en7OcKdPqNGiADUcDjVTFSb-RMw-EEG9Q@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40819@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/kruceter/void-packages widelands
https://github.com/void-linux/void-packages/pull/40819
widelands: update to 1.1.
cc: @travankor
Related to #39083.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64
- armv6l-musl (cross)
A patch file from https://github.com/void-linux/void-packages/pull/40819.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-widelands-40819.patch --]
[-- Type: text/x-diff, Size: 14402 bytes --]
From b53463e85dfacb44d0680a73fda3b807d044d913 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Mon, 28 Nov 2022 01:42:53 +0300
Subject: [PATCH 1/2] widelands: update to 1.1.
boost is deprecated and removed upstream.
Following the deprecation procedure upstream now needs asio.
---
.../patches/cmake-build-type-none.patch | 67 -------------------
.../widelands/patches/fix-install-path.patch | 40 -----------
srcpkgs/widelands/patches/musl.patch | 63 +++++++----------
srcpkgs/widelands/patches/no-werror.patch | 11 +++
srcpkgs/widelands/patches/wordsize.patch | 25 +++++++
srcpkgs/widelands/template | 11 +--
6 files changed, 68 insertions(+), 149 deletions(-)
delete mode 100644 srcpkgs/widelands/patches/cmake-build-type-none.patch
delete mode 100644 srcpkgs/widelands/patches/fix-install-path.patch
create mode 100644 srcpkgs/widelands/patches/no-werror.patch
create mode 100644 srcpkgs/widelands/patches/wordsize.patch
diff --git a/srcpkgs/widelands/patches/cmake-build-type-none.patch b/srcpkgs/widelands/patches/cmake-build-type-none.patch
deleted file mode 100644
index 0f9b0cc921ad..000000000000
--- a/srcpkgs/widelands/patches/cmake-build-type-none.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-Index: CMakeLists.txt
-===================================================================
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -209,6 +209,8 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
- endif ()
- set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
- option(OPTION_ASAN "Build with AddressSanitizer" ON)
-+elseif(CMAKE_BUILD_TYPE STREQUAL "None")
-+ message(STATUS "Not setting any default flags.")
- else()
- message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
- endif()
-@@ -415,7 +417,7 @@ endif (OPTION_BUILD_TESTS)
- install (
- FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION
- DESTINATION ${WL_INSTALL_BASEDIR}
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT CoreVersionFile
- )
-
-@@ -440,7 +442,7 @@ install(
- data/txts
- data/world
- DESTINATION ${WL_INSTALL_DATADIR}
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT CoreDataFiles
- )
-
-@@ -448,7 +450,7 @@ install(
- DIRECTORY
- data/maps
- DESTINATION ${WL_INSTALL_DATADIR}
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT MapFiles
- )
-
-@@ -457,7 +459,7 @@ install(
- data/music
- data/sound
- DESTINATION ${WL_INSTALL_DATADIR}
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT MusicFiles
- )
-
-@@ -467,7 +469,7 @@ install(
- CREDITS
- ChangeLog
- DESTINATION ${WL_INSTALL_BASEDIR}
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT CoreLicenseFiles
- )
-
-@@ -486,7 +488,7 @@ install(
- DIRECTORY
- ${CMAKE_CURRENT_BINARY_DIR}/locale/
- DESTINATION ${WL_INSTALL_DATADIR}/locale
-- CONFIGURATIONS Debug;Release
-+ CONFIGURATIONS Debug;Release;None
- COMPONENT CoreLanguageFiles
- )
-
diff --git a/srcpkgs/widelands/patches/fix-install-path.patch b/srcpkgs/widelands/patches/fix-install-path.patch
deleted file mode 100644
index 277c9a74726e..000000000000
--- a/srcpkgs/widelands/patches/fix-install-path.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Index: cmake/WlFunctions.cmake
-===================================================================
---- a/cmake/WlFunctions.cmake
-+++ b/cmake/WlFunctions.cmake
-@@ -289,5 +289,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 ${CMAKE_INSTALL_BINDIR} COMPONENT ExecutableFiles)
- endfunction()
-Index: xdg/CMakeLists.txt
-===================================================================
---- a/xdg/CMakeLists.txt
-+++ b/xdg/CMakeLists.txt
-@@ -6,19 +6,19 @@ set(XDG_APPLICATION_ID "org.widelands.Wi
- 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 ||: )")
-+ 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)
diff --git a/srcpkgs/widelands/patches/musl.patch b/srcpkgs/widelands/patches/musl.patch
index 49b135775540..137e2b83461c 100644
--- a/srcpkgs/widelands/patches/musl.patch
+++ b/srcpkgs/widelands/patches/musl.patch
@@ -1,50 +1,39 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 018d9ea0..827bf33e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -312,19 +312,15 @@ IF (WIN32)
- endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
+@@ -459,6 +459,10 @@ IF (WIN32)
+ endif()
endif (WIN32)
--# on BSD this must be explicitly linked
--if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-- # Not needed on Debian GNU/kFreeBSD..
-- if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
-- find_library(EXECINFO_LIBRARY NAMES execinfo)
-- endif (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
--
-- # OpenBSD needs the X11 include directory in order to find GL/glu.h
-- if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-- find_package(X11 REQUIRED)
-- include_directories(${X11_INCLUDE_DIR})
-- endif ()
--endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+# Find libexecinfo and libintl for musl
+find_library(EXECINFO_LIBRARY NAMES execinfo)
+find_library(INTL_LIBRARY NAMES intl)
+
-+# OpenBSD needs the X11 include directory in order to find GL/glu.h
-+if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-+ find_package(X11 REQUIRED)
-+ include_directories(${X11_INCLUDE_DIR})
-+endif ()
+ # on BSD this must be explicitly linked
+ if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ # Not needed on Debian GNU/kFreeBSD..
+--- a/cmake/WlFunctions.cmake
++++ b/cmake/WlFunctions.cmake
+@@ -184,6 +184,10 @@
+ endif()
+ endif()
- if (NOT DEFINED WL_VERSION)
- include (${CMAKE_SOURCE_DIR}/cmake/BzrRevision.cmake)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 31f5a76e..1f27495f 100644
++ if (INTL_LIBRARY)
++ target_link_libraries(${NAME} ${INTL_LIBRARY})
++ endif()
++
+ if (ARG_USES_INTL)
+ # libintl is not used on all systems, so only include it, when we actually
+ # found it.
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -140,9 +140,9 @@ wl_library(widelands_options
- logic_filesystem_constants
+@@ -161,6 +161,10 @@
+ USES_SDL2
)
--if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-- target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY})
--endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
-+if (EXECINFO_LIBRARY OR INTL_LIBRARY)
-+ target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY} ${INTL_LIBRARY})
-+endif (EXECINFO_LIBRARY OR INTL_LIBRARY)
-
- if (WIN32)
- target_link_libraries(widelands_ball_of_mud wsock32)
++if (EXECINFO_LIBRARY)
++ target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY})
++endif()
++
+ if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY})
+ endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
diff --git a/srcpkgs/widelands/patches/no-werror.patch b/srcpkgs/widelands/patches/no-werror.patch
new file mode 100644
index 000000000000..205714ef5959
--- /dev/null
+++ b/srcpkgs/widelands/patches/no-werror.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -372,7 +372,7 @@
+ endif()
+
+ if(NOT MSVC)
+- if(CMAKE_BUILD_TYPE STREQUAL "Release")
++ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "None")
+ 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))
diff --git a/srcpkgs/widelands/patches/wordsize.patch b/srcpkgs/widelands/patches/wordsize.patch
new file mode 100644
index 000000000000..537d914f6c5f
--- /dev/null
+++ b/srcpkgs/widelands/patches/wordsize.patch
@@ -0,0 +1,25 @@
+--- a/src/base/macros.h
++++ b/src/base/macros.h
+@@ -28,6 +28,9 @@
+ #endif
+ #endif
+
++/* Used for wordsize only */
++#include <limits.h>
++
+ /* Macros for disabling GCC warnings and errors
+ * From http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html and
+ * slightly modified to remove support entirely for GCC < 4.6 because we'll
+@@ -135,10 +138,10 @@
+ #define PRIuS PRIu32
+ #endif
+ #else
+-#if __WORDSIZE == 64
++#if (ULONG_MAX == 0xffffffffffffffff)
+ #define PRIuS "lu"
+ #else
+-#if defined(__WORDSIZE32_SIZE_ULONG) && __WORDSIZE32_SIZE_ULONG
++#if (ULONG_MAX == 0xffffffff)
+ #define PRIuS "lu"
+ #else
+ #define PRIuS "u"
diff --git a/srcpkgs/widelands/template b/srcpkgs/widelands/template
index 17351e8a0bf7..e9da5eacf79d 100644
--- a/srcpkgs/widelands/template
+++ b/srcpkgs/widelands/template
@@ -3,22 +3,23 @@ pkgname=widelands
# Widelands 1.0 release supercedes beta builds
reverts="21_5 21_4 21_3 21_2 21_1 20_4 20_3 20_2 20_1 19_10 19_9 19_8 19_7 19_6
19_5 19_4 19_3 19_2 19_1 18_5 18_4 18_3 18_2 18_1"
-version=1.0
-revision=4
+version=1.1
+revision=1
build_style=cmake
configure_args="-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
-DOPTION_BUILD_WEBSITE_TOOLS=OFF -DWL_INSTALL_BASEDIR=/usr/share/widelands
- -DWL_INSTALL_DATADIR=/usr/share/widelands"
+ -DWL_INSTALL_DATADIR=/usr/share/widelands -DWL_INSTALL_BINDIR=${DESTDIR}/usr/bin"
hostmakedepends="python3 pkg-config gettext"
-makedepends="boost-devel icu-devel minizip-devel gettext-devel
+makedepends="asio icu-devel minizip-devel gettext-devel
glu-devel glew-devel libcurl-devel SDL2-devel SDL2_gfx-devel SDL2_image-devel
SDL2_net-devel SDL2_mixer-devel SDL2_ttf-devel"
short_desc="Real-time strategy game"
maintainer="travankor <travankor@tuta.io>"
license="GPL-2.0-or-later"
homepage="https://www.widelands.org/"
+changelog="https://raw.githubusercontent.com/widelands/widelands/master/ChangeLog"
distfiles="https://github.com/widelands/widelands/archive/v${version}.tar.gz"
-checksum=1dab0c4062873cc72c5e0558f9e9620b0ef185f1a78923a77c4ce5b9ed76031a
+checksum=6853fcf3daec9b66005691e5bcb00326634baf0985ad89a7e6511502612f6412
replaces="widelands-data>=0"
CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
From 051e94d45a273cede0294ea44d569ccaf5c7e894 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sat, 3 Dec 2022 13:19:22 +0700
Subject: [PATCH 2/2] fixup! widelands: update to 1.1.
---
srcpkgs/widelands/patches/wordsize.patch | 40 +++++++++++-------------
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/srcpkgs/widelands/patches/wordsize.patch b/srcpkgs/widelands/patches/wordsize.patch
index 537d914f6c5f..6b32706746a8 100644
--- a/srcpkgs/widelands/patches/wordsize.patch
+++ b/srcpkgs/widelands/patches/wordsize.patch
@@ -1,25 +1,23 @@
---- a/src/base/macros.h
-+++ b/src/base/macros.h
-@@ -28,6 +28,9 @@
- #endif
- #endif
-
-+/* Used for wordsize only */
-+#include <limits.h>
-+
- /* Macros for disabling GCC warnings and errors
- * From http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html and
- * slightly modified to remove support entirely for GCC < 4.6 because we'll
-@@ -135,10 +138,10 @@
+Index: widelands-1.1/src/base/macros.h
+===================================================================
+--- widelands-1.1.orig/src/base/macros.h
++++ widelands-1.1/src/base/macros.h
+@@ -134,16 +134,8 @@
+ #else
#define PRIuS PRIu32
#endif
- #else
+-#else
-#if __WORDSIZE == 64
-+#if (ULONG_MAX == 0xffffffffffffffff)
- #define PRIuS "lu"
- #else
+-#define PRIuS "lu"
+-#else
-#if defined(__WORDSIZE32_SIZE_ULONG) && __WORDSIZE32_SIZE_ULONG
-+#if (ULONG_MAX == 0xffffffff)
- #define PRIuS "lu"
- #else
- #define PRIuS "u"
+-#define PRIuS "lu"
+-#else
+-#define PRIuS "u"
+-#endif
+-#endif
++#else // !_WIN32
++#define PRIuS "zu"
+ #endif
+
+ #endif // end of include guard: WL_BASE_MACROS_H
next prev parent reply other threads:[~2022-12-03 6:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 11:44 [PR PATCH] " kruceter
2022-11-29 20:30 ` [PR PATCH] [Updated] " kruceter
2022-12-02 17:58 ` [PR REVIEW] " sgn
2022-12-02 17:59 ` sgn
2022-12-02 18:09 ` sgn
2022-12-02 20:26 ` [PR PATCH] [Updated] " kruceter
2022-12-02 20:27 ` kruceter
2022-12-02 20:31 ` [PR REVIEW] " kruceter
2022-12-03 6:18 ` sgn
2022-12-03 6:20 ` sgn [this message]
2022-12-03 6:44 ` [PR PATCH] [Closed]: " sgn
2022-12-03 6:44 ` sgn
2022-12-03 6:45 ` sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221203062033.AOgNYoJG54en7OcKdPqNGiADUcDjVTFSb-RMw-EEG9Q@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).