diff --git a/dev-libs/glib/glib2-2.68.4.recipe b/dev-libs/glib/glib2-2.68.4.recipe index d683c6110..5dc503240 100644 --- a/dev-libs/glib/glib2-2.68.4.recipe +++ b/dev-libs/glib/glib2-2.68.4.recipe @@ -20,7 +20,7 @@ COPYRIGHT="1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 2008-2010 Collabora Ltd. 1995-2010 Several others" LICENSE="GNU LGPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://gitlab.gnome.org/GNOME/glib/-/archive/$portVersion/glib-$portVersion.tar.gz" CHECKSUM_SHA256="7277475bebbecd3369b793c7b628d78290e016f7d6bcb463173c17e90f3bb96d" SOURCE_DIR="glib-$portVersion" diff --git a/dev-libs/glib/patches/glib2-2.68.4.patchset b/dev-libs/glib/patches/glib2-2.68.4.patchset index a8f533bfe..4f9c52571 100644 --- a/dev-libs/glib/patches/glib2-2.68.4.patchset +++ b/dev-libs/glib/patches/glib2-2.68.4.patchset @@ -1,4 +1,4 @@ -From e1b248c02e0259f4f0b38c13596d24ce233fbdfb Mon Sep 17 00:00:00 2001 +From 693313229d9b7f224b83706141b1de26cdd86515 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 29 Jul 2017 12:13:00 +0200 Subject: g_dbus_message_print: use B_PRIiDEV on Haiku @@ -6,7 +6,7 @@ Subject: g_dbus_message_print: use B_PRIiDEV on Haiku because Haiku doesn't define major() and minor() diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c -index 852a704..968d33f 100644 +index bc9386e..c71c8aa 100644 --- a/gio/gdbusmessage.c +++ b/gio/gdbusmessage.c @@ -35,8 +35,12 @@ @@ -22,7 +22,7 @@ index 852a704..968d33f 100644 #include "gdbusutils.h" #include "gdbusmessage.h" -@@ -3514,8 +3518,14 @@ g_dbus_message_print (GDBusMessage *message, +@@ -3571,8 +3575,14 @@ g_dbus_message_print (GDBusMessage *message, if (fstat (fds[n], &statbuf) == 0) { #ifndef MAJOR_MINOR_NOT_FOUND @@ -37,7 +37,7 @@ index 852a704..968d33f 100644 #endif g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "", (guint) statbuf.st_mode); -@@ -3526,9 +3536,14 @@ g_dbus_message_print (GDBusMessage *message, +@@ -3583,9 +3593,14 @@ g_dbus_message_print (GDBusMessage *message, g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "", (guint) statbuf.st_gid); #ifndef MAJOR_MINOR_NOT_FOUND @@ -56,17 +56,14 @@ index 852a704..968d33f 100644 2.30.2 -From 970d6d6d789a572c3b28de48188abc28939d8675 Mon Sep 17 00:00:00 2001 +From 118dcaca817c9c6f017402280c05498dbb7d38e4 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 23 Aug 2021 19:31:38 +0000 Subject: gunixmounts.c: Add Haiku support ---- - gio/gunixmounts.c | 57 ++++++++++++++++++++++++++++++++++++++--------- - 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c -index 32b9362..5196eb4 100644 +index 32b9362..206f856 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -58,6 +58,9 @@ @@ -152,7 +149,7 @@ index 32b9362..5196eb4 100644 2.30.2 -From 3cb1e89ee25160bd94ea15ca2324dec90d03f1bd Mon Sep 17 00:00:00 2001 +From fbb32f7234f051b16c0fe3cbbbafaf5782bb5669 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 29 Jul 2017 12:32:14 +0200 Subject: glib/gutils.c: on Haiku define load_user_special_dirs() @@ -160,10 +157,10 @@ Subject: glib/gutils.c: on Haiku define load_user_special_dirs() use find_directory() from SupportDefs.h diff --git a/glib/gutils.c b/glib/gutils.c -index 988d0a5..7248ead 100644 +index dad1625..8f1f29d 100644 --- a/glib/gutils.c +++ b/glib/gutils.c -@@ -74,6 +74,10 @@ +@@ -75,6 +75,10 @@ #include "gwin32.h" #endif @@ -174,7 +171,7 @@ index 988d0a5..7248ead 100644 /** * SECTION:misc_utils -@@ -1513,6 +1517,35 @@ load_user_special_dirs (void) +@@ -1960,6 +1964,35 @@ load_user_special_dirs (void) load_user_special_dirs_macos (g_user_special_dirs); } @@ -214,7 +211,7 @@ index 988d0a5..7248ead 100644 2.30.2 -From b84a08f536145a49ed19aba44a504f4526dd892c Mon Sep 17 00:00:00 2001 +From 2b1f8901948b1d1378c795cb3b7a8f332e17c32b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 23 Nov 2019 20:10:10 +0100 Subject: Haiku patch for x86 @@ -251,14 +248,11 @@ index ad776fa..49d2ea4 100644 2.30.2 -From 9fa3354d07e11a9d0d6b2dc3d630ce9837830bb6 Mon Sep 17 00:00:00 2001 +From 42a4988965cf166fdd07f66d6c87953df834a257 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 17 Aug 2021 08:29:48 +0000 Subject: Fix network detection ---- - gio/meson.build | 5 +++++ - 1 file changed, 5 insertions(+) diff --git a/gio/meson.build b/gio/meson.build index 49a37a7..8d77588 100644 @@ -293,3 +287,139 @@ index 49a37a7..8d77588 100644 -- 2.30.2 + +From 2a0d2857003ef35879dd05228219fde9cefe47f3 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Fri, 28 Jan 2022 10:49:17 +1000 +Subject: Use find_directory if XDG vars not found + + +diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c +index 9bb93f7..31bae11 100644 +--- a/gio/xdgmime/xdgmime.c ++++ b/gio/xdgmime/xdgmime.c +@@ -41,6 +41,11 @@ + #include + #include + ++#if defined(__HAIKU__) ++#include ++#include ++#endif ++ + typedef struct XdgDirTimeList XdgDirTimeList; + typedef struct XdgCallbackList XdgCallbackList; + +@@ -234,6 +239,25 @@ xdg_init_dirs (void) + home = getenv ("HOME"); + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + ++#ifdef __HAIKU__ ++ { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ ++ if (xdg_data_home == NULL) ++ if (find_directory(B_USER_NONPACKAGED_DATA_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ xdg_data_home = strdup(path); ++ ++ if (home == NULL) ++ if (find_directory(B_USER_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ home = strdup(path); ++ ++ if (xdg_data_dirs == NULL) ++ if (find_directory(B_SYSTEM_DATA_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ xdg_data_dirs = strdup(path); ++ } ++#endif ++ + if (xdg_data_dirs == NULL) + xdg_data_dirs = "/usr/local/share/:/usr/share/"; + +diff --git a/glib/gutils.c b/glib/gutils.c +index 8f1f29d..b609825 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -1709,6 +1709,13 @@ g_build_user_data_dir (void) + #ifdef G_OS_WIN32 + else + data_dir = get_special_folder (CSIDL_LOCAL_APPDATA); ++#elif defined(__HAIKU__) ++ else { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ if (find_directory(B_USER_NONPACKAGED_DATA_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ data_dir = g_strdup(path); ++ } + #endif + if (!data_dir || !data_dir[0]) + { +@@ -1773,6 +1780,13 @@ g_build_user_config_dir (void) + #ifdef G_OS_WIN32 + else + config_dir = get_special_folder (CSIDL_LOCAL_APPDATA); ++#elif defined(__HAIKU__) ++ else { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ if (find_directory(B_USER_SETTINGS_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ config_dir = g_strdup(path); ++ } + #endif + if (!config_dir || !config_dir[0]) + { +@@ -1836,6 +1850,13 @@ g_build_user_cache_dir (void) + #ifdef G_OS_WIN32 + else + cache_dir = get_special_folder (CSIDL_INTERNET_CACHE); ++#elif defined(__HAIKU__) ++ else { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ if (find_directory(B_USER_CACHE_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ cache_dir = g_strdup(path); ++ } + #endif + if (!cache_dir || !cache_dir[0]) + { +@@ -2535,7 +2556,16 @@ g_build_system_data_dirs (void) + */ + #ifndef G_OS_WIN32 + if (!data_dirs || !data_dirs[0]) ++#if defined(__HAIKU__) ++ { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ if (find_directory(B_SYSTEM_DATA_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ data_dirs = g_strdup(path); ++ } ++#else + data_dirs = "/usr/local/share/:/usr/share/"; ++#endif + + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #else +@@ -2630,6 +2660,20 @@ g_build_system_config_dirs (void) + + g_free (special_conf_dirs); + } ++#elif defined(__HAIKU__) ++ if (conf_dirs) ++ { ++ conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0); ++ } ++ else ++ { ++ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH]; ++ dev_t volume = dev_for_path("/boot"); ++ if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, volume, false, path, sizeof(path)) == B_OK) ++ conf_dir_vector = g_strsplit (path, G_SEARCHPATH_SEPARATOR_S, 0); ++ else ++ conf_dir_vector = g_strsplit ("", G_SEARCHPATH_SEPARATOR_S, 0); ++ } + #else + if (!conf_dirs || !conf_dirs[0]) + conf_dirs = "/etc/xdg"; +-- +2.30.2 +