pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

widelands: Clean up patches to push upstream.



Module Name:	pkgsrc-wip
Committed By:	Paul Ripke <stix%stix.id.au@localhost>
Pushed By:	stix
Date:		Sun Jul 14 16:16:22 2024 +1000
Changeset:	746feda49f652d1028ea285aad1c4f6c01f31dbc

Modified Files:
	widelands/distinfo
	widelands/patches/patch-CMakeLists.txt
	widelands/patches/patch-src_base_i18n.h
	widelands/patches/patch-src_graphic_text_textstream.cc
Removed Files:
	widelands/patches/patch-src_scripting_lua__globals.cc

Log Message:
widelands: Clean up patches to push upstream.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=746feda49f652d1028ea285aad1c4f6c01f31dbc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 widelands/distinfo                                 |   7 +-
 widelands/patches/patch-CMakeLists.txt             |   9 --
 widelands/patches/patch-src_base_i18n.h            |   2 -
 .../patches/patch-src_graphic_text_textstream.cc   |  36 +++----
 .../patches/patch-src_scripting_lua__globals.cc    | 104 ---------------------
 5 files changed, 21 insertions(+), 137 deletions(-)

diffs:
diff --git a/widelands/distinfo b/widelands/distinfo
index 406199f5bb..398b8cb69a 100644
--- a/widelands/distinfo
+++ b/widelands/distinfo
@@ -3,15 +3,14 @@ $NetBSD: distinfo,v 1.8 2021/10/26 10:44:30 nia Exp $
 BLAKE2s (widelands/v1.2.tar.gz) = ff2be3b1449b2ec987938fd039584861295334cafe3f59312164a886908c4c45
 SHA512 (widelands/v1.2.tar.gz) = 4e0c7c02c4bdb2806d67a07425d7a17b2867416c994e18f8511b45087e80645a3e602ee168f3f8640434b47eff25d9758f12d2a677b454d95855d8173e9dc8c8
 Size (widelands/v1.2.tar.gz) = 457973371 bytes
-SHA1 (patch-CMakeLists.txt) = 594abedec6cd2449382db3e63877f1d2c56df049
+SHA1 (patch-CMakeLists.txt) = e13b1a8f45d4a3c650476ab4cd0ab45c6101394d
 SHA1 (patch-src_CMakeLists.txt) = f833ae4b06e81cc7a147e1e5a03c02fad92370c1
 SHA1 (patch-src_base_i18n.cc) = 785cdfaca59f929de14dde96386f9e9cfca27e21
-SHA1 (patch-src_base_i18n.h) = 4e9617d13a0afa5b17a0609a092d8f71d051e6af
-SHA1 (patch-src_graphic_text_textstream.cc) = ae297b11c8e782cf48f915929e3bc542b9ddbf65
+SHA1 (patch-src_base_i18n.h) = 687296e3e654e3ed09e648a83571e282ed251bfb
+SHA1 (patch-src_graphic_text_textstream.cc) = 5ea49e63daf5b573d0257f53730d4e547c0b7fe4
 SHA1 (patch-src_network_bufferedconnection.cc) = b0d33bd578b408e969d5ebc591489825d9744a6c
 SHA1 (patch-src_network_nethost.cc) = b35e2b1d9b776ec5a9113ecf1031627b0933b712
 SHA1 (patch-src_network_network.cc) = 3f2b24533e3657103c6c05d2a425fb7850e35f4f
 SHA1 (patch-src_network_network.h) = 1f4ce455e2de0e91e9760e13df8fbba68a58ab20
 SHA1 (patch-src_network_network__lan__promotion.cc) = 5cea8998d422c3645e032d212847b40c121a21ec
-SHA1 (patch-src_scripting_lua__globals.cc) = 246f1d4425374025fc0a23c81381cff43fd40f4f
 SHA1 (patch-xdg_CMakeLists.txt) = ce08eacbfbf9d32b6c72e411538adb0472d58851
diff --git a/widelands/patches/patch-CMakeLists.txt b/widelands/patches/patch-CMakeLists.txt
index ee0e16f0dc..ec2d9b7148 100644
--- a/widelands/patches/patch-CMakeLists.txt
+++ b/widelands/patches/patch-CMakeLists.txt
@@ -4,15 +4,6 @@ Support NetBSD.
 
 --- CMakeLists.txt.orig	2024-03-28 10:12:05.000000000 +0000
 +++ CMakeLists.txt
-@@ -94,7 +94,7 @@ message(STATUS "Picking up default CXX f
-     - CMAKE_CXX_FLAGS_RELEASE='${CMAKE_CXX_FLAGS_RELEASE}'
-     - CMAKE_CXX_FLAGS_DEBUG='${CMAKE_CXX_FLAGS_DEBUG}'")
- 
--SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
-+SET (CMAKE_MODULE_PATH "/home/tmp/pkgwrk/games/widelands/work/.buildlink/cmake-Modules" "/home/tmp/pkgwrk/games/widelands/work/.buildlink/cmake-Modules" "/home/tmp/pkgwrk/games/widelands/work/.buildlink/cmake-Modules" "/home/tmp/pkgwrk/games/widelands/work/.buildlink/cmake-Modules" ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
- 
- if (WIN32)
-   link_libraries(wsock32 ws2_32 bcrypt)
 @@ -146,6 +146,7 @@ add_definitions(-DASIO_STANDALONE)
  
  if (APPLE OR WIN32 OR
diff --git a/widelands/patches/patch-src_base_i18n.h b/widelands/patches/patch-src_base_i18n.h
index 1ccbb7fad8..fe0815a6c1 100644
--- a/widelands/patches/patch-src_base_i18n.h
+++ b/widelands/patches/patch-src_base_i18n.h
@@ -2,8 +2,6 @@ $NetBSD$
 
 Define gettext_noop if missing.
 
-Use C linking for the *gettext wrappers.
-
 --- src/base/i18n.h.orig	2024-03-28 10:12:05.000000000 +0000
 +++ src/base/i18n.h
 @@ -52,6 +52,10 @@
diff --git a/widelands/patches/patch-src_graphic_text_textstream.cc b/widelands/patches/patch-src_graphic_text_textstream.cc
index c2f132c29b..f16da113c7 100644
--- a/widelands/patches/patch-src_graphic_text_textstream.cc
+++ b/widelands/patches/patch-src_graphic_text_textstream.cc
@@ -1,22 +1,22 @@
 $NetBSD$
 
-Replace isspace() on NetBSD, else it breaks UTF-8 handling.
+Cast argument to isspace to unsigned char, as required by POSIX, else this
+breaks with UTF-8 chars on NetBSD.
 
---- src/graphic/text/textstream.cc.orig	2024-04-11 05:38:21.326518028 +0000
+--- src/graphic/text/textstream.cc.orig	2024-03-28 10:12:05.000000000 +0000
 +++ src/graphic/text/textstream.cc
-@@ -21,6 +21,15 @@
- #include "base/string.h"
- #include "graphic/text/rt_errors_impl.h"
- 
-+#ifdef __NetBSD__
-+static int isspace_override(int c) {
-+	if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
-+		return 1;
-+	return 0;
-+}
-+#define isspace(c) isspace_override(c)
-+#endif
-+
- namespace RT {
- 
- struct EndOfTextImpl : public EndOfText {
+@@ -49,12 +49,12 @@ void TextStream::consume(size_t cnt) {
+  * r* means skip_ws starting from the back of the string
+  */
+ void TextStream::skip_ws() {
+-	while (pos_ < end_ && (isspace(text_[pos_]) != 0)) {
++	while (pos_ < end_ && (isspace((unsigned char)text_[pos_]) != 0)) {
+ 		consume(1);
+ 	}
+ }
+ void TextStream::rskip_ws() {
+-	while (pos_ < end_ && (isspace(text_[end_ - 1]) != 0)) {
++	while (pos_ < end_ && (isspace((unsigned char)text_[end_ - 1]) != 0)) {
+ 		--end_;
+ 	}
+ }
diff --git a/widelands/patches/patch-src_scripting_lua__globals.cc b/widelands/patches/patch-src_scripting_lua__globals.cc
deleted file mode 100644
index 8a9a0115d6..0000000000
--- a/widelands/patches/patch-src_scripting_lua__globals.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-$NetBSD$
-
-Use C linking for Lua-called functions.
-
---- src/scripting/lua_globals.cc.orig	2024-03-28 10:12:05.000000000 +0000
-+++ src/scripting/lua_globals.cc
-@@ -73,7 +73,7 @@ files name.
- */
- // The 'b' in bformat used to stand for "boost", which we no longer use, but
- // renaming the Lua function would break backwards compatibility.
--static int L_string_bformat(lua_State* L) {
-+extern "C" int L_string_bformat(lua_State* L) {
- 	try {
- 		format_impl::ArgsVector fmt_args;
- 		format_impl::ArgsPair arg;
-@@ -151,7 +151,7 @@ static std::map<const lua_State*, std::v
-       :type domain: :class:`string`
-       :returns: :const:`nil`
- */
--static int L_push_textdomain(lua_State* L) {
-+extern "C" int L_push_textdomain(lua_State* L) {
- 	textdomains[L].push_back(
- 	   std::make_pair(luaL_checkstring(L, 1), lua_gettop(L) > 1 && luaL_checkboolean(L, 2)));
- 	return 0;
-@@ -165,7 +165,7 @@ static int L_push_textdomain(lua_State* 
- 
-       :returns: :const:`nil`
- */
--static int L_pop_textdomain(lua_State* L) {
-+extern "C" int L_pop_textdomain(lua_State* L) {
- 	textdomains.at(L).pop_back();
- 	return 0;
- }
-@@ -234,7 +234,7 @@ void write_textdomain_stack(FileWrite& f
- */
- CLANG_DIAG_RESERVED_IDENTIFIER_OFF
- // NOLINTNEXTLINE(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
--static int L__(lua_State* L) {
-+extern "C" int L__(lua_State* L) {
- 	CLANG_DIAG_RESERVED_IDENTIFIER_ON
- 	if (const TextdomainInfo* td = current_textdomain(L)) {
- 		if (td->second) {
-@@ -266,7 +266,7 @@ static int L__(lua_State* L) {
- 
-    :returns: The translated string.
- */
--static int L_ngettext(lua_State* L) {
-+extern "C" int L_ngettext(lua_State* L) {
- 	//  S: msgid msgid_plural n
- 	const char* msgid = luaL_checkstring(L, 1);
- 	const char* msgid_plural = luaL_checkstring(L, 2);
-@@ -303,7 +303,7 @@ static int L_ngettext(lua_State* L) {
- 
-    :returns: The translated string.
- */
--static int L_pgettext(lua_State* L) {
-+extern "C" int L_pgettext(lua_State* L) {
- 	//  S: msgctxt msgid
- 	const char* msgctxt = luaL_checkstring(L, 1);
- 	const char* msgid = luaL_checkstring(L, 2);
-@@ -340,7 +340,7 @@ static int L_pgettext(lua_State* L) {
- 
-    :returns: The translated string.
- */
--static int L_npgettext(lua_State* L) {
-+extern "C" int L_npgettext(lua_State* L) {
- 	//  S: msgctxt msgid
- 	const char* msgctxt = luaL_checkstring(L, 1);
- 	const char* msgid = luaL_checkstring(L, 2);
-@@ -375,7 +375,7 @@ static int L_npgettext(lua_State* L) {
-       :arg script: The filename relative to the root of the data directory.
-       :returns: :const:`nil`
- */
--static int L_include(lua_State* L) {
-+extern "C" int L_include(lua_State* L) {
- 	const std::string script = luaL_checkstring(L, -1);
- 	// remove our arguments so that the executed script gets a clear stack
- 	lua_pop(L, 1);
-@@ -398,7 +398,7 @@ static int L_include(lua_State* L) {
-    Returns an integer value representing the number of milliseconds since the SDL library
-    initialized.
- */
--static int L_ticks(lua_State* L) {
-+extern "C" int L_ticks(lua_State* L) {
- 	lua_pushinteger(L, SDL_GetTicks());
- 	return 1;
- }
-@@ -411,14 +411,14 @@ static int L_ticks(lua_State* L) {
-    "1.2~git26354 (4ba897c@master)" (development for 1.2) or
-    "build-16[debug]" (old, before version 1.0).
- */
--static int L_get_build_id(lua_State* L) {
-+extern "C" int L_get_build_id(lua_State* L) {
- 	lua_pushstring(L, build_id());
- 	return 1;
- }
- 
- // set_textdomain() was deprecated before v1.0, removed in v1.2
- // TODO(tothxa): Remove if the position in kPersistentGlobals can be filled with a new function?
--static int L_set_textdomain(lua_State*) {
-+extern "C" int L_set_textdomain(lua_State*) {
- 	throw LuaError("set_textdomain() is no longer supported");
- }
- 


Home | Main Index | Thread Index | Old Index