Skip to content

Commit 2fc13ca

Browse files
committed
build: update gettext and fix QEMU compiler error
Proper fix for the new compiler errors introduced in Xcode 15.3.
1 parent 2724075 commit 2fc13ca

File tree

5 files changed

+117
-87
lines changed

5 files changed

+117
-87
lines changed

patches/gettext-0.21.patch

-85
This file was deleted.

patches/gettext-0.22.5.patch

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
diff --color -Naur a/libtextstyle/lib/get_ppid_of.c b/libtextstyle/lib/get_ppid_of.c
2+
--- a/libtextstyle/lib/get_ppid_of.c 2024-02-21 02:45:23
3+
+++ b/libtextstyle/lib/get_ppid_of.c 2024-03-30 20:38:55
4+
@@ -33,6 +33,8 @@
5+
#endif
6+
7+
#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
8+
+# include <TargetConditionals.h>
9+
+# if TARGET_OS_OSX
10+
/* Get MAC_OS_X_VERSION_MIN_REQUIRED, MAC_OS_X_VERSION_MAX_ALLOWED.
11+
The version at runtime satisfies
12+
MAC_OS_X_VERSION_MIN_REQUIRED <= version <= MAC_OS_X_VERSION_MAX_ALLOWED. */
13+
@@ -46,6 +48,7 @@
14+
extern int proc_pidinfo (int, int, uint64_t, void *, int) WEAK_IMPORT_ATTRIBUTE;
15+
# endif
16+
# endif
17+
+# endif
18+
#endif
19+
20+
#if defined _AIX /* AIX */
21+
@@ -238,6 +241,7 @@
22+
#endif
23+
24+
#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
25+
+# if TARGET_OS_OSX
26+
# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
27+
28+
/* Mac OS X >= 10.7 has PROC_PIDT_SHORTBSDINFO. */
29+
@@ -271,6 +275,7 @@
30+
}
31+
# endif
32+
33+
+# endif
34+
# endif
35+
#endif
36+
37+
diff --color -Naur a/libtextstyle/lib/get_progname_of.c b/libtextstyle/lib/get_progname_of.c
38+
--- a/libtextstyle/lib/get_progname_of.c 2024-02-21 02:45:23
39+
+++ b/libtextstyle/lib/get_progname_of.c 2024-03-30 20:39:22
40+
@@ -41,6 +41,8 @@
41+
#endif
42+
43+
#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
44+
+# include <TargetConditionals.h>
45+
+# if TARGET_OS_OSX
46+
/* Get MAC_OS_X_VERSION_MIN_REQUIRED, MAC_OS_X_VERSION_MAX_ALLOWED.
47+
The version at runtime satisfies
48+
MAC_OS_X_VERSION_MIN_REQUIRED <= version <= MAC_OS_X_VERSION_MAX_ALLOWED. */
49+
@@ -54,6 +56,7 @@
50+
extern int proc_pidinfo (int, int, uint64_t, void *, int) WEAK_IMPORT_ATTRIBUTE;
51+
# endif
52+
# endif
53+
+# endif
54+
#endif
55+
56+
#if defined _AIX /* AIX */
57+
@@ -278,6 +281,7 @@
58+
#endif
59+
60+
#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
61+
+# if TARGET_OS_OSX
62+
# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
63+
64+
/* Mac OS X >= 10.7 has PROC_PIDT_SHORTBSDINFO. */
65+
@@ -311,6 +315,7 @@
66+
}
67+
# endif
68+
69+
+# endif
70+
# endif
71+
#endif
72+

patches/qemu-7.2.0-utm.patch

+43
Original file line numberDiff line numberDiff line change
@@ -7011,3 +7011,46 @@ index 9f6e6279d9..b6cda6e00b 100644
70117011
--
70127012
2.41.0
70137013

7014+
From c03d7e35473b57544523ba19975023332567a63d Mon Sep 17 00:00:00 2001
7015+
From: osy <[email protected]>
7016+
Date: Sat, 30 Mar 2024 20:15:01 -0700
7017+
Subject: [PATCH] egl-helpers: incorrect type for native_display
7018+
7019+
---
7020+
ui/egl-helpers.c | 6 +++---
7021+
1 file changed, 3 insertions(+), 3 deletions(-)
7022+
7023+
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
7024+
index 0df9dd8fd5..0e9a3e469d 100644
7025+
--- a/ui/egl-helpers.c
7026+
+++ b/ui/egl-helpers.c
7027+
@@ -505,7 +505,7 @@ static int qemu_egl_init_dpy_platform(EGLNativeDisplayType native,
7028+
PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplayEXT =
7029+
(void *) eglGetProcAddress("eglGetPlatformDisplayEXT");
7030+
if (getPlatformDisplayEXT && platform != 0) {
7031+
- dpy = getPlatformDisplayEXT(platform, native, NULL);
7032+
+ dpy = getPlatformDisplayEXT(platform, (void *)native, NULL);
7033+
}
7034+
}
7035+
7036+
@@ -526,7 +526,7 @@ static int qemu_egl_init_dpy_platform(EGLNativeDisplayType native,
7037+
7038+
int qemu_egl_init_dpy_surfaceless(DisplayGLMode mode)
7039+
{
7040+
- return qemu_egl_init_dpy_platform(NULL, EGL_PLATFORM_SURFACELESS_MESA, mode);
7041+
+ return qemu_egl_init_dpy_platform(EGL_DEFAULT_DISPLAY, EGL_PLATFORM_SURFACELESS_MESA, mode);
7042+
}
7043+
7044+
#if defined(CONFIG_X11) || defined(CONFIG_GBM)
7045+
@@ -555,7 +555,7 @@ int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode)
7046+
7047+
int qemu_egl_init_dpy_angle(DisplayGLMode mode)
7048+
{
7049+
- return qemu_egl_init_dpy_platform(NULL, EGL_PLATFORM_ANGLE_ANGLE, mode);
7050+
+ return qemu_egl_init_dpy_platform(EGL_DEFAULT_DISPLAY, EGL_PLATFORM_ANGLE_ANGLE, mode);
7051+
}
7052+
7053+
#endif
7054+
--
7055+
2.41.0
7056+

patches/sources

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PKG_CONFIG_SRC="https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar
66
# Source files for qemu
77
FFI_SRC="https://sourceware.org/ftp/libffi/libffi-3.3.tar.gz"
88
ICONV_SRC="https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz"
9-
GETTEXT_SRC="https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.gz"
9+
GETTEXT_SRC="https://ftp.gnu.org/gnu/gettext/gettext-0.22.5.tar.gz"
1010
PNG_SRC="https://ftp.osuosl.org/pub/blfs/conglomeration/libpng/libpng-1.6.37.tar.xz"
1111
JPEG_TURBO_SRC="https://ftp.osuosl.org/pub/blfs/conglomeration/libjpeg-turbo/libjpeg-turbo-1.5.3.tar.gz"
1212
GLIB_SRC="https://download.gnome.org/sources/glib/2.69/glib-2.69.0.tar.xz"

scripts/build_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ export STRIP
760760
export PREFIX
761761

762762
# Flags
763-
CFLAGS="$CFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -F$PREFIX/Frameworks $CFLAGS_MINVER $CFLAGS_TARGET -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion"
763+
CFLAGS="$CFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -F$PREFIX/Frameworks $CFLAGS_MINVER $CFLAGS_TARGET"
764764
CPPFLAGS="$CPPFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -F$PREFIX/Frameworks $CFLAGS_MINVER $CFLAGS_TARGET"
765765
CXXFLAGS="$CXXFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -F$PREFIX/Frameworks $CFLAGS_MINVER $CFLAGS_TARGET"
766766
OBJCFLAGS="$OBJCFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -F$PREFIX/Frameworks $CFLAGS_MINVER $CFLAGS_TARGET"

0 commit comments

Comments
 (0)