[packages/openttd] upstream patch to fix linking with icu 76

atler atler at pld-linux.org
Tue Jan 21 19:21:35 CET 2025


commit c02e290f7f93ce2754e856e6f20e58a409f0b2eb
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Jan 21 19:00:48 2025 +0100

    upstream patch to fix linking with icu 76

 icu76.patch  | 31 +++++++++++++++++++++++++++++++
 openttd.spec |  4 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/openttd.spec b/openttd.spec
index 42790ce..a3bfdd4 100644
--- a/openttd.spec
+++ b/openttd.spec
@@ -10,6 +10,7 @@ Source0:	https://cdn.openttd.org/openttd-releases/%{version}/%{name}-%{version}-
 Source1:	%{name}.desktop
 Source2:	%{name}-server.desktop
 Patch0:		%{name}-create-grf.patch
+Patch1:		icu76.patch
 URL:		http://www.openttd.org/
 BuildRequires:	SDL2-devel
 BuildRequires:	fontconfig-devel
@@ -74,7 +75,8 @@ graficzny klient OpenTTD również zawiera taką funkcjonalność.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch -P0 -p1
+%patch -P1 -p1
 
 # Let's pldize
 find src/lang/ -type f -exec %{__sed} -i 's/:Unix/:PLD Linux/' \{\} \;
diff --git a/icu76.patch b/icu76.patch
new file mode 100644
index 0000000..f187bf7
--- /dev/null
+++ b/icu76.patch
@@ -0,0 +1,31 @@
+From 14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e Mon Sep 17 00:00:00 2001
+From: fundawang <fundawang at yeah.net>
+Date: Tue, 5 Nov 2024 19:12:34 +0800
+Subject: [PATCH] Fix: build with icu >= 76 where icu-i18n and icu-uc become
+ separated (#13048)
+
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 137eb7d0f8ce9..2f0248047506a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -152,7 +152,7 @@ if(NOT OPTION_DEDICATED)
+                 find_package(Fontconfig)
+             endif()
+             find_package(Harfbuzz)
+-            find_package(ICU OPTIONAL_COMPONENTS i18n)
++            find_package(ICU OPTIONAL_COMPONENTS i18n uc)
+         endif()
+     endif()
+ endif()
+@@ -331,6 +331,7 @@ if(NOT OPTION_DEDICATED)
+     link_package(Fontconfig TARGET Fontconfig::Fontconfig)
+     link_package(Harfbuzz TARGET harfbuzz::harfbuzz)
+     link_package(ICU_i18n)
++    link_package(ICU_uc)
+ 
+     if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
+         # SDL2 dynamically loads OpenGL if needed, so do not link to OpenGL when
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openttd.git/commitdiff/c02e290f7f93ce2754e856e6f20e58a409f0b2eb



More information about the pld-cvs-commit mailing list