summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Murino2018-09-01 17:13:19 +0200
committerNicola Murino2018-09-01 17:13:19 +0200
commitf71a703f5daec4de750afa8cc46c9ac40a69b5b4 (patch)
tree0a283dfaa6a6a9e457eb7ecda966cf96460faceb
parentc4e6ccc2b7eb8212ab20817a3c6528d069bc411c (diff)
downloadaur-f71a703f5daec4de750afa8cc46c9ac40a69b5b4.tar.gz
Update to 2.58.0-1
-rw-r--r--.SRCINFO32
-rw-r--r--0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch124
-rw-r--r--0024-return-actually-written-data-in-printf.all.patch23
-rw-r--r--0028-inode_directory.patch12
-rw-r--r--PKGBUILD71
-rw-r--r--glib-formaterror.patch13
-rw-r--r--glib-include-time-h-for-localtime_r.patch10
-rw-r--r--glib-prefer-constructors-over-DllMain.patch (renamed from 0004-glib-prefer-constructors-over-DllMain.patch)33
-rw-r--r--skip-broken-timer-test.patch12
-rw-r--r--use-pkgconfig-file-for-intl.patch23
10 files changed, 162 insertions, 191 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c85c20d2ff58..8fe2eba456e6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,13 @@
# Generated by mksrcinfo v8
-# Sat Aug 18 06:41:54 UTC 2018
+# Sat Sep 1 15:12:47 UTC 2018
pkgbase = mingw-w64-glib2
pkgdesc = Low level core library (mingw-w64)
- pkgver = 2.56.2
- pkgrel = 2
- url = http://www.gtk.org/
+ pkgver = 2.58.0
+ pkgrel = 1
+ url = https://wiki.gnome.org/Projects/GLib
arch = any
license = LGPL2.1
- makedepends = mingw-w64-configure
- makedepends = python
- makedepends = shared-mime-info
+ makedepends = mingw-w64-meson
makedepends = git
depends = mingw-w64-libffi
depends = mingw-w64-pcre
@@ -19,20 +17,18 @@ pkgbase = mingw-w64-glib2
options = !buildflags
options = staticlibs
options = !emptydirs
- source = git+https://gitlab.gnome.org/GNOME/glib.git#commit=d4b60396c79c7294ab69a2c591518e76ab17b603
- source = 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
- source = 0004-glib-prefer-constructors-over-DllMain.patch
- source = 0028-inode_directory.patch
- source = use-pkgconfig-file-for-intl.patch
- source = skip-broken-timer-test.patch
+ source = git+https://gitlab.gnome.org/GNOME/glib.git#commit=f0b57dd7a80425264e318f85c331a039a3cddd87
source = 0001-gsocket-fix-cross-compilation.patch
+ source = 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
+ source = glib-formaterror.patch
+ source = glib-include-time-h-for-localtime_r.patch
+ source = glib-prefer-constructors-over-DllMain.patch
sha256sums = SKIP
- sha256sums = ef81e82e15fb3a71bad770be17fe4fea3f4d9cdee238d6caa39807eeea5da3e3
- sha256sums = 7b099af0c562f397458542482d6d1debe437f220762aa2ed94b2e6c4d43dd8a6
- sha256sums = f7f06a90156fe0a308412512c359072922f7f0d19dd4bed30d863db18e48940b
- sha256sums = 1991eaa0471ff8d0b3dd3bccccd560ca6cc8c0995c6145b9bc93d5e90755e3f4
- sha256sums = a39dc8c1c1707053d565d5b198b1f03f7c55b31e11335a1bfdc3f9803b114d5d
sha256sums = 44c8c6b4ca376177a8c333a00c3485d638f8641967503e15364606d4c4292ff3
+ sha256sums = afd62a852a0b6aed4ce86eb97297e5080b26055cc878413b89d482c184b826b3
+ sha256sums = ea529d5cbf8cf7ca66467664a3ead37473a1c009ac973d5694b06cc9d0b23df3
+ sha256sums = ac567f7a9cad51ab97dba70bcdd6c0c16f93d2451c43fde380e4fdb20b2d4b31
+ sha256sums = 8a02502069fa88c667a4fd1599280f927cb1bcf61e9fcd369fec5bdb5440d480
pkgname = mingw-w64-glib2
diff --git a/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch b/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
index e53fd8d166f9..c3c4c756638b 100644
--- a/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
+++ b/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
@@ -1,7 +1,28 @@
-diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
---- glib-2.46.0-orig/glib/gstdio.c 2015-02-26 15:57:09.000000000 +0300
-+++ glib-2.46.0/glib/gstdio.c 2015-09-22 09:08:58.032066100 +0300
-@@ -192,6 +192,11 @@
+From 7f4f4354540440c0a8a37beaccbec8bc7fc15ec7 Mon Sep 17 00:00:00 2001
+From: Erik van Pienbroek <epienbro@fedoraproject.org>
+Date: Mon, 27 Aug 2012 23:28:54 +0200
+Subject: [PATCH] Use CreateFile on Win32 to make sure g_unlink always works
+
+The functions g_open(), g_creat() and g_fopen() defer to _wopen(),
+_wcreat() and _wfopen() respectively. This is very similar to
+the corresponding arrangement for Linux. However, those Windows
+functions do not support renaming a file whilst it's open. As a
+result, g_rename() behaves differently on the Windows platform
+compared to its Linux behaviour, where files can be renamed even
+while there are file handles still open. Resolved this by using
+the Win32 API function CreateFile() instead of _wopen(), _wcreat()
+and _wfopen()
+
+Patch initially created by John Emmas
+---
+ glib/gstdio.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 233 insertions(+), 26 deletions(-)
+
+diff --git a/glib/gstdio.c b/glib/gstdio.c
+index 6d763e1..c1d072f 100644
+--- a/glib/gstdio.c
++++ b/glib/gstdio.c
+@@ -758,6 +758,11 @@
int mode)
{
#ifdef G_OS_WIN32
@@ -9,11 +30,11 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ DWORD dwDesiredAccess = 0;
+ DWORD dwFlagsAndAttributes = 0;
+ DWORD dwDisposition = OPEN_EXISTING;
-+ DWORD dwSharedAccess = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
++ DWORD dwSharedAccess = FILE_SHARE_READ | FILE_SHARE_DELETE;
wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
int retval;
int save_errno;
-@@ -202,12 +207,114 @@
+@@ -768,12 +773,114 @@
return -1;
}
@@ -29,45 +50,45 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ {
+ /* Equates to _O_RDONLY */
+ if (flags & _O_TRUNC)
-+ {
-+ errno = EINVAL;
-+ g_free (wfilename);
-+ return -1;
-+ }
++ {
++ errno = EINVAL;
++ g_free (wfilename);
++ return -1;
++ }
- g_free (wfilename);
-+ dwDesiredAccess |= GENERIC_READ;
-+ dwSharedAccess |= FILE_SHARE_WRITE;
++ dwDesiredAccess |= GENERIC_READ;
++ dwSharedAccess |= FILE_SHARE_WRITE;
+ }
+ if (flags & _O_WRONLY)
+ {
+ if (flags & _O_RDWR)
-+ {
-+ errno = EINVAL;
-+ g_free (wfilename);
-+ return -1;
-+ }
-
-+ dwDesiredAccess |= GENERIC_WRITE;
++ {
++ errno = EINVAL;
++ g_free (wfilename);
++ return -1;
++ }
++
++ dwDesiredAccess |= GENERIC_WRITE;
+ }
+ if (flags & _O_RDWR)
+ {
-+ dwDesiredAccess |= GENERIC_READ;
-+ dwDesiredAccess |= GENERIC_WRITE;
++ dwDesiredAccess |= GENERIC_READ;
++ dwDesiredAccess |= GENERIC_WRITE;
+ }
+ if (flags & _O_TRUNC)
+ {
+ if (flags & _O_CREAT)
-+ dwDisposition = CREATE_ALWAYS;
-+ else
-+ dwDisposition = TRUNCATE_EXISTING;
++ dwDisposition = CREATE_ALWAYS;
++ else
++ dwDisposition = TRUNCATE_EXISTING;
+ }
+ if ((flags & _O_CREAT) && !(flags & _O_TRUNC))
+ {
+ if (flags & _O_EXCL)
-+ dwDisposition = CREATE_NEW;
-+ else
-+ dwDisposition = OPEN_ALWAYS;
++ dwDisposition = CREATE_NEW;
++ else
++ dwDisposition = OPEN_ALWAYS;
+ }
+ if (flags & _O_CREAT)
+ {
@@ -112,7 +133,7 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ }
+ else
+ retval = _open_osfhandle((long)hFile, flags);
-+
+
+ if ((-1) != retval)
+ {
+ /* We have a valid file handle. Set its translation mode to text or binary, as appropriate */
@@ -131,7 +152,7 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
return retval;
#else
int fd;
-@@ -254,6 +361,8 @@
+@@ -821,6 +928,8 @@
int mode)
{
#ifdef G_OS_WIN32
@@ -140,7 +161,7 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
int retval;
int save_errno;
-@@ -264,12 +373,41 @@
+@@ -831,12 +940,41 @@
return -1;
}
@@ -185,12 +206,13 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
return retval;
#else
return creat (filename, mode);
-@@ -702,33 +840,102 @@
+@@ -1286,36 +1424,102 @@
const gchar *mode)
{
#ifdef G_OS_WIN32
- wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
- wchar_t *wmode;
+- gchar *mode2;
- FILE *retval;
- int save_errno;
-
@@ -200,7 +222,9 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
- return NULL;
- }
-
-- wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL);
+- mode2 = _g_win32_get_mode_alias (mode);
+- wmode = g_utf8_to_utf16 (mode2, -1, NULL, NULL, NULL);
+- g_free (mode2);
-
- if (wmode == NULL)
- {
@@ -208,12 +232,6 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
- errno = EINVAL;
- return NULL;
- }
--
-- retval = _wfopen (wfilename, wmode);
-- save_errno = errno;
--
-- g_free (wfilename);
-- g_free (wmode);
+ int hFile;
+ int flags = 0;
+ gchar priv_mode[4];
@@ -226,7 +244,7 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ }
+ if ((strlen(mode) < 1) || (strlen(mode) > 3))
+ {
-+ errno = EINVAL;
++ errno - EINVAL;
+ goto out;
+ }
+
@@ -253,10 +271,10 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ else if (0 == strcmp(priv_mode, "w+t"))
+ flags = _O_RDWR | _O_CREAT |_O_TRUNC | _O_TEXT;
+ else
-+ {
-+ errno = EINVAL;
++ {
++ errno = EINVAL;
+ goto out;
-+ }
++ }
+ }
+ }
+ if (2 == strlen(priv_mode))
@@ -280,10 +298,10 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ else if (0 == strcmp(priv_mode, "wt"))
+ flags = _O_WRONLY | _O_CREAT | _O_TRUNC | _O_TEXT;
+ else
-+ {
-+ errno = EINVAL;
++ {
++ errno = EINVAL;
+ goto out;
-+ }
++ }
+ }
+ }
+ if (1 == strlen(priv_mode))
@@ -295,14 +313,18 @@ diff -Naur glib-2.46.0-orig/glib/gstdio.c glib-2.46.0/glib/gstdio.c
+ else if (0 == strcmp(priv_mode, "w"))
+ flags = _O_WRONLY | _O_CREAT | _O_TRUNC;
+ else if ( !((0 == strcmp(priv_mode, "c")) || (0 == strcmp(priv_mode, "n"))))
-+ {
-+ errno = EINVAL;
++ {
++ errno = EINVAL;
+ goto out;
-+ }
++ }
+ }
-+
+
+- retval = _wfopen (wfilename, wmode);
+- save_errno = errno;
+ hFile = g_open (filename, flags, (_S_IREAD | _S_IWRITE));
-+
+
+- g_free (wfilename);
+- g_free (wmode);
+ if (INVALID_HANDLE_VALUE == (HANDLE)hFile)
+ /* 'errno' will have already been set by 'g_open()' */
+ retval = NULL;
diff --git a/0024-return-actually-written-data-in-printf.all.patch b/0024-return-actually-written-data-in-printf.all.patch
deleted file mode 100644
index 478b2be211e0..000000000000
--- a/0024-return-actually-written-data-in-printf.all.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -Naur glib-2.46.0-orig/glib/gnulib/printf.c glib-2.46.0/glib/gnulib/printf.c
---- glib-2.46.0-orig/glib/gnulib/printf.c 2014-12-20 00:49:48.000000000 +0300
-+++ glib-2.46.0/glib/gnulib/printf.c 2015-09-22 09:09:03.834633700 +0300
-@@ -88,16 +88,16 @@
- int _g_gnulib_vfprintf (FILE *file, char const *format, va_list args)
- {
- char *result;
-- size_t length;
-+ size_t length, rlength;
-
- result = vasnprintf (NULL, &length, format, args);
- if (result == NULL)
- return -1;
-
-- fwrite (result, 1, length, file);
-+ rlength = fwrite (result, 1, length, file);
- free (result);
-
-- return length;
-+ return rlength;
- }
-
- int _g_gnulib_vsprintf (char *string, char const *format, va_list args)
diff --git a/0028-inode_directory.patch b/0028-inode_directory.patch
deleted file mode 100644
index fdb8048bf846..000000000000
--- a/0028-inode_directory.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur glib-2.46.0-orig/gio/glocalfileinfo.c glib-2.46.0/gio/glocalfileinfo.c
---- glib-2.46.0-orig/gio/glocalfileinfo.c 2015-08-21 08:00:49.000000000 +0300
-+++ glib-2.46.0/gio/glocalfileinfo.c 2015-09-22 09:09:05.410062000 +0300
-@@ -1232,7 +1232,7 @@
- (symlink_broken || (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)))
- return g_content_type_from_mime_type ("inode/symlink");
- else if (statbuf != NULL && S_ISDIR(statbuf->st_mode))
-- return g_content_type_from_mime_type ("inode/directory");
-+ return g_strdup ("inode/directory");
- #ifndef G_OS_WIN32
- else if (statbuf != NULL && S_ISCHR(statbuf->st_mode))
- return g_content_type_from_mime_type ("inode/chardevice");
diff --git a/PKGBUILD b/PKGBUILD
index 4c32500c9aeb..04ce7d560dc7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,30 +3,28 @@
# Contributor: ant32 <antreimer@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
pkgname=mingw-w64-glib2
-pkgver=2.56.2
-pkgrel=2
-_commit=d4b60396c79c7294ab69a2c591518e76ab17b603 # tags/2.56.2^0
+pkgver=2.58.0
+pkgrel=1
+_commit=f0b57dd7a80425264e318f85c331a039a3cddd87 # tags/2.58.0
arch=(any)
pkgdesc="Low level core library (mingw-w64)"
depends=(mingw-w64-libffi mingw-w64-pcre mingw-w64-gettext mingw-w64-zlib)
-makedepends=(mingw-w64-configure python shared-mime-info git)
+makedepends=(mingw-w64-meson git)
license=("LGPL2.1")
options=(!strip !buildflags staticlibs !emptydirs)
-url="http://www.gtk.org/"
+url="https://wiki.gnome.org/Projects/GLib"
source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
-"0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch"
-"0004-glib-prefer-constructors-over-DllMain.patch"
-"0028-inode_directory.patch"
-"use-pkgconfig-file-for-intl.patch"
-"skip-broken-timer-test.patch"
-"0001-gsocket-fix-cross-compilation.patch")
+ "0001-gsocket-fix-cross-compilation.patch"
+ "0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch"
+ "glib-formaterror.patch"
+ "glib-include-time-h-for-localtime_r.patch"
+ "glib-prefer-constructors-over-DllMain.patch")
sha256sums=('SKIP'
- 'ef81e82e15fb3a71bad770be17fe4fea3f4d9cdee238d6caa39807eeea5da3e3'
- '7b099af0c562f397458542482d6d1debe437f220762aa2ed94b2e6c4d43dd8a6'
- 'f7f06a90156fe0a308412512c359072922f7f0d19dd4bed30d863db18e48940b'
- '1991eaa0471ff8d0b3dd3bccccd560ca6cc8c0995c6145b9bc93d5e90755e3f4'
- 'a39dc8c1c1707053d565d5b198b1f03f7c55b31e11335a1bfdc3f9803b114d5d'
- '44c8c6b4ca376177a8c333a00c3485d638f8641967503e15364606d4c4292ff3')
+ '44c8c6b4ca376177a8c333a00c3485d638f8641967503e15364606d4c4292ff3'
+ 'afd62a852a0b6aed4ce86eb97297e5080b26055cc878413b89d482c184b826b3'
+ 'ea529d5cbf8cf7ca66467664a3ead37473a1c009ac973d5694b06cc9d0b23df3'
+ 'ac567f7a9cad51ab97dba70bcdd6c0c16f93d2451c43fde380e4fdb20b2d4b31'
+ '8a02502069fa88c667a4fd1599280f927cb1bcf61e9fcd369fec5bdb5440d480')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -37,45 +35,28 @@ pkgver() {
prepare() {
cd glib
- patch -Np1 -i .."/0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch"
- patch -Np1 -i ../0004-glib-prefer-constructors-over-DllMain.patch
- patch -Np1 -i ../"0028-inode_directory.patch"
- patch -p0 -i ../use-pkgconfig-file-for-intl.patch
- patch -Np1 -i ../skip-broken-timer-test.patch
+ patch -Np1 -i ../0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
+ patch -Np1 -i ../glib-prefer-constructors-over-DllMain.patch
+ patch -Np1 -i ../glib-formaterror.patch
+ patch -Np1 -i ../glib-include-time-h-for-localtime_r.patch
patch -Np1 -i ../0001-gsocket-fix-cross-compilation.patch
- NOCONFIGURE=1 ./autogen.sh
}
build() {
- cd glib
- conf="--with-pcre=system --with-threads=win32 --disable-fam"
for _arch in ${_architectures}; do
- mkdir -p build-${_arch}-static && pushd build-${_arch}-static
- ${_arch}-configure \
- --disable-shared $conf
- make
- popd
-
- mkdir -p build-${_arch}-shared && pushd build-${_arch}-shared
- ${_arch}-configure \
- --disable-static $conf
- make
- popd
+ mkdir -p "${srcdir}/glib/build-${_arch}"
+ cd "${srcdir}/glib/build-${_arch}"
+ ${_arch}-meson \
+ --default-library both ..
+ ninja
done
+
}
package() {
for _arch in ${_architectures}; do
- cd "$srcdir/glib/build-${_arch}-shared"
- make DESTDIR="$pkgdir" install
- make -C "$srcdir/glib/build-${_arch}-static" DESTDIR="$pkgdir/static" install
- mv "$pkgdir/static/usr/${_arch}/lib/"*.a "$pkgdir/usr/${_arch}/lib/"
- find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
- find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
- find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
- rm -r "$pkgdir/usr/${_arch}/lib/charset.alias"
- rm -r "$pkgdir/static"
+ DESTDIR="${pkgdir}" ninja -C "${srcdir}/glib/build-${_arch}" install
done
}
diff --git a/glib-formaterror.patch b/glib-formaterror.patch
new file mode 100644
index 000000000000..535906675b91
--- /dev/null
+++ b/glib-formaterror.patch
@@ -0,0 +1,13 @@
+--- glib-2.57.2/configure.ac 2018-07-31 20:31:07.000000000 +0200
++++ glib-2.57.2/configure.ac 2018-08-02 19:09:02.569368144 +0200
+@@ -3398,8 +3398,8 @@
+ -Wno-bad-function-cast \
+ -Werror=declaration-after-statement \
+ -Werror=missing-prototypes -Werror=implicit-function-declaration \
+- -Werror=pointer-arith -Werror=init-self -Werror=format-security \
+- -Werror=format=2 -Werror=missing-include-dirs])
++ -Werror=pointer-arith -Werror=init-self -Wno-error=format-security \
++ -Wno-error=format=2 -Werror=missing-include-dirs])
+ ])
+ AC_SUBST(GLIB_WARN_CFLAGS)
+
diff --git a/glib-include-time-h-for-localtime_r.patch b/glib-include-time-h-for-localtime_r.patch
new file mode 100644
index 000000000000..c23d26a06331
--- /dev/null
+++ b/glib-include-time-h-for-localtime_r.patch
@@ -0,0 +1,10 @@
+--- glib-2.43.2/glib/gdate.c.orig 2015-01-01 23:50:04.203252143 +0100
++++ glib-2.43.2/glib/gdate.c 2015-01-01 23:50:28.329647373 +0100
+@@ -41,6 +41,7 @@
+
+ #ifdef G_OS_WIN32
+ #include <windows.h>
++#include <time.h>
+ #endif
+
+ #include "gdate.h"
diff --git a/0004-glib-prefer-constructors-over-DllMain.patch b/glib-prefer-constructors-over-DllMain.patch
index 7cc925a886ee..2edec2b1ff5c 100644
--- a/0004-glib-prefer-constructors-over-DllMain.patch
+++ b/glib-prefer-constructors-over-DllMain.patch
@@ -1,7 +1,21 @@
-diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
---- glib-2.46.0-orig/glib/glib-init.c 2015-09-12 18:13:45.000000000 +0300
-+++ glib-2.46.0/glib/glib-init.c 2015-09-22 09:09:00.512195800 +0300
-@@ -238,12 +238,14 @@
+From bc90511c1eb333e26e0bc0eaee62375d0e788db6 Mon Sep 17 00:00:00 2001
+From: Erik van Pienbroek <epienbro@fedoraproject.org>
+Date: Tue, 16 Apr 2013 11:42:11 +0200
+Subject: [PATCH] win32: Prefer the use of constructors over DllMain
+
+This prevents having to depend on DllMain in static libraries
+
+Constructors are available in both the GCC build (GCC 2.7 and later)
+and the MSVC build (MSVC 2008 and later using _Pragma, earlier
+versions using #pragma)
+---
+ glib/glib-init.c | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/glib/glib-init.c b/glib/glib-init.c
+--- a/glib/glib-init.c 2018-08-02 16:09:46.277047195 +0200
++++ b/glib/glib-init.c 2018-08-02 16:10:23.617387056 +0200
+@@ -272,12 +272,14 @@
#if defined (G_OS_WIN32)
@@ -18,7 +32,7 @@ diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
-@@ -253,11 +255,6 @@
+@@ -287,13 +289,6 @@
{
case DLL_PROCESS_ATTACH:
glib_dll = hinstDLL;
@@ -27,10 +41,12 @@ diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
- g_thread_win32_init ();
-#endif
- glib_init ();
+- /* must go after glib_init */
+- g_console_win32_init ();
break;
case DLL_THREAD_DETACH:
-@@ -274,7 +271,10 @@
+@@ -317,7 +312,10 @@
return TRUE;
}
@@ -42,7 +58,7 @@ diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor)
-@@ -284,6 +284,12 @@
+@@ -327,7 +325,15 @@
static void
glib_init_ctor (void)
{
@@ -53,5 +69,8 @@ diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
+#endif /* defined (THREADS_WIN32) */
+#endif /* defined (G_OS_WIN32) */
glib_init ();
++ /* must go after glib_init */
++ g_console_win32_init ();
}
+ #else
diff --git a/skip-broken-timer-test.patch b/skip-broken-timer-test.patch
deleted file mode 100644
index a19c684f36c4..000000000000
--- a/skip-broken-timer-test.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git i/glib/tests/Makefile.am w/glib/tests/Makefile.am
-index 43b11f05da63fa02..37406ecdf17e0094 100644
---- i/glib/tests/Makefile.am
-+++ w/glib/tests/Makefile.am
-@@ -106,7 +106,6 @@ test_programs = \
- test-printf \
- thread \
- timeout \
-- timer \
- tree \
- utf8-performance \
- utf8-pointer \
diff --git a/use-pkgconfig-file-for-intl.patch b/use-pkgconfig-file-for-intl.patch
deleted file mode 100644
index 7ef25451d320..000000000000
--- a/use-pkgconfig-file-for-intl.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- glib-2.0.pc.in.orig 2015-03-23 04:22:18.000000000 +0100
-+++ glib-2.0.pc.in 2016-08-12 21:31:44.654422794 +0200
-@@ -10,7 +10,8 @@
- Name: GLib
- Description: C Utility Library
- Version: @VERSION@
--Requires.private: @PCRE_REQUIRES@
-+Requires: @INTL_REQUIRES@
-+Requires.private: @PCRE_REQUIRES@ @INTL_REQUIRES@
- Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
- Libs.private: @G_THREAD_LIBS@ @G_LIBS_EXTRA@ @PCRE_LIBS@ @INTLLIBS@ @ICONV_LIBS@ @CARBON_LIBS@ @COCOA_LIBS@
- Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
---- configure.ac.orig 2016-05-10 11:05:39.000000000 +0200
-+++ configure.ac 2016-08-12 21:39:53.980926453 +0200
-@@ -472,6 +472,8 @@
- fi
-
- LIBS="$INTLLIBS $LIBS"
-+INTL_REQUIRES=intl
-+AC_SUBST(INTL_REQUIRES)
-
- GETTEXT_PACKAGE=glib20
- AC_SUBST(GETTEXT_PACKAGE)