glib2: bump version

This commit is contained in:
Gerasim Troeglazov
2023-01-05 18:35:07 +10:00
parent 71e7bd9eb5
commit 2f172ea952
2 changed files with 68 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ COPYRIGHT="1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
LICENSE="GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://gitlab.gnome.org/GNOME/glib/-/archive/$portVersion/glib-$portVersion.tar.gz"
CHECKSUM_SHA256="8524cf0d7048c1e9f44d9d1fa802ce0101707c645aa8776dfa9fb5a36b51a204"
CHECKSUM_SHA256="ec75d3dab638b155026df4d68659b4f9489a188433414bb05087f74229acc20c"
SOURCE_DIR="glib-$portVersion"
srvGitRev2="0854af0fdb6d527a8d1999835ac2c5059976c210"
SOURCE_URI_2="https://gitlab.gnome.org/GNOME/gvdb/-/archive/0854af0fdb6d527a8d1999835ac2c5059976c210/gvdb-$srvGitRev2.tar.gz"
@@ -40,7 +40,7 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
libVersion="0.7500.0"
libVersion="0.7501.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
@@ -144,7 +144,7 @@ BUILD()
CFLAGS="-D_BSD_SOURCE" \
LDFLAGS="-lbsd -lgnu -lnetwork" meson build \
-D glib_debug=disabled --buildtype=debugoptimized \
-Diconv=external --prefix=$prefix --includedir=$includeDir \
--prefix=$prefix --includedir=$includeDir \
--libdir=$libDir --datadir=$dataDir --bindir=$commandBinDir \
--localedir=$dataDir/locale

View File

@@ -1,4 +1,4 @@
From e19bb27d45911e0354d21124e4276bbc868236d5 Mon Sep 17 00:00:00 2001
From b007ad396d76c624aad8017c392bf68d20812762 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 7aebdeb..5dad399 100644
index 66da3bd..37d9eab 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -37,8 +37,12 @@
@@ -22,7 +22,7 @@ index 7aebdeb..5dad399 100644
#include "gdbusutils.h"
#include "gdbusmessage.h"
@@ -3672,8 +3676,14 @@ g_dbus_message_print (GDBusMessage *message,
@@ -3675,8 +3679,14 @@ g_dbus_message_print (GDBusMessage *message,
if (fstat (fds[n], &statbuf) == 0)
{
#ifndef MAJOR_MINOR_NOT_FOUND
@@ -37,7 +37,7 @@ index 7aebdeb..5dad399 100644
#endif
g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "",
(guint) statbuf.st_mode);
@@ -3684,9 +3694,14 @@ g_dbus_message_print (GDBusMessage *message,
@@ -3687,9 +3697,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
@@ -53,17 +53,17 @@ index 7aebdeb..5dad399 100644
(guint64) statbuf.st_size);
g_string_append_printf (fs, "%s" "atime=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
--
2.36.1
2.37.3
From 38b33411c3f91cee2ffd91d1302d41d9ae917690 Mon Sep 17 00:00:00 2001
From 9d8196f5079ae14f862f8af75e350a23afb54b9f Mon Sep 17 00:00:00 2001
From: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Date: Mon, 23 Aug 2021 19:31:38 +0000
Subject: gunixmounts.c: Add Haiku support
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 962b964..447d4b6 100644
index 9a02de3..b9cbc20 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -60,6 +60,9 @@
@@ -76,7 +76,7 @@ index 962b964..447d4b6 100644
#ifndef O_BINARY
#define O_BINARY 0
@@ -958,6 +961,49 @@ _g_get_unix_mounts (void)
@@ -960,6 +963,49 @@ _g_get_unix_mounts (void)
return return_list;
}
@@ -126,7 +126,7 @@ index 962b964..447d4b6 100644
/* QNX {{{2 */
#elif defined (HAVE_QNX)
@@ -1491,16 +1537,8 @@ _g_get_unix_mount_points (void)
@@ -1493,16 +1539,8 @@ _g_get_unix_mount_points (void)
return g_list_reverse (return_list);
}
@@ -146,10 +146,10 @@ index 962b964..447d4b6 100644
_g_get_unix_mount_points (void)
{
--
2.36.1
2.37.3
From 738132e93099b8313670757f54d5b1b0c9ca38e6 Mon Sep 17 00:00:00 2001
From 8b0bff5e9bf6c9e5ce27c973c86e370a2403957a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 29 Jul 2017 12:32:14 +0200
Subject: glib/gutils.c: on Haiku define load_user_special_dirs()
@@ -157,7 +157,7 @@ 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 78ccd61..3f2ea32 100644
index d73b647..2b81778 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -78,6 +78,10 @@
@@ -171,7 +171,7 @@ index 78ccd61..3f2ea32 100644
/**
* SECTION:misc_utils
@@ -1763,6 +1767,13 @@ g_build_user_data_dir (void)
@@ -1865,6 +1869,13 @@ g_build_user_data_dir (void)
#ifdef G_OS_WIN32
else
data_dir = get_special_folder (&FOLDERID_LocalAppData);
@@ -185,7 +185,7 @@ index 78ccd61..3f2ea32 100644
#endif
if (!data_dir || !data_dir[0])
{
@@ -1827,6 +1838,13 @@ g_build_user_config_dir (void)
@@ -1929,6 +1940,13 @@ g_build_user_config_dir (void)
#ifdef G_OS_WIN32
else
config_dir = get_special_folder (&FOLDERID_LocalAppData);
@@ -199,7 +199,7 @@ index 78ccd61..3f2ea32 100644
#endif
if (!config_dir || !config_dir[0])
{
@@ -1890,6 +1908,13 @@ g_build_user_cache_dir (void)
@@ -1992,6 +2010,13 @@ g_build_user_cache_dir (void)
#ifdef G_OS_WIN32
else
cache_dir = get_special_folder (&FOLDERID_InternetCache);
@@ -213,7 +213,7 @@ index 78ccd61..3f2ea32 100644
#endif
if (!cache_dir || !cache_dir[0])
{
@@ -2091,6 +2116,35 @@ load_user_special_dirs (void)
@@ -2193,6 +2218,35 @@ load_user_special_dirs (void)
load_user_special_dirs_macos (g_user_special_dirs);
}
@@ -249,7 +249,7 @@ index 78ccd61..3f2ea32 100644
#elif defined(G_OS_WIN32)
static void
@@ -2586,7 +2640,16 @@ g_build_system_data_dirs (void)
@@ -2688,7 +2742,16 @@ g_build_system_data_dirs (void)
*/
#ifndef G_OS_WIN32
if (!data_dirs || !data_dirs[0])
@@ -266,7 +266,7 @@ index 78ccd61..3f2ea32 100644
data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
#else
@@ -2681,6 +2744,20 @@ g_build_system_config_dirs (void)
@@ -2783,6 +2846,20 @@ g_build_system_config_dirs (void)
g_free (special_conf_dirs);
}
@@ -288,10 +288,10 @@ index 78ccd61..3f2ea32 100644
if (!conf_dirs || !conf_dirs[0])
conf_dirs = "/etc/xdg";
--
2.36.1
2.37.3
From b0c7d261949f247cf4984b1a57c3fc3bb65db242 Mon Sep 17 00:00:00 2001
From 7b7eb5ddfc120afe2b2d7a8cdd9fab9ba0f5dcee Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 23 Nov 2019 20:10:10 +0100
Subject: Haiku patch for x86
@@ -326,20 +326,20 @@ index ea3495c..94bdaf1 100644
child_argv[1] = "mapchild";
child_argv[2] = pid;
--
2.36.1
2.37.3
From 3c23e1c48a8dc1346f26da7a091bb32cfc677125 Mon Sep 17 00:00:00 2001
From 8df34ff954ea9dc1783e52f7776bd3e3ccbea835 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
diff --git a/gio/meson.build b/gio/meson.build
index 69bb060..c664c88 100644
index 1f7c109..67ac6a2 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -22,6 +22,7 @@ if host_system not in ['windows', 'android']
@@ -26,6 +26,7 @@ if host_system not in ['windows', 'android']
int qclass = C_IN;''',
name : 'C_IN in public headers (no arpa/nameser_compat.h needed)')
if cc.compiles('''#include <sys/types.h>
@@ -347,7 +347,7 @@ index 69bb060..c664c88 100644
#include <arpa/nameser.h>
#include <arpa/nameser_compat.h>
int qclass = C_IN;''',
@@ -42,6 +43,7 @@ if host_system != 'windows'
@@ -46,6 +47,7 @@ if host_system != 'windows'
return res_query("test", 0, 0, (void *)0, 0);
}'''
res_query_test_full = '''#include <sys/types.h>
@@ -355,7 +355,7 @@ index 69bb060..c664c88 100644
#include <netinet/in.h>
#include <arpa/nameser.h>
''' + res_query_test
@@ -55,6 +57,9 @@ if host_system != 'windows'
@@ -59,6 +61,9 @@ if host_system != 'windows'
elif cc.links(res_query_test, args : '-lsocket', name : 'res_query() in -lsocket')
network_libs += [ cc.find_library('socket') ]
network_args += [ '-lsocket' ]
@@ -366,57 +366,64 @@ index 69bb060..c664c88 100644
error('Could not find res_query()')
endif
--
2.36.1
2.37.3
From f4dca81a0efe06b15c4b4f1cff114d437ade5b6e Mon Sep 17 00:00:00 2001
From 363f3c3e5fbde4f6a170456cab9f5f299dcf12ac 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
Date: Thu, 5 Jan 2023 18:31:01 +1000
Subject: Use find_directory for xdgmime
diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c
index c3c1162..602175d 100644
index c3c1162..c48d390 100644
--- a/gio/xdgmime/xdgmime.c
+++ b/gio/xdgmime/xdgmime.c
@@ -49,6 +49,11 @@
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
@@ -45,6 +45,11 @@
#include <unistd.h>
#include <assert.h>
+#if defined(__HAIKU__)
+#include <FindDirectory.h>
+#include <fs_info.h>
+#endif
+
typedef struct XdgDirTimeList XdgDirTimeList;
typedef struct XdgCallbackList XdgCallbackList;
#ifndef S_ISREG
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
@@ -239,6 +244,23 @@ xdg_init_dirs (void)
@@ -243,6 +248,25 @@ xdg_init_dirs (void)
home = getenv ("HOME");
xdg_data_dirs = getenv ("XDG_DATA_DIRS");
assert (xdg_dirs == NULL);
+#ifdef __HAIKU__
+ {
+ char path[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
+ dev_t volume = dev_for_path("/boot");
+ current_dir = 0;
+ xdg_dirs = calloc (2, sizeof (char *));
+
+ 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);
+ }
+ 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)
+ {
+ xdg_data_dirs = strdup(path);
+ strcat (xdg_data_dirs, "/mime/");
+ }
+ else
+ {
+ xdg_data_dirs = strdup("/system/data/mime/");
+ }
+ xdg_dirs[current_dir++] = xdg_data_dirs;
+#else
xdg_data_home = getenv ("XDG_DATA_HOME");
home = getenv ("HOME");
xdg_data_dirs = getenv ("XDG_DATA_DIRS");
@@ -311,7 +333,7 @@ xdg_init_dirs (void)
ptr = end_ptr;
}
-
+#endif
+
if (xdg_data_dirs == NULL)
xdg_data_dirs = "/usr/local/share/:/usr/share/";
/* NULL terminator */
xdg_dirs[current_dir] = NULL;
--
2.36.1
2.37.3