Update glib to 2.64.1

pull/2470/head
Jonas Kvinge 4 years ago
parent 59ceb70a95
commit 1fdd4a5c1d

@ -3,43 +3,46 @@ This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 23 Sep 2010 21:42:46 +0200
Subject: [PATCH 01/10] fix tool paths
From: Jonas Kvinge <jonas@jkvinge.net>
Date: Thu, 12 Mar 2020 20:07:20 +0100
Subject: [PATCH 1/1] Fixes to glib
diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
diff --git a/fuzzing/meson.build b/fuzzing/meson.build
index 1111111..2222222 100644
--- a/glib-2.0.pc.in
+++ b/glib-2.0.pc.in
@@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-glib_genmarshal=glib-genmarshal
-gobject_query=gobject-query
-glib_mkenums=glib-mkenums
+glib_genmarshal=@bindir@/glib-genmarshal
+gobject_query=@bindir@/gobject-query
+glib_mkenums=@bindir@/glib-mkenums
Name: GLib
Description: C Utility Library
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:25:01 +0200
Subject: [PATCH 02/10] Avoid DllMain symbol conflict when linking statically
Adjusted by Boris Nagaev on 29-Jan-2017 to fix
https://gist.github.com/starius/f4fc85939352cb50122ba29e0f5b140d
when updating to glib-2.50.2.
--- a/fuzzing/meson.build
+++ b/fuzzing/meson.build
@@ -20,9 +20,19 @@ else
extra_sources += 'driver.c'
endif
-foreach target_name : fuzz_targets
- exe = executable(target_name, [extra_sources, target_name + '.c'],
- c_args : extra_c_args,
- dependencies : deps,
- )
-endforeach
+if host_system == 'windows'
+ foreach target_name : fuzz_targets
+ exe = executable(target_name, [extra_sources, target_name + '.c'],
+ c_args : extra_c_args,
+ dependencies : deps,
+ link_args : [ '-liconv' ],
+ )
+ endforeach
+else
+ foreach target_name : fuzz_targets
+ exe = executable(target_name, [extra_sources, target_name + '.c'],
+ c_args : extra_c_args,
+ dependencies : deps,
+ )
+ endforeach
+endif
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 1111111..2222222 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -928,14 +928,12 @@ extern GType g_cocoa_notification_backend_get_type (void);
@@ -1051,14 +1051,12 @@ extern GType _g_win32_network_monitor_get_type (void);
static HMODULE gio_dll = NULL;
@ -56,7 +59,7 @@ index 1111111..2222222 100644
DWORD fdwReason,
LPVOID lpvReserved)
{
@@ -945,8 +943,6 @@ DllMain (HINSTANCE hinstDLL,
@@ -1068,8 +1066,6 @@ DllMain (HINSTANCE hinstDLL,
return TRUE;
}
@ -65,11 +68,26 @@ index 1111111..2222222 100644
void *
_g_io_win32_get_module (void)
{
diff --git a/gio/meson.build b/gio/meson.build
index 1111111..2222222 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -6,6 +6,10 @@ gio_c_args = [
gio_c_args += glib_hidden_visibility_args
+if host_system == 'windows'
+ noseh_link_args += '-liconv'
+endif
+
# FIXME: Install empty glib_giomodulesdir
gnetworking_h_conf = configuration_data()
diff --git a/glib/glib-init.c b/glib/glib-init.c
index 1111111..2222222 100644
--- a/glib/glib-init.c
+++ b/glib/glib-init.c
@@ -245,14 +245,14 @@ glib_init (void)
@@ -271,14 +271,14 @@ glib_init (void)
#if defined (G_OS_WIN32)
@ -86,147 +104,59 @@ index 1111111..2222222 100644
DWORD fdwReason,
LPVOID lpvReserved)
{
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 1111111..2222222 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4450,7 +4450,7 @@ gobject_init (void)
_g_signal_init ();
}
-#if defined (G_OS_WIN32)
+#if 0
BOOL WINAPI DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:27:22 +0200
Subject: [PATCH 03/10] Allow building without inotify support
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1599,10 +1599,16 @@ dnl *****************************
dnl ** Check for inotify (GIO) **
dnl *****************************
inotify_support=no
+ AC_ARG_ENABLE(inotify,
+ AC_HELP_STRING([--disable-inotify],
+ [build without inotify support]))
+
+ if test "x$enable_inotify" != "xno"; then
AC_CHECK_HEADERS([sys/inotify.h],
[
AC_CHECK_FUNCS(inotify_init1, [inotify_support=yes], [inotify_support=no])
])
+fi
AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:28:14 +0200
Subject: [PATCH 04/10] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
Backported from upstream
diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -511,6 +511,8 @@ LT_INIT([disable-static win32-dll])
dnl when using libtool 2.x create libtool early, because it's used in configure
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF
+AS_IF([false], [AC_CHECK_HEADER([stdint.h])])
AS_IF([test "$glib_native_win32" = "yes"], [
if test x$enable_static = xyes -a x$enable_shared = xyes; then
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:29:06 +0200
Subject: [PATCH 05/10] Link with dnsapi
diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
index 1111111..2222222 100644
--- a/gio-2.0.pc.in
+++ b/gio-2.0.pc.in
@@ -13,6 +13,6 @@ Description: glib I/O library
Version: @VERSION@
Requires: glib-2.0 gobject-2.0
Requires.private: gmodule-no-export-2.0
-Libs: -L${libdir} -lgio-2.0
+Libs: -L${libdir} -lgio-2.0 -ldnsapi -liphlpapi
Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@
Cflags:
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans Petter Jansson <hpj@cl.no>
Date: Fri, 15 Jun 2012 15:29:38 +0200
Subject: [PATCH 06/10] Ensure globals are initialized even when DllMain is not
being run
diff --git a/glib/gmain.c b/glib/gmain.c
index 1111111..2222222 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2657,12 +2657,15 @@ g_get_real_time (void)
#if defined (G_OS_WIN32)
static ULONGLONG (*g_GetTickCount64) (void) = NULL;
static guint32 g_win32_tick_epoch = 0;
+static gboolean g_win32_clock_is_initialized;
@@ -2850,12 +2850,15 @@ g_get_real_time (void)
* So for now we calculate (usec_per_sec / ticks_per_sec) and use floating point
*/
static gdouble g_monotonic_usec_per_tick = 0;
+static gboolean g_win32_clock_is_initialized = FALSE;
void
g_clock_win32_init (void)
{
HMODULE kernel32;
LARGE_INTEGER freq;
+ g_win32_clock_is_initialized = TRUE;
+
g_GetTickCount64 = NULL;
kernel32 = GetModuleHandle ("KERNEL32.DLL");
if (kernel32 != NULL)
@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void)
* timeBeginPeriod() to increase it as much as they want
*/
if (!QueryPerformanceFrequency (&freq) || freq.QuadPart == 0)
{
/* The documentation says that this should never happen */
@@ -2869,6 +2872,10 @@ g_clock_win32_init (void)
gint64
g_get_monotonic_time (void)
{
+
+ if (!g_win32_clock_is_initialized)
+ g_clock_win32_init ();
+
if (g_GetTickCount64 != NULL)
if (G_LIKELY (g_monotonic_usec_per_tick != 0))
{
guint32 ticks_as_32bit;
LARGE_INTEGER ticks;
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 1111111..2222222 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -116,18 +116,28 @@ typedef struct
void (__stdcall * WakeConditionVariable) (gpointer cond);
} GThreadImplVtable;
@@ -61,6 +61,10 @@ g_thread_abort (gint status,
g_abort ();
}
+/* Needed for static builds where DllMain initializer doesn't get called */
+static gboolean g_threads_is_initialized;
+static gboolean g_threads_is_initialized = FALSE;
+G_GNUC_INTERNAL void g_thread_win32_init (void);
+
static GThreadImplVtable g_thread_impl_vtable;
/* {{{1 GMutex */
/* Starting with Vista and Windows 2008, we have access to the
* CONDITION_VARIABLE and SRWLock primatives on Windows, which are
* pretty reasonable approximations of the primatives specified in
@@ -79,29 +83,39 @@ g_thread_abort (gint status,
void
g_mutex_init (GMutex *mutex)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.InitializeSRWLock (mutex);
InitializeSRWLock ((gpointer) mutex);
}
void
@ -234,18 +164,14 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
if (g_thread_impl_vtable.DeleteSRWLock != NULL)
g_thread_impl_vtable.DeleteSRWLock (mutex);
}
@@ -135,18 +145,27 @@ g_mutex_clear (GMutex *mutex)
void
g_mutex_lock (GMutex *mutex)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.AcquireSRWLockExclusive (mutex);
AcquireSRWLockExclusive ((gpointer) mutex);
}
gboolean
@ -253,8 +179,7 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
return g_thread_impl_vtable.TryAcquireSRWLockExclusive (mutex);
return TryAcquireSRWLockExclusive ((gpointer) mutex);
}
void
@ -262,11 +187,10 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.ReleaseSRWLockExclusive (mutex);
ReleaseSRWLockExclusive ((gpointer) mutex);
}
@@ -157,6 +176,9 @@ g_rec_mutex_impl_new (void)
@@ -112,6 +126,9 @@ g_rec_mutex_impl_new (void)
{
CRITICAL_SECTION *cs;
@ -276,7 +200,7 @@ index 1111111..2222222 100644
cs = g_slice_new (CRITICAL_SECTION);
InitializeCriticalSection (cs);
@@ -167,6 +189,10 @@ static void
@@ -122,6 +139,10 @@ static void
g_rec_mutex_impl_free (CRITICAL_SECTION *cs)
{
DeleteCriticalSection (cs);
@ -287,7 +211,7 @@ index 1111111..2222222 100644
g_slice_free (CRITICAL_SECTION, cs);
}
@@ -175,6 +201,9 @@ g_rec_mutex_get_impl (GRecMutex *mutex)
@@ -130,6 +151,9 @@ g_rec_mutex_get_impl (GRecMutex *mutex)
{
CRITICAL_SECTION *impl = mutex->p;
@ -297,7 +221,7 @@ index 1111111..2222222 100644
if G_UNLIKELY (mutex->p == NULL)
{
impl = g_rec_mutex_impl_new ();
@@ -189,30 +218,45 @@ g_rec_mutex_get_impl (GRecMutex *mutex)
@@ -144,30 +168,45 @@ g_rec_mutex_get_impl (GRecMutex *mutex)
void
g_rec_mutex_init (GRecMutex *mutex)
{
@ -343,14 +267,13 @@ index 1111111..2222222 100644
return TryEnterCriticalSection (g_rec_mutex_get_impl (mutex));
}
@@ -221,12 +265,18 @@ g_rec_mutex_trylock (GRecMutex *mutex)
@@ -176,47 +215,64 @@ g_rec_mutex_trylock (GRecMutex *mutex)
void
g_rw_lock_init (GRWLock *lock)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.InitializeSRWLock (lock);
InitializeSRWLock ((gpointer) lock);
}
void
@ -358,18 +281,15 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
if (g_thread_impl_vtable.DeleteSRWLock != NULL)
g_thread_impl_vtable.DeleteSRWLock (lock);
}
@@ -234,36 +284,54 @@ g_rw_lock_clear (GRWLock *lock)
void
g_rw_lock_writer_lock (GRWLock *lock)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.AcquireSRWLockExclusive (lock);
AcquireSRWLockExclusive ((gpointer) lock);
}
gboolean
@ -377,8 +297,7 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
return g_thread_impl_vtable.TryAcquireSRWLockExclusive (lock);
return TryAcquireSRWLockExclusive ((gpointer) lock);
}
void
@ -386,8 +305,7 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.ReleaseSRWLockExclusive (lock);
ReleaseSRWLockExclusive ((gpointer) lock);
}
void
@ -395,8 +313,7 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.AcquireSRWLockShared (lock);
AcquireSRWLockShared ((gpointer) lock);
}
gboolean
@ -404,8 +321,7 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
return g_thread_impl_vtable.TryAcquireSRWLockShared (lock);
return TryAcquireSRWLockShared ((gpointer) lock);
}
void
@ -413,18 +329,16 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.ReleaseSRWLockShared (lock);
ReleaseSRWLockShared ((gpointer) lock);
}
@@ -271,12 +339,18 @@ g_rw_lock_reader_unlock (GRWLock *lock)
@@ -224,23 +280,31 @@ g_rw_lock_reader_unlock (GRWLock *lock)
void
g_cond_init (GCond *cond)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.InitializeConditionVariable (cond);
InitializeConditionVariable ((gpointer) cond);
}
void
@ -432,18 +346,14 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
if (g_thread_impl_vtable.DeleteConditionVariable)
g_thread_impl_vtable.DeleteConditionVariable (cond);
}
@@ -284,12 +358,18 @@ g_cond_clear (GCond *cond)
void
g_cond_signal (GCond *cond)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.WakeConditionVariable (cond);
WakeConditionVariable ((gpointer) cond);
}
void
@ -451,41 +361,40 @@ index 1111111..2222222 100644
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.WakeAllConditionVariable (cond);
WakeAllConditionVariable ((gpointer) cond);
}
@@ -297,6 +377,9 @@ void
@@ -248,6 +312,8 @@ void
g_cond_wait (GCond *cond,
GMutex *entered_mutex)
{
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
g_thread_impl_vtable.SleepConditionVariableSRW (cond, entered_mutex, INFINITE, 0);
SleepConditionVariableSRW ((gpointer) cond, (gpointer) entered_mutex, INFINITE, 0);
}
@@ -307,6 +390,9 @@ g_cond_wait_until (GCond *cond,
{
gint64 span;
@@ -260,6 +326,9 @@ g_cond_wait_until (GCond *cond,
DWORD span_millis;
gboolean signalled;
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
span = end_time - g_get_monotonic_time ();
if G_UNLIKELY (span < 0)
@@ -339,6 +425,9 @@ g_private_get_impl (GPrivate *key)
start_time = g_get_monotonic_time ();
do
{
@@ -311,6 +380,10 @@ g_private_get_impl (GPrivate *key)
if G_UNLIKELY (impl == 0)
{
+
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
EnterCriticalSection (&g_private_lock);
impl = (DWORD) key->p;
if (impl == 0)
@@ -432,6 +521,9 @@ g_system_thread_free (GRealThread *thread)
@@ -404,6 +477,9 @@ g_system_thread_free (GRealThread *thread)
{
GThreadWin32 *wt = (GThreadWin32 *) thread;
@ -495,7 +404,7 @@ index 1111111..2222222 100644
win32_check_for_error (CloseHandle (wt->handle));
g_slice_free (GThreadWin32, wt);
}
@@ -439,6 +531,9 @@ g_system_thread_free (GRealThread *thread)
@@ -411,6 +487,9 @@ g_system_thread_free (GRealThread *thread)
void
g_system_thread_exit (void)
{
@ -505,7 +414,7 @@ index 1111111..2222222 100644
_endthreadex (0);
}
@@ -447,6 +542,9 @@ g_thread_win32_proxy (gpointer data)
@@ -419,6 +498,9 @@ g_thread_win32_proxy (gpointer data)
{
GThreadWin32 *self = data;
@ -515,17 +424,17 @@ index 1111111..2222222 100644
self->proxy (self);
g_system_thread_exit ();
@@ -464,6 +562,9 @@ g_system_thread_new (GThreadFunc func,
GThreadWin32 *thread;
guint ignore;
@@ -452,6 +534,9 @@ g_system_thread_new (GThreadFunc proxy,
const gchar *message = NULL;
int thread_prio;
+ if (!g_threads_is_initialized)
+ g_thread_win32_init ();
+
thread = g_slice_new0 (GThreadWin32);
thread->proxy = func;
@@ -493,6 +594,9 @@ g_system_thread_wait (GRealThread *thread)
thread->proxy = proxy;
thread->handle = (HANDLE) NULL;
@@ -535,6 +620,9 @@ g_system_thread_wait (GRealThread *thread)
{
GThreadWin32 *wt = (GThreadWin32 *) thread;
@ -535,56 +444,72 @@ index 1111111..2222222 100644
win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
}
@@ -1041,6 +1145,8 @@ g_thread_lookup_native_funcs (void)
void
g_thread_win32_init (void)
@@ -608,6 +696,8 @@ g_thread_win32_init (void)
{
InitializeCriticalSection (&g_private_lock);
+ g_threads_is_initialized = TRUE;
+
if (!g_thread_lookup_native_funcs ())
g_thread_xp_init ();
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gerardo Ballabio <gerardo.ballabio@gmail.com>
Date: Sun, 16 Aug 2015 13:18:24 +0200
Subject: [PATCH 07/10] Remove an annoying runtime warning
that pops up when using GtkApplication in Gtk+ 3 programs.
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
#ifndef _MSC_VER
SetThreadName_VEH_handle = AddVectoredExceptionHandler (1, &SetThreadName_VEH);
if (SetThreadName_VEH_handle == NULL)
diff --git a/glib/meson.build b/glib/meson.build
index 1111111..2222222 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -402,11 +402,13 @@ if host_system == 'windows'
executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
install : true,
gui_app : true,
+ link_args : [ '-liconv' ],
include_directories : configinc,
dependencies : [libglib_dep])
executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
install : true,
c_args : ['-DHELPER_CONSOLE'],
+ link_args : [ '-liconv' ],
include_directories : configinc,
dependencies : [libglib_dep])
endif
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 1111111..2222222 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -1387,6 +1387,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
__declspec(dllexport) void CALLBACK
g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow)
{
+ /*
GDBusDaemon *daemon;
GMainLoop *loop;
const char *address;
@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
g_main_loop_unref (loop);
g_object_unref (daemon);
+ */
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4456,7 +4456,7 @@ gobject_init (void)
_g_signal_init ();
}
static gchar *
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: aquiles2k <aj@elane2k.com>
Date: Wed, 6 Apr 2016 22:39:53 +0300
Subject: [PATCH 08/10] fix error "won't overwrite defined macro" on OSX
See https://github.com/mxe/mxe/issues/1281
-#if defined (G_OS_WIN32)
+#if 0
BOOL WINAPI DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
diff --git a/gobject/meson.build b/gobject/meson.build
index 1111111..2222222 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -143,9 +143,16 @@ libgobject_dep = declare_dependency(link_with : libgobject,
include_directories : [gobjectinc],
dependencies : [libglib_dep, glib_enumtypes_dep])
+if host_system == 'windows'
+executable('gobject-query', 'gobject-query.c',
+ install : true,
+ link_args : [ '-liconv' ],
+ dependencies : [libglib_dep, libgobject_dep])
+else
executable('gobject-query', 'gobject-query.c',
install : true,
dependencies : [libglib_dep, libgobject_dep])
+endif
install_data('gobject_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
gdb_conf = configuration_data()
diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
index 1111111..2222222 100644
--- a/m4macros/glib-gettext.m4
+++ b/m4macros/glib-gettext.m4
@@ -36,8 +36,8 @@ dnl We go to great lengths to make sure that aclocal won't
@@ -39,8 +39,8 @@ dnl We go to great lengths to make sure that aclocal won't
dnl try to pull in the installed version of these macros
dnl when running aclocal in the glib directory.
dnl
@ -595,111 +520,3 @@ index 1111111..2222222 100644
dnl
dnl At the end, if we're not within glib, we'll define the public
dnl definitions in terms of our private definitions.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Mon, 26 Feb 2018 16:09:53 +1100
Subject: [PATCH 09/10] darwin: disable g_cocoa_notification_backend
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 1111111..2222222 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -279,10 +279,6 @@ unix_sources = \
appinfo_sources += $(unix_appinfo_sources)
-if OS_COCOA
-unix_sources += gcocoanotificationbackend.c
-endif
-
giounixincludedir=$(includedir)/gio-unix-2.0/gio
giounixinclude_HEADERS = \
gdesktopappinfo.h \
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 1111111..2222222 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -918,9 +918,6 @@ extern GType g_proxy_resolver_portal_get_type (void);
extern GType g_network_monitor_portal_get_type (void);
#endif
-#ifdef HAVE_COCOA
-extern GType g_cocoa_notification_backend_get_type (void);
-#endif
#ifdef G_PLATFORM_WIN32
@@ -1117,9 +1114,6 @@ _g_io_modules_ensure_loaded (void)
g_type_ensure (g_network_monitor_portal_get_type ());
g_type_ensure (g_proxy_resolver_portal_get_type ());
#endif
-#ifdef HAVE_COCOA
- g_type_ensure (g_cocoa_notification_backend_get_type ());
-#endif
#ifdef G_OS_WIN32
g_type_ensure (_g_winhttp_vfs_get_type ());
#endif
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
Date: Tue, 29 Jan 2019 09:50:46 +0100
Subject: [PATCH 10/10] gdbus: Avoid printing null strings
This mostly affects the 2.56 branch, but, given that GCC 9 is being
stricter about passing null string pointers to printf-like functions, it
might make sense to proactively fix such calls.
gdbusauth.c: In function '_g_dbus_auth_run_server':
gdbusauth.c:1302:11: error: '%s' directive argument is null
[-Werror=format-overflow=]
1302 | debug_print ("SERVER: WaitingForBegin, read '%s'",
line);
|
gdbusmessage.c: In function g_dbus_message_to_blob:
gdbusmessage.c:2730:30: error: %s directive argument is null [-Werror=format-overflow=]
2730 | tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
|
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index 1111111..2222222 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -1295,9 +1295,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
&line_length,
cancellable,
error);
- debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (line == NULL)
goto out;
+ debug_print ("SERVER: WaitingForBegin, read '%s'", line);
if (g_strcmp0 (line, "BEGIN") == 0)
{
/* YAY, done! */
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 1111111..2222222 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -2695,7 +2695,6 @@ g_dbus_message_to_blob (GDBusMessage *message,
if (message->body != NULL)
{
gchar *tupled_signature_str;
- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
if (signature == NULL)
{
g_set_error (error,
@@ -2703,10 +2702,10 @@ g_dbus_message_to_blob (GDBusMessage *message,
G_IO_ERROR_INVALID_ARGUMENT,
_("Message body has signature '%s' but there is no signature header"),
signature_str);
- g_free (tupled_signature_str);
goto out;
}
- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
+ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
{
g_set_error (error,
G_IO_ERROR,

@ -4,86 +4,30 @@ PKG := glib
$(PKG)_WEBSITE := https://gtk.org/
$(PKG)_DESCR := GLib
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.50.2
$(PKG)_CHECKSUM := be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5
$(PKG)_VERSION := 2.64.1
$(PKG)_CHECKSUM := 17967603bcb44b6dbaac47988d80c29a3d28519210b28157c2bd10997595bbc7
$(PKG)_SUBDIR := glib-$($(PKG)_VERSION)
$(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
$(PKG)_DEPS := cc dbus gettext libffi libiconv pcre zlib $(BUILD)~$(PKG)
$(PKG)_DEPS := cc meson-conf dbus gettext libffi libiconv pcre zlib $(BUILD)~$(PKG)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) := autotools gettext libffi libiconv zlib
$(PKG)_DEPS_$(BUILD) := meson ninja gettext libffi libiconv zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://gitlab.gnome.org/GNOME/glib/tags' | \
$(SED) -n "s,.*<a [^>]\+>v\?\([0-9]\+\.[0-9.]\+\)<.*,\1,p" | \
$(call MXE_GET_GH_TAGS,GNOME/glib) | \
grep -v '\([0-9]\+\.\)\{2\}9[0-9]' | \
$(SORT) -Vr | \
head -1
endef
define $(PKG)_BUILD_DARWIN
# native build for glib-tools
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--enable-regex \
--disable-threads \
--disable-selinux \
--disable-inotify \
--disable-fam \
--disable-xattr \
--disable-dtrace \
--disable-libmount \
--with-pcre=internal \
PKG_CONFIG='$(PREFIX)/$(TARGET)/bin/pkgconf' \
CPPFLAGS='-I$(PREFIX)/$(TARGET).gnu/include' \
LDFLAGS='-L$(PREFIX)/$(TARGET).gnu/lib'
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
$(MAKE) -C '$(BUILD_DIR)/gio/xdgmime' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gio/kqueue' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-schemas
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-resources
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
endef
define $(PKG)_BUILD_NATIVE
# native build for glib-tools
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--enable-regex \
--disable-threads \
--disable-selinux \
--disable-inotify \
--disable-fam \
--disable-xattr \
--disable-dtrace \
--disable-libmount \
--with-libiconv=gnu \
--with-pcre=internal \
PKG_CONFIG='$(PREFIX)/$(TARGET)/bin/pkgconf' \
CPPFLAGS='-I$(PREFIX)/$(TARGET)/include' \
LDFLAGS='-L$(PREFIX)/$(TARGET)/lib'
$(SED) -i 's,#define G_ATOMIC.*,,' '$(BUILD_DIR)/config.h'
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
$(MAKE) -C '$(BUILD_DIR)/gio/xdgmime' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-schemas
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' glib-compile-resources
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
$(INSTALL) -m755 '$(BUILD_DIR)/gio/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
endef
define $(PKG)_BUILD_$(BUILD)
$(if $(findstring darwin, $(BUILD)), \
$($(PKG)_BUILD_DARWIN), \
$($(PKG)_BUILD_NATIVE))
cd '$(SOURCE_DIR)' && meson --prefix='$(PREFIX)/$(TARGET)' \
--buildtype=release \
--pkg-config-path='$(PREFIX)/$(TARGET)/bin/pkgconf' \
'$(BUILD_DIR)'
cd '$(BUILD_DIR)' && ninja
cd '$(BUILD_DIR)' && ninja install
endef
define $(PKG)_BUILD
@ -92,25 +36,7 @@ define $(PKG)_BUILD
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-genmarshal' '$(PREFIX)/$(TARGET)/bin/'
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-compile-schemas' '$(PREFIX)/$(TARGET)/bin/'
ln -sf '$(PREFIX)/$(BUILD)/bin/glib-compile-resources' '$(PREFIX)/$(TARGET)/bin/'
# cross build
cd '$(SOURCE_DIR)' && NOCONFIGURE=true ./autogen.sh
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--with-threads=win32 \
--with-pcre=system \
--with-libiconv=gnu \
--disable-inotify \
CXX='$(TARGET)-g++' \
PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \
GLIB_GENMARSHAL='$(PREFIX)/$(TARGET)/bin/glib-genmarshal' \
GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' \
GLIB_COMPILE_RESOURCES='$(PREFIX)/$(TARGET)/bin/glib-compile-resources'
$(MAKE) -C '$(BUILD_DIR)/glib' -j '$(JOBS)' install sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(BUILD_DIR)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(BUILD_DIR)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(BUILD_DIR)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(BUILD_DIR)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF=
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' install-pkgconfigDATA
$(MAKE) -C '$(BUILD_DIR)/m4macros' install
cd '$(SOURCE_DIR)' && $(TARGET)-meson '$(BUILD_DIR)'
cd '$(BUILD_DIR)' && ninja
cd '$(BUILD_DIR)' && ninja install
endef

Loading…
Cancel
Save