glib: update to 1.70.1

This commit is contained in:
Yaksh Bariya 2021-12-11 15:54:41 +05:30 committed by YAKSH BARIYA
parent f8babb8fb3
commit fda92be338
16 changed files with 177 additions and 407 deletions

View File

@ -0,0 +1,15 @@
--- ./usr/include/mntent.h.orig 2021-12-10 16:17:07.041722648 +0530
+++ ./usr/include/mntent.h 2021-12-10 16:17:41.171722635 +0530
@@ -70,9 +70,9 @@
#endif /* __ANDROID_API__ >= 21 */
-#if __ANDROID_API__ >= 26
-char* hasmntopt(const struct mntent* __entry, const char* __option) __INTRODUCED_IN(26);
-#endif /* __ANDROID_API__ >= 26 */
+#if __ANDROID_API__ >= 21
+char* hasmntopt(const struct mntent* __entry, const char* __option) __INTRODUCED_IN(21);
+#endif /* __ANDROID_API__ >= 21 */
__END_DECLS

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://developer.gnome.org/glib/
TERMUX_PKG_DESCRIPTION="Library providing core building blocks for libraries and applications written in C"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.66.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=2.70.1
TERMUX_PKG_SRCURL=https://ftp.gnome.org/pub/gnome/sources/glib/${TERMUX_PKG_VERSION:0:4}/glib-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=a269ffe69fbcc3a21ff1acb1b6146b2a5723499d6e2de33ae16ccb6d2438ef60
TERMUX_PKG_SHA256=f9b7bce7f51753a1f43853bbcaca8bf09e15e994268e29cfd7a76f65636263c0
TERMUX_PKG_DEPENDS="libffi, libiconv, pcre, libandroid-support, zlib"
TERMUX_PKG_BREAKS="glib-dev"
TERMUX_PKG_REPLACES="glib-dev"

View File

@ -1,343 +0,0 @@
diff -uNr glib-2.58.3/gio/gdbusaddress.c glib-2.58.3.mod/gio/gdbusaddress.c
--- glib-2.58.3/gio/gdbusaddress.c 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/gdbusaddress.c 2019-03-02 02:08:55.324976201 +0200
@@ -1628,7 +1628,7 @@
ret = g_strdup (g_getenv ("DBUS_SYSTEM_BUS_ADDRESS"));
if (ret == NULL)
{
- ret = g_strdup ("unix:path=/var/run/dbus/system_bus_socket");
+ ret = g_strdup ("unix:path=@TERMUX_PREFIX@/var/run/dbus/system_bus_socket");
}
break;
diff -uNr glib-2.58.3/gio/gdbusprivate.c glib-2.58.3.mod/gio/gdbusprivate.c
--- glib-2.58.3/gio/gdbusprivate.c 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/gdbusprivate.c 2019-03-02 02:08:55.328309547 +0200
@@ -2098,17 +2098,17 @@
/* TODO: use PACKAGE_LOCALSTATEDIR ? */
ret = NULL;
first_error = NULL;
- if (!g_file_get_contents ("/var/lib/dbus/machine-id",
+ if (!g_file_get_contents ("@TERMUX_PREFIX@/var/lib/dbus/machine-id",
&ret,
NULL,
&first_error) &&
- !g_file_get_contents ("/etc/machine-id",
+ !g_file_get_contents ("@TERMUX_PREFIX@/etc/machine-id",
&ret,
NULL,
NULL))
{
g_propagate_prefixed_error (error, first_error,
- _("Unable to load /var/lib/dbus/machine-id or /etc/machine-id: "));
+ _("Unable to load @TERMUX_PREFIX@/var/lib/dbus/machine-id or @TERMUX_PREFIX@/etc/machine-id: "));
}
else
{
diff -uNr glib-2.58.3/gio/gnetworking.h.in glib-2.58.3.mod/gio/gnetworking.h.in
--- glib-2.58.3/gio/gnetworking.h.in 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/gnetworking.h.in 2019-03-02 02:08:55.331642893 +0200
@@ -55,7 +55,7 @@
#endif
#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
+#define _PATH_RESCONF "@TERMUX_PREFIX@/etc/resolv.conf"
#endif
#ifndef CMSG_LEN
diff -uNr glib-2.58.3/gio/gunixmounts.c glib-2.58.3.mod/gio/gunixmounts.c
--- glib-2.58.3/gio/gunixmounts.c 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/gunixmounts.c 2019-03-02 02:08:55.331642893 +0200
@@ -539,7 +539,7 @@
return _PATH_MOUNTED;
# endif
#else
- return "/etc/mtab";
+ return "@TERMUX_PREFIX@/etc/mtab";
#endif
}
@@ -666,7 +666,7 @@
mountinfo_path = _PATH_MOUNTED;
# endif
#else
- mountinfo_path = "/etc/mtab";
+ mountinfo_path = "@TERMUX_PREFIX@/etc/mtab";
#endif
return mountinfo_path;
@@ -960,7 +960,7 @@
#elif defined(VFSTAB)
return VFSTAB;
#else
- return "/etc/fstab";
+ return "@TERMUX_PREFIX@/etc/fstab";
#endif
#endif
}
@@ -2955,7 +2955,7 @@
/* see if device with similar major:minor as /dev/root is mention
* in /etc/mtab (it usually is)
*/
- f = fopen ("/etc/mtab", "r");
+ f = fopen ("@TERMUX_PREFIX@/etc/mtab", "r");
if (f != NULL)
{
struct mntent *entp;
diff -uNr glib-2.58.3/gio/tests/org.gtk.test.gschema.override.orig glib-2.58.3.mod/gio/tests/org.gtk.test.gschema.override.orig
--- glib-2.58.3/gio/tests/org.gtk.test.gschema.override.orig 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/tests/org.gtk.test.gschema.override.orig 1970-01-01 03:00:00.000000000 +0300
@@ -1,2 +0,0 @@
-[org.gtk.test.per-desktop:GNOME-Classic]
-desktop = "GNOME Classic"
diff -uNr glib-2.58.3/gio/tests/org.gtk.test.gschema.xml.orig glib-2.58.3.mod/gio/tests/org.gtk.test.gschema.xml.orig
--- glib-2.58.3/gio/tests/org.gtk.test.gschema.xml.orig 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/tests/org.gtk.test.gschema.xml.orig 1970-01-01 03:00:00.000000000 +0300
@@ -1,222 +0,0 @@
-<schemalist>
-
- <schema id="org.gtk.test" path="/tests/" gettext-domain="test">
- <key name="greeting" type="s">
- <default l10n="messages">"Hello, earthlings"</default>
- <summary>A greeting</summary>
- <description>
- Greeting of the invading martians
- </description>
- </key>
- <key name="farewell" type="s">
- <default l10n="messages">"So long"</default>
- </key>
-
- <child name='basic-types' schema='org.gtk.test.basic-types'/>
- <child name='complex-types' schema='org.gtk.test.complex-types'/>
- <child name='localized' schema='org.gtk.test.localized'/>
- </schema>
-
- <schema id="org.gtk.test.no-path">
- <key name="test-boolean" type="b">
- <default>true</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.basic-types" path="/tests/basic-types/">
- <key name="test-boolean" type="b">
- <default>true</default>
- </key>
- <key name="test-byte" type="y">
- <default>25</default>
- </key>
- <key name="test-int16" type="n">
- <default>-1234</default>
- </key>
- <key name="test-uint16" type="q">
- <default>1234</default>
- </key>
- <key name="test-int32" type="i">
- <default>-123456</default>
- </key>
- <key name="test-uint32" type="u">
- <default>123456</default>
- </key>
- <key name="test-int64" type="x">
- <default>-123456789</default>
- </key>
- <key name="test-uint64" type="t">
- <default>123456789</default>
- </key>
- <key name="test-double" type="d">
- <default>123.456</default>
- </key>
- <key name="test-string" type="s">
- <default>"a string, it seems"</default>
- </key>
- <key name="test-objectpath" type="o">
- <default>"/a/object/path"</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.complex-types" path="/tests/complex-types/">
- <key name="test-tuple" type="(s(ii))">
- <default>("one",(2,3))</default>
- </key>
- <key name="test-array" type="ai">
- <default>[0,1,2,3,4,5]</default>
- </key>
- <key name="test-dict" type="a{sau}">
- <default>
- {
- "AC": [0,0, 0,0,0,0,0,0],
- "IV": [0,0, 0,0,0,0,0,0]
- }
- </default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.localized" path="/tests/localized/" gettext-domain="test">
- <key name="error-message" type="s">
- <default l10n="messages">"Unnamed"</default>
- </key>
- <key name="backspace" type="s">
- <default l10n="messages" context="keyboard label">"BackSpace"</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.binding" path="/tests/binding/">
- <key name="bool" type="b">
- <default>false</default>
- </key>
- <key name="anti-bool" type="b">
- <default>false</default>
- </key>
- <key name="byte" type="y">
- <default>0</default>
- </key>
- <key name="int16" type="n">
- <default>0</default>
- </key>
- <key name="uint16" type="q">
- <default>0</default>
- </key>
- <key name="int" type="i">
- <default>0</default>
- </key>
- <key name="uint" type="u">
- <default>0</default>
- </key>
- <key name="int64" type="x">
- <default>0</default>
- </key>
- <key name="uint64" type="t">
- <default>0</default>
- </key>
- <key name="double" type="d">
- <default>0</default>
- </key>
- <key name="string" type="s">
- <default>""</default>
- </key>
- <key name="chararray" type="ay">
- <default>[48, 49]</default>
- </key>
- <key name="strv" type="as">
- <default>[]</default>
- </key>
- <key name="enum" enum="org.gtk.test.TestEnum">
- <default>'foo'</default>
- </key>
- <key name="flags" flags="org.gtk.test.TestFlags">
- <default>['mourning', 'laughing']</default>
- </key>
- <key name="range" type='u'>
- <default>33</default>
- <range min="2" max="44"/>
- </key>
- </schema>
-
- <schema id='org.gtk.test.enums' path='/tests/enums/'>
- <key name='test' enum='org.gtk.test.TestEnum'>
- <default>'bar'</default>
- <aliases>
- <alias value='qux' target='quux'/>
- </aliases>
- </key>
- <key name='f-test' flags='org.gtk.test.TestFlags'>
- <default>[]</default>
- <aliases>
- <alias value='speaking' target='talking'/>
- </aliases>
- </key>
- </schema>
-
- <schema id='org.gtk.test.enums.direct' path='/tests/enums/'>
- <key name='f-test' type='as'>
- <default>[]</default>
- </key>
- <key name='test' type='s'>
- <default>'bar'</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.range' path='/tests/range/'>
- <key name='val' type='i'>
- <default>33</default>
- <range min='2' max='44'/>
- </key>
- </schema>
-
- <schema id='org.gtk.test.range.direct' path='/tests/range/'>
- <key name='val' type='i'>
- <default>33</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.mapped' path='/tests/mapped/'>
- <key name='val' type='i'>
- <default>0</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.descriptions" path="/a/">
- <key name='a' type='i'>
- <summary>
- a paragraph.
-
- with some whitespace.
-
- because not everyone has a great editor.
-
-
-
-
- lots of space is as one.
- </summary>
- <default>0</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.extends.base'>
- <key name='int32' type='i'>
- <default>0</default>
- </key>
- <key name='string' type='s'>
- <default>''</default>
- </key>
- </schema>
- <schema id='org.gtk.test.extends.extended' extends='org.gtk.test.extends.base'>
- <override name="int32">42</override>
- <key name='another-int32' type='i'>
- <default>0</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.per-desktop" path="/tests/per-desktop/">
- <key name="desktop" type="s">
- <default>"GNOME"</default>
- </key>
- </schema>
-
-</schemalist>
diff -uNr glib-2.58.3/gio/xdgmime/xdgmime.c glib-2.58.3.mod/gio/xdgmime/xdgmime.c
--- glib-2.58.3/gio/xdgmime/xdgmime.c 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/gio/xdgmime/xdgmime.c 2019-03-02 02:08:55.334976238 +0200
@@ -255,7 +255,7 @@
xdg_data_dirs = getenv ("XDG_DATA_DIRS");
if (xdg_data_dirs == NULL)
- xdg_data_dirs = "/usr/local/share/:/usr/share/";
+ xdg_data_dirs = "@TERMUX_PREFIX@/local/share/:@TERMUX_PREFIX@/share/";
ptr = xdg_data_dirs;
diff -uNr glib-2.58.3/glib/gcharset.c glib-2.58.3.mod/glib/gcharset.c
--- glib-2.58.3/glib/gcharset.c 2019-01-21 15:38:50.000000000 +0200
+++ glib-2.58.3.mod/glib/gcharset.c 2019-03-02 02:08:55.334976238 +0200
@@ -298,7 +298,7 @@
if (g_once_init_enter (&alias_table))
{
GHashTable *table = g_hash_table_new (g_str_hash, g_str_equal);
- read_aliases ("/usr/share/locale/locale.alias", table);
+ read_aliases ("@TERMUX_PREFIX@/share/locale/locale.alias", table);
g_once_init_leave (&alias_table, table);
}

View File

@ -0,0 +1,11 @@
--- ./gio/gdbusaddress.c.orig 2021-12-10 17:23:55.601721119 +0530
+++ ./gio/gdbusaddress.c 2021-12-10 17:21:46.541721169 +0530
@@ -1337,7 +1337,7 @@
if (ret == NULL)
{
- ret = g_strdup ("unix:path=/var/run/dbus/system_bus_socket");
+ ret = g_strdup ("unix:path=@TERMUX_PREFIX@/var/run/dbus/system_bus_socket");
}
break;

View File

@ -0,0 +1,11 @@
--- ./gio/gdbusdaemon.c.orig 2021-12-10 17:26:47.111721054 +0530
+++ ./gio/gdbusdaemon.c 2021-12-10 17:27:49.911721030 +0530
@@ -1594,7 +1594,7 @@
{
#ifdef G_OS_UNIX
if (g_unix_socket_address_abstract_names_supported ())
- daemon->address = g_strdup ("unix:tmpdir=/tmp/gdbus-daemon");
+ daemon->address = g_strdup ("unix:tmpdir=@TERMUX_PREFIX@/tmp/gdbus-daemon");
else
{
daemon->tmpdir = g_dir_make_tmp ("gdbus-daemon-XXXXXX", NULL);

View File

@ -0,0 +1,13 @@
--- ./gio/gdbusprivate.c.orig 2021-12-10 17:28:44.551721009 +0530
+++ ./gio/gdbusprivate.c 2021-12-10 19:24:17.521718364 +0530
@@ -2477,8 +2477,8 @@
/* Copy what dbus.git does: allow the /var/lib path to be configurable at
* build time, but hard-code the system-wide machine ID path in /etc. */
- const gchar *var_lib_path = LOCALSTATEDIR "/lib/dbus/machine-id";
- const gchar *etc_path = "/etc/machine-id";
+ const gchar *var_lib_path = LOCALSTATEDIR "@TERMUX_PREFIX@/lib/dbus/machine-id";
+ const gchar *etc_path = "@TERMUX_PREFIX@/etc/machine-id";
if (!g_file_get_contents (var_lib_path,
&ret,

View File

@ -0,0 +1,11 @@
--- ./gio/gkeyfilesettingsbackend.c.orig 2021-12-10 19:39:09.321718024 +0530
+++ ./gio/gkeyfilesettingsbackend.c 2021-12-10 19:39:26.371718018 +0530
@@ -662,7 +662,7 @@
load_system_settings (GKeyfileSettingsBackend *kfsb)
{
GError *error = NULL;
- const char *dir = "/etc/glib-2.0/settings";
+ const char *dir = "@TERMUX_PREFIX@/etc/glib-2.0/settings";
char *path;
char *contents;

View File

@ -0,0 +1,11 @@
--- ./gio/gnetworking.h.in.orig 2021-12-10 19:44:29.271717902 +0530
+++ ./gio/gnetworking.h.in 2021-12-10 19:45:00.881717890 +0530
@@ -51,7 +51,7 @@
#endif
#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
+#define _PATH_RESCONF "@TERMUX_PREFIX@/etc/resolv.conf"
#endif
#ifndef CMSG_LEN

View File

@ -0,0 +1,11 @@
--- ./gio/gunixmounts.c.orig 2021-12-10 16:01:41.791723001 +0530
+++ ./gio/gunixmounts.c 2021-12-10 16:03:20.861722964 +0530
@@ -20,6 +20,8 @@
* Author: Alexander Larsson <alexl@redhat.com>
*/
+#include <mntent.h>
+
/* Prologue {{{1 */
#include "config.h"

View File

@ -0,0 +1,11 @@
--- ./gio/xdgmime/xdgmime.c.orig 2021-12-10 20:05:07.591717430 +0530
+++ ./gio/xdgmime/xdgmime.c 2021-12-10 20:05:11.861717428 +0530
@@ -235,7 +235,7 @@
xdg_data_dirs = getenv ("XDG_DATA_DIRS");
if (xdg_data_dirs == NULL)
- xdg_data_dirs = "/usr/local/share/:/usr/share/";
+ xdg_data_dirs = "@TERMUX_PREFIX@/local/share/:@TERMUX_PREFIX@/share/";
/* Work out how many dirs were dealing with. */
if (xdg_data_home != NULL || home != NULL)

View File

@ -0,0 +1,11 @@
--- ./glib/gcharset.c.orig 2021-12-10 21:38:06.571715302 +0530
+++ ./glib/gcharset.c 2021-12-10 21:38:11.361715300 +0530
@@ -494,7 +494,7 @@
if (g_once_init_enter (&alias_table))
{
GHashTable *table = g_hash_table_new (g_str_hash, g_str_equal);
- read_aliases ("/usr/share/locale/locale.alias", table);
+ read_aliases ("@TERMUX_PREFIX@/share/locale/locale.alias", table);
g_once_init_leave (&alias_table, table);
}

View File

@ -1,15 +1,15 @@
--- ./glib/gspawn.c.orig 2020-07-20 22:15:45.985010959 +0200
+++ ./glib/gspawn.c 2020-07-20 22:18:29.707654650 +0200
@@ -1825,7 +1825,7 @@
--- ./glib/gspawn.c.orig 2021-12-10 22:01:14.151714772 +0530
+++ ./glib/gspawn.c 2021-12-10 22:01:19.781714770 +0530
@@ -2200,7 +2200,7 @@
* * what to search if PATH is unset. POSIX may, dunno.
* */
- chosen_search_path = "/bin:/usr/bin:.";
+ chosen_search_path = "@TERMUX_PREFIX@/bin:.";
+ chosen_search_path = "@TERMUX_PREFIX/bin:.";
}
/* Allocate a buffer which the fork()ed child can use to assemble potential
@@ -2246,7 +2246,7 @@
if (search_path || search_path_from_envp)
@@ -2593,7 +2593,7 @@
if (argc + 2 > argv_buffer_len)
return FALSE;

View File

@ -1,8 +1,7 @@
diff -u -r ../glib-2.58.1/glib/gtimezone.c ./glib/gtimezone.c
--- ../glib-2.58.1/glib/gtimezone.c 2018-09-21 14:23:53.000000000 +0000
+++ ./glib/gtimezone.c 2018-10-07 18:37:37.275489744 +0000
@@ -43,6 +43,10 @@
#include <windows.h>
--- ./glib/gtimezone.c.orig 2021-12-11 16:52:41.154480293 +0530
+++ ./glib/gtimezone.c 2021-12-11 16:53:59.829643030 +0530
@@ -46,6 +46,10 @@
#include <wchar.h>
#endif
+#ifdef __ANDROID__
@ -12,12 +11,10 @@ diff -u -r ../glib-2.58.1/glib/gtimezone.c ./glib/gtimezone.c
/**
* SECTION:timezone
* @title: GTimeZone
@@ -399,7 +403,136 @@
gtz->transitions = NULL;
@@ -509,6 +513,135 @@
return resolved_identifier;
}
-#ifdef G_OS_UNIX
+#ifdef __ANDROID__
+/* Android uses a 'persist.sys.timezone' system property for the
+ * current timezone instead of a /etc/localtime file:
+ * https://android.googlesource.com/platform/ndk/+/android-2.2_r1/docs/system/libc/OVERVIEW.TXT#67
@ -145,31 +142,17 @@ diff -u -r ../glib-2.58.1/glib/gtimezone.c ./glib/gtimezone.c
+ return NULL;
+}
+
+#elif defined(G_OS_UNIX)
+
+
static GBytes*
zone_info_unix (const gchar *identifier,
gchar **out_identifier)
@@ -506,6 +641,10 @@
return zoneinfo;
}
+#endif
+
+#ifdef G_OS_UNIX
+
static void
init_zone_from_iana_info (GTimeZone *gtz,
GBytes *zoneinfo,
@@ -1483,7 +1622,11 @@
zone_info_unix (const gchar *identifier,
const gchar *resolved_identifier)
@@ -1773,7 +1906,7 @@
if (tz->t_info == NULL)
{
#ifdef G_OS_UNIX
+# ifdef __ANDROID__
+ GBytes *zoneinfo = zone_info_android (identifier, &resolved_identifier);
+# else
GBytes *zoneinfo = zone_info_unix (identifier, &resolved_identifier);
+# endif
- GBytes *zoneinfo = zone_info_unix (identifier, resolved_identifier);
+ GBytes *zoneinfo = zone_info_android(identifier, resolved_identifier);
if (zoneinfo != NULL)
{
init_zone_from_iana_info (tz, zoneinfo, g_steal_pointer (&resolved_identifier));

View File

@ -1,7 +1,6 @@
diff -u -r ../glib-2.60.2/glib/gutils.c ./glib/gutils.c
--- ../glib-2.60.2/glib/gutils.c 2019-05-03 13:43:28.000000000 +0000
+++ ./glib/gutils.c 2019-05-11 19:59:12.830415366 +0000
@@ -378,7 +378,7 @@
--- ./glib/gutils.c.orig 2021-12-11 13:35:15.354088542 +0530
+++ ./glib/gutils.c 2021-12-11 13:36:59.724088502 +0530
@@ -369,7 +369,7 @@
* what to search if PATH is unset. POSIX may, dunno.
*/
@ -10,7 +9,7 @@ diff -u -r ../glib-2.60.2/glib/gutils.c ./glib/gutils.c
}
#else
n = GetModuleFileNameW (NULL, wfilename, MAXPATHLEN);
@@ -958,7 +958,7 @@
@@ -949,7 +949,7 @@
if (tmp == NULL || *tmp == '\0')
{
g_free (tmp);
@ -19,21 +18,21 @@ diff -u -r ../glib-2.60.2/glib/gutils.c ./glib/gutils.c
}
#endif /* !G_OS_WIN32 */
@@ -2080,7 +2080,7 @@
@@ -1526,7 +1526,7 @@
else
return NULL;
#elif defined (G_OS_UNIX)
- const gchar * const os_release_files[] = { "/etc/os-release", "/usr/lib/os-release" };
+ const gchar * const os_release_files[] = { "@TERMUX_PREFIX@/etc/os-release", "@TERMUX_PREFIX@/lib/os-release" };
gsize i;
gchar *buffer = NULL;
gchar *result = NULL;
@@ -2465,7 +2465,7 @@
*/
#ifndef G_OS_WIN32
if (!data_dirs || !data_dirs[0])
- data_dirs = "/usr/local/share/:/usr/share/";
+ data_dirs = "@TERMUX_PREFIX@/share/";
+ data_dirs = "@TERMUX_PREFIX@/local/share/:@TERMUX_PREFIX@/share/";
data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
#else
@@ -2174,7 +2174,7 @@
}
#else
if (!conf_dirs || !conf_dirs[0])
- conf_dirs = "/etc/xdg";
+ conf_dirs = "@TERMUX_PREFIX@/etc/xdg";
conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
#endif

View File

@ -0,0 +1,30 @@
--- ./glib/tests/meson.build.orig 2021-12-10 15:51:33.481723233 +0530
+++ ./glib/tests/meson.build 2021-12-10 15:52:09.931723220 +0530
@@ -158,27 +158,6 @@
'include' : {},
'unix' : {},
}
- if have_rtld_next
- glib_tests += {
- 'gutils-user-database' : {
- 'depends' : [
- shared_library('getpwuid-preload',
- 'getpwuid-preload.c',
- name_prefix : '',
- dependencies: libdl_dep,
- install_dir : installed_tests_execdir,
- install: installed_tests_enabled,
- ),
- ],
- 'env' : {
- 'LD_PRELOAD': '@0@/getpwuid-preload.so'.format(meson.current_build_dir()),
- },
- 'installed_tests_env' : {
- 'LD_PRELOAD': '@0@/getpwuid-preload.so'.format(installed_tests_execdir),
- },
- },
- }
- endif
endif
if installed_tests_enabled

View File

@ -1,21 +1,18 @@
diff -u -r ../glib-2.60.2/meson.build ./meson.build
--- ../glib-2.60.2/meson.build 2019-05-03 13:43:28.000000000 +0000
+++ ./meson.build 2019-05-11 20:10:26.054269305 +0000
@@ -360,7 +360,6 @@
# https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
'-Wno-pedantic',
--- ./meson.build.orig 2021-12-10 06:56:41.609999906 +0530
+++ ./meson.build 2021-12-11 17:23:07.992103796 +0530
@@ -443,7 +443,6 @@
# A zero-length format string shouldn't be considered an issue.
'-Wno-format-zero-length',
'-Werror=declaration-after-statement',
- '-Werror=format=2',
'-Werror=implicit-function-declaration',
'-Werror=init-self',
'-Werror=missing-include-dirs',
--- ./meson.build.orig 2019-06-11 00:18:20.480045589 +0000
+++ ./meson.build 2019-06-11 00:19:34.408583457 +0000
@@ -1780,9 +1780,8 @@
@@ -2047,9 +2046,8 @@
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
# implementations. This could be extended if issues are found in some platforms.
libintl_deps = []
-if cc.has_function('ngettext')
-if cc.has_function('ngettext', args : osx_ldflags)
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
-else
+have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')