apply-patches.sh: symlink graphics libs to local forks (latest versions)

The 5 graphics libraries (freetype2, glib, harfbuzz, pango, cairo)
now use their local fork versions instead of the mainline
recipe versions:
- freetype2: 2.13.3 → 2.14.3
- glib: 2.87.0 → 2.89.1
- harfbuzz: 11.0.1 → 14.2.1
- pango: 1.56.3 → 1.56.4
- cairo: 1.18.4 (current)

Mainline recipe.toml files removed via symlink replacement.
Each local fork recipe tracks the latest stable release.
This commit is contained in:
2026-07-11 15:37:03 +03:00
parent 344de21bb6
commit f28d633284
14 changed files with 12 additions and 474 deletions
+7
View File
@@ -179,6 +179,13 @@ mkdir -p recipes/libs
symlink "../../local/recipes/libs/libqrencode" "recipes/libs/libqrencode"
symlink "../../local/recipes/libs/libudev" "recipes/libs/libudev"
symlink "../../local/recipes/libs/zbus" "recipes/libs/zbus"
# Graphics stack — fork versions are maintained at the latest in local/recipes/libs/
symlink "../../local/recipes/libs/freetype2" "recipes/libs/freetype2"
symlink "../../local/recipes/libs/glib" "recipes/libs/glib"
symlink "../../local/recipes/libs/libxkbcommon" "recipes/libs/libxkbcommon"
symlink "../../local/recipes/libs/harfbuzz" "recipes/libs/harfbuzz"
symlink "../../local/recipes/libs/pango" "recipes/libs/pango"
symlink "../../local/recipes/libs/cairo" "recipes/libs/cairo"
# System
mkdir -p recipes/system
+1
View File
@@ -0,0 +1 @@
../../local/recipes/libs/cairo
-35
View File
@@ -1,35 +0,0 @@
[source]
tar = "https://www.cairographics.org/releases/cairo-1.18.4.tar.xz"
blake3 = "b9fa14e02f85ec4e72396c62236c98502d04dbbdf8daf01ab9557a1c7aa7106e"
patches = ["redox.patch"]
[build]
dependencies = [
"expat",
"freetype2",
"fontconfig",
"gettext",
"glib",
"libffi",
"libiconv",
"libpng",
"libpthread-stubs",
"libx11",
"libxau",
"libxcb",
"libxext",
"pcre2",
"pixman",
"x11proto",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
#TODO: fix mutex implementation
#TODO: why are math defines missing?
CFLAGS="${CFLAGS} -DCAIRO_NO_MUTEX=1 -DM_SQRT2=1.41421356237309504880 -DM_LN2=0.69314718055994530942"
cookbook_meson \
-Dxlib-xcb=enabled \
-Dtests=disabled
"""
-50
View File
@@ -1,50 +0,0 @@
diff -ruwN cairo-1.18.4/meson.build source/meson.build
--- cairo-1.18.4/meson.build 2025-03-08 05:35:35.000000000 -0700
+++ source/meson.build 2025-05-04 18:07:04.594213814 -0600
@@ -440,13 +440,13 @@
if feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1
xcbshm_dep = dependency('xcb-shm', required: get_option('xcb'))
if xcbshm_dep.found()
- feature_conf.set('CAIRO_HAS_XCB_SHM_FUNCTIONS', 1)
- deps += [xcbshm_dep]
- built_features += [{
- 'name': 'cairo-xcb-shm',
- 'description': 'XCB/SHM functions',
- 'deps': [xcbshm_dep],
- }]
+ #feature_conf.set('CAIRO_HAS_XCB_SHM_FUNCTIONS', 1)
+ #deps += [xcbshm_dep]
+ #built_features += [{
+ # 'name': 'cairo-xcb-shm',
+ # 'description': 'XCB/SHM functions',
+ # 'deps': [xcbshm_dep],
+ #}]
endif
endif
diff -ruwN cairo-1.18.4/perf/Makefile.in source/perf/Makefile.in
--- cairo-1.18.4/perf/Makefile.in 1969-12-31 17:00:00.000000000 -0700
+++ source/perf/Makefile.in 2025-05-01 12:52:11.400963345 -0600
@@ -0,0 +1,3 @@
+all:
+
+install:
diff -ruwN cairo-1.18.4/src/cairo-ps-surface.c source/src/cairo-ps-surface.c
--- cairo-1.18.4/src/cairo-ps-surface.c 2025-03-08 05:35:35.000000000 -0700
+++ source/src/cairo-ps-surface.c 2025-05-04 18:08:43.821264417 -0600
@@ -102,7 +102,7 @@
#define DEBUG_FALLBACK(s)
#endif
-#ifndef HAVE_CTIME_R
+#if !defined(HAVE_CTIME_R) && !defined(__redox__)
static char *ctime_r(const time_t *timep, char *buf)
{
(void)buf;
diff -ruwN cairo-1.18.4/test/Makefile.in source/test/Makefile.in
--- cairo-1.18.4/test/Makefile.in 1969-12-31 17:00:00.000000000 -0700
+++ source/test/Makefile.in 2025-05-01 12:52:11.400963345 -0600
@@ -0,0 +1,3 @@
+all:
+
+install:
+1
View File
@@ -0,0 +1 @@
../../local/recipes/libs/freetype2
-14
View File
@@ -1,14 +0,0 @@
[source]
tar = "https://sourceforge.net/projects/freetype/files/freetype2/2.13.3/freetype-2.13.3.tar.xz/download"
blake3 = "07a01894ccdb584943ce817b57341a8595ce9a92bfaa77c602ec4757dfabd5e2"
[build]
template = "custom"
dependencies = [
"libpng",
"zlib"
]
script = """
DYNAMIC_STATIC_INIT
cookbook_meson
"""
+1
View File
@@ -0,0 +1 @@
../../local/recipes/libs/glib
-23
View File
@@ -1,23 +0,0 @@
[source]
tar = "https://download.gnome.org/sources/glib/2.87/glib-2.87.0.tar.xz"
blake3 = "26b77ae24bc02f85d1c6742fe601167b056085f117cda70da7b805cefa6195e9"
patches = [
"redox.patch",
]
[build]
template = "custom"
dependencies = [
"gettext",
"libffi",
"libiconv",
"pcre2",
"zlib",
]
script = """
DYNAMIC_INIT
cookbook_meson \
-Ddefault_library=static \
-Dxattr=false \
-Dc_args="['-I${COOKBOOK_SYSROOT}/include','-Wno-error=implicit-function-declaration']"
"""
-275
View File
@@ -1,275 +0,0 @@
diff -ruwN glib-2.87.0/fuzzing/fuzz_resolver.c source/fuzzing/fuzz_resolver.c
--- glib-2.87.0/fuzzing/fuzz_resolver.c 2025-11-03 19:42:10.000000000 +0700
+++ source/fuzzing/fuzz_resolver.c 2026-02-19 13:53:45.717898735 +0700
@@ -29,7 +29,7 @@
gint rrtype)
{
/* g_resolver_records_from_res_query() is only available on Unix */
-#ifdef G_OS_UNIX
+#if defined(G_OS_UNIX) && !defined(__redox__)
GList *record_list = NULL;
/* Data too long? */
diff -ruwN glib-2.87.0/gio/gcredentialsprivate.h source/gio/gcredentialsprivate.h
--- glib-2.87.0/gio/gcredentialsprivate.h 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/gcredentialsprivate.h 2026-02-19 13:53:45.717995965 +0700
@@ -104,7 +104,7 @@
*/
#undef G_CREDENTIALS_HAS_PID
-#ifdef __linux__
+#if defined(__linux__) || defined(__redox__)
#define G_CREDENTIALS_SUPPORTED 1
#define G_CREDENTIALS_USE_LINUX_UCRED 1
#define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_LINUX_UCRED
diff -ruwN glib-2.87.0/gio/glocalfile.c source/gio/glocalfile.c
--- glib-2.87.0/gio/glocalfile.c 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/glocalfile.c 2026-02-19 13:53:45.718204283 +0700
@@ -47,6 +47,10 @@
#include <sys/mount.h>
#endif
+#if defined(__redox__)
+#undef AT_FDCWD
+#endif
+
#ifndef O_BINARY
#define O_BINARY 0
#endif
diff -ruwN glib-2.87.0/gio/gnetworking.h.in source/gio/gnetworking.h.in
--- glib-2.87.0/gio/gnetworking.h.in 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/gnetworking.h.in 2026-02-19 13:53:45.718380100 +0700
@@ -40,13 +40,17 @@
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#if !defined(__redox__)
#include <resolv.h>
+#endif
#include <sys/socket.h>
#include <sys/un.h>
#include <net/if.h>
#include <arpa/inet.h>
+#if !defined(__redox__)
#include <arpa/nameser.h>
+#endif
@NAMESER_COMPAT_INCLUDE@
#ifndef __GI_SCANNER__
diff -ruwN glib-2.87.0/gio/gsocket.c source/gio/gsocket.c
--- glib-2.87.0/gio/gsocket.c 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/gsocket.c 2026-03-05 11:29:00.807439664 +0700
@@ -3133,7 +3133,8 @@
{
int errsv = get_socket_errno ();
- if (errsv == EINTR)
+ // TODO: uds connect() in redox is blocking
+ if (errsv == EINTR || errsv == EAGAIN)
continue;
#ifndef G_OS_WIN32
diff -ruwN glib-2.87.0/gio/gthreadedresolver.c source/gio/gthreadedresolver.c
--- glib-2.87.0/gio/gthreadedresolver.c 2025-11-03 05:42:10.000000000 -0700
+++ source/gio/gthreadedresolver.c 2026-01-15 18:35:07.059664185 -0700
@@ -698,7 +698,7 @@
}
-#if defined(G_OS_UNIX)
+#if defined(G_OS_UNIX) && !defined(__redox__)
#if defined __BIONIC__ && !defined BIND_4_COMPAT
/* Copy from bionic/libc/private/arpa_nameser_compat.h
@@ -1393,7 +1393,11 @@
{
GList *records;
-#if defined(G_OS_UNIX)
+#if defined(__redox__)
+ g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
+ _("No support for resolving “%s” on redox"), rrname);
+ return NULL;
+#elif defined(G_OS_UNIX)
gint len = 512;
gint herr;
GByteArray *answer;
diff -ruwN glib-2.87.0/gio/gunixconnection.c source/gio/gunixconnection.c
--- glib-2.87.0/gio/gunixconnection.c 2025-11-03 05:42:10.000000000 -0700
+++ source/gio/gunixconnection.c 2026-01-15 18:35:07.059895298 -0700
@@ -496,7 +496,7 @@
GSocket *socket;
gint n;
gssize num_bytes_read;
-#ifdef __linux__
+#if defined(__linux__) || defined(__redox__)
gboolean turn_off_so_passcreds;
#endif
@@ -512,7 +512,7 @@
* already. We also need to turn it off when we're done. See
* #617483 for more discussion.
*/
-#ifdef __linux__
+#if defined(__linux__) || defined(__redox__)
{
gint opt_val;
@@ -626,7 +626,7 @@
out:
-#ifdef __linux__
+#if defined(__linux__) || defined(__redox__)
if (turn_off_so_passcreds)
{
if (!g_socket_set_option (socket,
diff -ruwN glib-2.87.0/gio/gunixmounts.c source/gio/gunixmounts.c
--- glib-2.87.0/gio/gunixmounts.c 2025-11-03 05:42:10.000000000 -0700
+++ source/gio/gunixmounts.c 2026-01-15 18:35:07.060167680 -0700
@@ -1114,7 +1114,7 @@
}
/* QNX {{{2 */
-#elif defined (HAVE_QNX)
+#elif defined (HAVE_QNX) || defined(__redox__)
static char *
get_mtab_monitor_file (void)
@@ -1758,6 +1758,28 @@
return NULL;
}
+#elif defined(__redox__)
+
+static GUnixMountPoint **
+_g_unix_mount_points_get_from_file (const char *table_path,
+ uint64_t *time_read_out,
+ size_t *n_points_out)
+{
+ /* Not supported on Redox. */
+ if (time_read_out != NULL)
+ *time_read_out = 0;
+ if (n_points_out != NULL)
+ *n_points_out = 0;
+ return NULL;
+}
+
+static GList *
+_g_get_unix_mount_points (void)
+{
+ /* Not supported on Redox. */
+ return NULL;
+}
+
/* Common code {{{2 */
#else
#error No g_get_mount_table() implementation for system
diff -ruwN glib-2.87.0/gio/meson.build source/gio/meson.build
--- glib-2.87.0/gio/meson.build 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/meson.build 2026-02-19 13:53:45.718994535 +0700
@@ -18,7 +18,7 @@
gnetworking_h_nameser_compat_include = ''
-if host_system not in ['windows', 'android']
+if host_system not in ['windows', 'android', 'redox']
# Don't check for C_IN on Android since it does not define it in public
# headers, we define it ourselves wherever necessary
if not cc.compiles('''#include <sys/types.h>
@@ -39,7 +39,7 @@
network_libs = [ ]
network_args = [ ]
-if host_system != 'windows'
+if host_system not in ['windows', 'redox']
# res_query()
res_query_test = '''#include <resolv.h>
int main (int argc, char ** argv) {
diff -ruwN glib-2.87.0/gio/tests/gdbus-server-auth.c source/gio/tests/gdbus-server-auth.c
--- glib-2.87.0/gio/tests/gdbus-server-auth.c 2025-11-03 19:42:10.000000000 +0700
+++ source/gio/tests/gdbus-server-auth.c 2026-02-19 13:53:45.719091042 +0700
@@ -243,7 +243,7 @@
}
else /* We should prefer EXTERNAL whenever it is allowed. */
{
-#ifdef __linux__
+#if defined(__linux__) || defined(__redox__)
/* We know that both GDBus and libdbus support full credentials-passing
* on Linux. */
g_assert_cmpint (uid, ==, getuid ());
diff -ruwN glib-2.87.0/glib/glib-unix.c source/glib/glib-unix.c
--- glib-2.87.0/glib/glib-unix.c 2025-11-03 19:42:10.000000000 +0700
+++ source/glib/glib-unix.c 2026-02-19 13:53:45.719219012 +0700
@@ -74,6 +74,10 @@
#include <sys/user.h>
#endif /* defined (__FreeBSD__ )*/
+#if defined(__redox__)
+#include <sys/redox.h>
+#endif
+
G_STATIC_ASSERT (sizeof (ssize_t) == GLIB_SIZEOF_SSIZE_T);
G_STATIC_ASSERT (G_ALIGNOF (gssize) == G_ALIGNOF (ssize_t));
G_STATIC_ASSERT (G_SIGNEDNESS_OF (ssize_t) == 1);
@@ -1004,6 +1008,20 @@
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOSYS,
"g_unix_fd_query_path() not supported on HURD");
return NULL;
+#elif defined(__redox__)
+ char file_path[PATH_MAX] = {0};
+
+ if (redox_fpath (fd, file_path, PATH_MAX) < 0)
+ {
+ int errsv = errno;
+
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errsv),
+ "Error querying file information for FD %d: %s",
+ fd, g_strerror (errsv));
+ return NULL;
+ }
+
+ return g_strdup (file_path);
#else
#error "g_unix_fd_query_path() not supported on this platform"
#endif
diff -ruwN glib-2.87.0/glib/gstrfuncs.c source/glib/gstrfuncs.c
--- glib-2.87.0/glib/gstrfuncs.c 2025-11-03 19:42:10.000000000 +0700
+++ source/glib/gstrfuncs.c 2026-02-19 13:53:45.719384853 +0700
@@ -707,7 +707,7 @@
gchar *fail_pos;
gdouble val;
-#ifndef __BIONIC__
+#if !defined(__BIONIC__) && !defined(__redox__)
struct lconv *locale_data;
#endif
const char *decimal_point;
@@ -720,7 +720,7 @@
fail_pos = NULL;
-#ifndef __BIONIC__
+#if !defined(__BIONIC__) && !defined(__redox__)
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
decimal_point_len = strlen (decimal_point);
@@ -931,7 +931,7 @@
return buffer;
#else
-#ifndef __BIONIC__
+#if !defined(__BIONIC__) && !defined(__redox__)
struct lconv *locale_data;
#endif
const char *decimal_point;
@@ -964,7 +964,7 @@
_g_snprintf (buffer, buf_len, format, d);
-#ifndef __BIONIC__
+#if !defined(__BIONIC__) && !defined(__redox__)
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
decimal_point_len = strlen (decimal_point);
+1
View File
@@ -0,0 +1 @@
../../local/recipes/libs/harfbuzz
-23
View File
@@ -1,23 +0,0 @@
[source]
tar = "https://github.com/harfbuzz/harfbuzz/releases/download/14.2.1/harfbuzz-14.2.1.tar.xz"
blake3 = "fd1ca500318637f241482bb35d7143ef8d8971bb6b6f439ec2cf0327a4f90728"
[build]
template = "custom"
dependencies = [
"freetype2",
"gettext",
"glib",
"libffi",
"libiconv",
"libicu",
"libpng",
"pcre2",
"zlib"
]
script = """
DYNAMIC_INIT
cookbook_meson \
-Ddocs=disabled \
-Dtests=disabled
"""
+1
View File
@@ -0,0 +1 @@
../../local/recipes/libs/pango
-40
View File
@@ -1,40 +0,0 @@
[source]
tar = "https://download.gnome.org/sources/pango/1.56/pango-1.56.4.tar.xz"
blake3 = "8042a82f08101c1dabcb337a96035167e3a300de395c57678ce1a133b2dba346"
patches = ["redox.patch"]
[build]
dependencies = [
"cairo",
"expat",
"fontconfig",
"freetype2",
"fribidi",
"gettext",
"glib",
"harfbuzz",
"libffi",
"libiconv",
"libpng",
"libpthread-stubs",
"libx11",
"libxau",
"libxcb",
"libxext",
"libxft",
"libxrender",
"pcre",
"pcre2",
"pixman",
"x11proto",
"xcb-proto",
"xextproto",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_meson \
-Dbuild-examples=false \
-Dbuild-testsuite=false
"""
-14
View File
@@ -1,14 +0,0 @@
diff -ruwN pango-1.56.3/meson.build source/meson.build
--- pango-1.56.3/meson.build 2025-03-16 05:45:47.000000000 -0600
+++ source/meson.build 2025-05-01 13:51:05.834742120 -0600
@@ -551,8 +551,8 @@
pango_inc = include_directories('pango')
subdir('pango')
-subdir('utils')
-subdir('tools')
+#TODO: fails to build on Redox: subdir('utils')
+#TODO: fails to build on Redox: subdir('tools')
subdir('docs')
if get_option('build-testsuite')
subdir('tests')