summaryrefslogtreecommitdiff
path: root/devel/glib2/patches
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2020-03-04 15:11:48 +0000
committerwiz <wiz@pkgsrc.org>2020-03-04 15:11:48 +0000
commit6aa79cd5eb86a214dc6fb1a4feee5e33278b5341 (patch)
treef03bf08816bf817b8c2bd95fb98cece50f6abddf /devel/glib2/patches
parent2f2c51141024bbf71dd231477df41577692055da (diff)
downloadpkgsrc-6aa79cd5eb86a214dc6fb1a4feee5e33278b5341.tar.gz
glib2 and friends: update to 2.64.0
Overview of changes in GLib 2.64.0 ================================== * Use `posix_spawn()` to speed up launching test D-Bus instances (!1388) * Bugs fixed: - #1783 Document using glib-mkenums with meson - #2049 Crash in g_array_copy - !1384 Some minor clang warning fixes - !1386 docs: Document generated headers caveats for genmarshal - !1387 ci: Correctly propagate exit status in run-style-check-diff.sh - !1388 gtestdbus: Use posix_spawn() to spawn dbus-daemon - !1389 Update GError docs to use G_DEFINE_QUARK * Translation updates: - Czech - Danish Overview of changes in GLib 2.63.6 ================================== * Fix potential relative read when calling g_printerr(), which could lead to a denial of service from a setuid-root process being used to block access to the TTY for another user (#1919) * Fix SOCKS proxy resolver sometimes not being used when resolving addresses via Happy Eyeballs (CVE-2020-6750) (#1989) * Several other Happy Eyeballs fixes for address resolution (#1871, #1872, #1902) * Various race fixes in `GDBusConnection` and its unit tests (#1515) * Fix a race condition with D-Bus name ownership (#1517) * Drop `gio-launch-desktop` helper application in favour of calling `sh` directly (#1633) * Fix win32 exception handling with C# exceptions (#2025) * Fix thread safety of `GUnixMountMonitor` (#2030) * Additional fixes to new thread pool attribute behaviour from GLib 2.63.4 to check if sched_setattr() is allowed by system policies before depending on it (#2039, !1356) * Fix memory leaks and corruption when freeing `GSource`s while freeing a `GMainContext` (!1353) * Drop inappropriate installation of object manager example documentation (!1359) * Bugs fixed: - #938 gdbus call -a doesn't support message bus connections - #1515 gio/gdbus-threading test sometimes fails in CI - #1517 g_bus_own_name does not always call name_lost_handler when _REPLACE and _ALLOW_REPLACEMENT are set - #1633 should not install gio-launch-desktop into PATH - #1919 read from relative path in g_printerr() in 2.58.3 - #1995 Tracker issue for Happy Eyeballs regressions - #2002 g_io_channel_read_line does not honour the line_term symbols set - #2025 W32 exception handling misbehaves when C# exceptions are thrown when running inside the Visual Studio debugger - #2030 Random nautilus test suite failures involving GUnixMountMonitor - #2039 sched_setattr() still can cause EPERM through natural causes - #2043 Low memory monitor test failed in CI - #2044 GApplication docs suggest invalid GVariant type - !1185 gtimezone: Tidy up UTC timezone creation - !1281 ci: Update Docker packages - !1283 gmodule: change _g_module_close to only take a handle. - !1298 tests: Speed up the GIO actions test - !1299 gapplication: Fix a minor typo in the documentation - !1339 gsocketclient: Refactor g_socket_client_connect_async() - !1353 GMainContext - Fix memory leaks and memory corruption when freeing sources while freeing a context - !1354 GThreadPool - Add test for !1340 - !1355 glist: Add docs examples of how to combine with g_steal_pointer() - !1356 GThread - Check if sched_setattr is allowed by the system policies before depending on it - !1359 docs: Don’t install object manager example separately - !1363 Make tests pass if we are euid != 0 with capabilities - !1366 Fix oss-fuzz coverage link - !1372 gobject: Fix strict aliasing warnings with g_set_object() - !1376 gitlab-ci: 64-bit ARM is aarch64, not arm64 - !1381 ghash: Document the iteration order over a hash table is not defined - !1382 tests: Bump the refcount timeout in gdbus-threading - !1383 ci: Enable parallelisation when running installed tests * Translation updates: - Basque - English (United Kingdom) - French - Galician - German - Greek, Modern (1453-) - Hungarian - Indonesian - Japanese - Korean - Lithuanian - Polish - Portuguese (Brazil) - Spanish - Swedish - Turkish Overview of changes in GLib 2.63.5 ================================== * Fix behaviour of `g_file_move()` fallback code to not follow symlinks (#986) * Rename `--glib-min-version` argument of `gdbus-codegen` to `--glib-min-required` (this is not an API break as `--glib-min-version` was added earlier in the 2.63 cycle) (#1993) * Add gtk-doc checks to CI and fix a number of documentation issues (thanks to Xavier Claessens) (!978) * Add `G_SIZEOF_MEMBER()` macro (!1333) * Add a debug message if `g_setenv()` or `g_unsetenv()` are used after any threads have been spawned — this will be upgraded to a warning in future (!1337, #715) * Skip memory monitor tests if xdg-desktop-portal or dbusmock are not available (!1296, !1338) * Change the `libmount` configure option from a boolean to a Meson `feature` (!1344) * Do not return `target-uri` from `g_file_peek_path()` when called on trash/recent files (!1346) * Drop new TLS certificate API for PKCS #11 backed certificates, as the implementation is not ready yet (this is not an API break as the API was added earlier in the 2.63 cycle) (!1347) * Bugs fixed: - #986 g_file_move: remove G_FILE_COPY_NOFOLLOW_SYMLINKS section - #1551 CI: Add checks for `TODO` in MRs - #1925 Large number of routes installed into kernel cause high cpu usage - #1993 Rename gdbus-codegen --glib-min-version argument to --glib-min-required and add --glib-max-allowed - #2012 spawn_thread_queue not initialised in GThreadPool - #2020 g_network_monitor_base_add_network() improperly unrefs GInetAddressMask - !978 Various fixes to make gtkdoc-check pass on glib - !1018 docs: tag enclose 'all' and 'help' values - !1170 Avoid C++20 deprecated assignment to volatile - !1296 tests: Skip GMemoryMonitor tests if the dbusmock template is not available - !1307 Remove global declaration of GMemoryMonitor - !1322 gmain: Mark G_SOURCE_FUNC as available in 2.58 - !1333 Add and use G_SIZEOF_MEMBER() macro - !1337 genviron: Message if g_setenv()/g_unsetenv() are used after threads spawned - !1338 tests: Skip GMemoryMonitor tests if xdg-desktop-portal is not available - !1344 meson: libmount autodectection - !1345 gio-tool-info: Print unix mount information where available - !1346 gfile: Do not return target-uri from g_file_peek_path() - !1347 Revert "gtlscertificate: Add support for PKCS #11 backed certificates" - !1348 ghash: Clarify that g_hash_table_add() always consumes the key - !1349 doc: Clarify that _locker_new() does not actually allocate memory - !1351 glib.supp: update g-threaded-resolver-getaddrinfo-config * Translation updates: - Japanese - Lithuanian - Malay - Portuguese (Brazil) - Swedish Overview of changes in GLib 2.63.4 ================================== * Fix various race conditions on signal emission in GDBus (#604, #978, #1232) * Change thread pools so that thread attributes (in particular, priority) are inherited from the thread which created the `GThreadPool` initially, rather than from the thread which is pushing a new job into the pool (#1834, #2007) * Expand support for running Windows apps with `g_app_info_launch_default_for_uri()` using rundll32 on Windows (#1932) * Support multiple directories in `GSETTINGS_SCHEMA_DIR` environment variable (#1998) * Support full Julian day range in `TZ` environment variable (#1999) * Apply recursion depth limits to variants in D-Bus messages (!1201) * Support adding call flags and timeouts to method calls generated by `gdbus-codegen` through the new `--glib-min-version` option (!1286) * Fully deprecate TLS rehandshakes; they are now ignored due to TLS protocol changes (!1305) * Bugs fixed: - #198 g_fopen and friends: should also state how to close a stream - #604 GDBus name watching dispatch is buggy/excessively-complicated - #833 g_object_set: document the need to cast varargs - #978 SIGSEGV in on_name_lost_or_acquired - #1232 Insufficient thread safety around GDBusObjectManagerClient - #1416 Re-add macOS CI - #1834 Unwanted priority/etc inheritance with GThreadPool and GThread and the POSIX implementation - #1932 Windows: Gio.AppInfo.launch_default_for_uri seems not to work for local files/folders - #1983 glib:gio / dbus-appinfo test fails: GLib-GIO:ERROR:../../../../Projects/glib/gio/tests/dbus-appinfo.c:326:on_flatpak_open: 'g_file_equal (files[0], f)' should be TRUE - #1997 Base64 encoding with "break_lines" claims to wrap at 72 characters but seems to wrap at 76 - #1998 support multiple directories in GSETTINGS_SCHEMA_DIR - #1999 GTimeZone fails to accept full Julian day range when parsing the direct $TZ string format - #2007 Thread scheduler attributes fail under valgrind - !388 ci: Avoid downloading subprojects for each job - !1111 gio: test that launch_uris() exports files with the document portal when launching a flatpak - !1201 gdbusmessage: Limit recursion of variants in D-Bus messages - !1279 tests: Fix an error message set by foo_set_property() - !1286 gdbus-codegen: Add a GDBusCallFlags arg to method calls - !1291 gio-tool-list: Add an option to print display names - !1294 GMemoryMonitor docs fixes - !1295 gio: Fix socket test - !1301 GThread - Inherit parent thread priority by default for new Win32 threads - !1303 gvariant-core: Don't pass NULL second argument to memcpy - !1305 Fully deprecate TLS rehandshakes - !1308 gsocketclient: run timeout source on the task's main context - !1309 Fix crash in gutils when application is prevented access to passwd file - !1317 gfdonotificationbackend: remove notifications when bus name vanishes - !1320 subprojects: Temporarily avoid using wrapdb while it’s down - !1324 ci: Add some documentation to the style check CI test - !1325 Check for SYS_sched_getattr before using it unconditionally - !1330 W32: Correctly set st_ino when doing private stat() - !1334 gthread: Ensure GThreadSchedulerSettings is always defined * Translation updates: - Catalan - Galician - Hungarian - Indonesian - Polish - Portuguese (Brazil) - Spanish Overview of changes in GLib 2.63.3 ================================== * Add a `--glib-min-version` argument to `gdbus-codegen` which controls breaks in the API of generated code (#1726) * Add `g_clear_list()` API to clear `GList`s to `NULL` (#1943) * Add a `GMemoryMonitor` API to be notified of memory pressure situations using the low-memory-monitor project (!1005) * Add support for dispose functions for `GSource` implementations (!1175) * Tighten up validation of GObject signal and property names, allowing performance improvements (!1224) * Fix installation path of GIO modules on MSVC to be the bindir (!1254) * Bugs fixed: - #650 g_signal_lookup gives too many warnings - #1011 GListStore, easily find if the item is already inserted - #1130 gdbus-codegen: Add an option to strictly generate markdown in source comments - #1687 glocalvfs.c uses non-thread-safe getpwnam() - #1726 Warn when method/signal uses type 'h' but lacks GDBus.C.UnixFD annotation - #1935 Assert in _kqsub_free seems to be too strict - #1943 Consider g_clear_list() - #1947 Documentation clarification for g_uuid_string_random() - #1953 Documentation for g_type_init() and others missing from online gtk-doc documentation - #1961 A typo in the comment of `g_settings_schema_get_path`: threfore -> therefore - !1005 gio: Add GMemoryMonitor to monitor for low-memory - !1172 gptrarray: Add an example to the g_ptr_array_steal() docs - !1175 Implement a dispose function for GSource - !1223 Add additional valgrind suppressions - !1224 Signal name handling improvements - !1230 ci: Run installed-tests on Fedora - !1235 Add sudo to Fedora docker image - !1239 tests: Run "timeout tests" sequentially - !1248 ci: Update all Debian CI runners to use v5 of the Dockerfile - !1249 gio-tool-mount: Allow mounting by the given UUID - !1252 ci: Fix running all jobs on merge requests - !1253 gthread: Fix "zero as null pointer" warning - !1254 giomodule: gio modules are no longer installed in bindir on MSVC - !1255 ci: Build Docker images rather than OCI images if using podman - !1256 gdate: Add autoptr support - !1258 Minor CI fixups - !1261 gtk-doc: Ensure we have recent enough version - !1262 tests: Add tests for the gdbus-codegen executable - !1265 build: don't check for protected visibility - !1267 Revert "doc: Workaround gtkdoc-scan bug leading to undocumented symbols" - !1268 ci: Work-around successful installed tests having no logs - !1269 gvariant: Add guard to g_variant_get() - !1271 tests: Enable GDBus debug for a number of unreliable tests - !1274 trash portal: Don't follow symlinks - !1275 Small doc correction - !1277 Various gtk-doc improvements - !1278 Update installed tests CI - !1280 clang-format-diff: Output diff for multiple files, not just one - !1282 Revert "Revert "docs: remove GDBusObjectManager example"" - !1284 Update POTFILES.in 191212 - !1287 atomic/tests: test g_atomic_pointer_compare_and_exchange() with const pointers - !1289 gtype: Define auto-cleanup functions for Module class * Translation updates: - Spanish Overview of changes in GLib 2.63.2 ================================== * Use `lldb` rather than `gdb` on macOS for debugging (#1004) * Switch the atomic builtins from `__sync_fetch_*()` to the slightly more modern `__atomic_*()` (#1750) * Fix calculation of `gsize` width on various platforms (including OpenBSD) (#1777) * Fix undefined behaviour causing brokenness in `g_utf8_find_prev_char()` when compiling with GCC ≥ 8 (#1917) * Revert UNIX mode changes in `G_FILE_ATTRIBUTE_ID_UNIX_MODE` which broke OSTree (#1934) * Slightly improve performance for signal emissions when no handlers are connected (!1083) * Add `g_task_return_value()` and `g_task_propagate_value()` APIs to allow `GTask` to be used from language bindings more easily (!1216) * Fix a file monitoring crash on kqueue-based systems (BSD) (!1221) * Bugs fixed: - #1004 [PATCH] Make gbacktrace use lldb on Mac OS X - #1552 CI: Add code style checks - #1750 Switch from __sync_fetch_*() to __atomic_*() in glib/gatomic.h - #1777 gsize: improper typedef on (at least) OpenBSD - #1895 Regression: glib does not compile on centos 6: "objcopy: unrecognized option '--add-symbol'" - #1917 Test utf8-pointer fails with static build, LTO, optimisations, and new GCC - #1930 glib/tests/bookmarkfile.c:385:test_modify: assertion failed: (stamp == now) - #1934 ostree tests broken since bfdc5fc4fc84ef8518d2d1a328c8482cf5a38e98: File '/tmp/test-tmp-libostree_test-basic-user.sh.test-QB4SA0/diff-test2' is not empty - #1938 GDateTime doesn't support leap seconds - #1940 atomics test fails on FreeBSD CI since !1123 - !1039 Improve documentation for footgun function g_tls_client_connection_copy_session_state() - !1083 Use the GObject hole on 64bit arches for some flags to improve performance - !1202 CI updates after !1177 - !1208 gutils: Slightly improve docs formatting for g_get_os_info() - !1209 Make ld executable configurable - !1210 gdbus-server-auth test: Include gcredentialsprivate.h - !1213 gsocket: Improve diagnostics on bind() failure - !1214 gvariant, gbytes: Avoid memcmp (NULL, ., 0) or memcmp (., NULL, 0) - !1216 Make GTask more binding-friendly - !1218 gdb: Fix GHashTable pretty printer off-by-one error - !1220 gparam: fix memory leak in g_param_value_defaults() - !1221 Add NOTE_REVOKE to the list of the monitoring events - !1225 gtlsconnection: clarify handshake() documentation - !1227 Deprecate old GTlsConnection functionality even harder! - !1231 Fix build on old libc that does not define _SC_HOST_NAME_MAX - !1238 gstrfuncs: use gsize type internally for strv functions - !1242 gfileinfo: Clarify the documentation for G_FILE_ATTRIBUTE_UNIX_MODE - !1243 docs: Fix "occurred" typos in API documentation * Translation updates: - Spanish Overview of changes in GLib 2.63.1 ================================== * Several usability improvements to command line `gio` tool (!1153) * Add `g_array_steal()`, `g_ptr_array_steal()` and `g_byte_array_steal()` APIs (#285) * Add `g_get_os_info()` API (!1063, !1160) * Add `g_warning_once()` API (!1028) * Always resolve `localhost` to loopback address in `GResolver` (!616) * Add `GMainContextPusher` API (!983) * Limit recursion in `g_variant_parse()` (!1173) * Fix crash in `g_spawn()` with high FD numbers due to use of `select()` rather than `poll()` (#954) * Allow passing empty `GValue`s to `g_param_value_set_default()` (!1186) * Escape header guards generated by `gdbus-codegen` better (#1379) * Bugs fixed: - #285 [PATCH] add array steal and memdup functions - #954 The g_spawn_sync() function uses select() which has limitations - #1318 rare failure in gdbus-peer test: invalid uninstantiatable type '(null)' in cast to 'GDBusServer' - #1379 gdbus-codegen generates invalid header guards when build directory contains a + character - #1622 NULL pointer derefs on g_vasprintf() failure - #1813 g_option_context_add_main_entries() is missing array annotation for entries parameter - #1831 No reply on private socket due to auth problem - #1836 gobject.c uses undefined annotation “(not optional)” - #1858 docs/reference/gobject/tut_gobject.xml: object properties example uses deprecated API - #1877 g_cancellable_source_new annotated with 'skip' - #1896 Use after free when calling g_dbus_connection_flush_sync() in a dedicated thread - #1897 glib 2.62.0 fails test 'test_writev_no_vectors' wih gcc7 - #1903 use-after-free in mimeapps test causes intermittent segfault during testing - #1906 test_os_info fails on FreeBSD - #1916 objcopy not used from cross-compilation file in GIO tests - #1923 Recent Versions of GLib Break Dolphin File-Manager's Thumbnailing when Using 'gtk2' Style - !616 Always resolve localhost to loopback address - !983 gmain: Add GMainContextPusher convenience API - !1014 tests: Add a test for g_assert_finalize_object() - !1028 gmessages: Add g_warning_once() - !1035 Switching from C gnu89 to C gnu99 standard - !1063 gutils: Add g_get_os_info() - !1082 gdatetime: Document RFC 3339 extensions when parsing ISO 8601 - !1105 syscall flood on every time*() function call - !1120 Update documentation with FreeBSD build instructions - !1135 gmain: use atomic operation instead of GMutex to access g_main_context_default() - !1146 Solaris build fixes - !1147 gmodule: fix typo in doc comment - !1148 gio/gfileinfo: fix parameter references - !1149 gio/gfile: fix parameter reference for value_p - !1150 gio/gfile: fix parameter references to @contents - !1151 gio/gfile: fix typo in doc comment - !1152 gwinhttpvfs: Handle g_get_prgname() returning NULL - !1153 Several gio-tool bash completion fixes and improvements - !1155 Strict-aliasing fixes to new atomic built-ins - !1157 Fix various compiler warnings on Android - !1160 Add Windows support to g_get_os_info() - !1161 hash: Remove an assertion from the hot path - !1163 gcharset: Expand the documentation for g_get_locale_variants() - !1165 Use uname as a fallback to get OS info - !1167 Fix some minor leaks in testfilemonitor - !1168 Fix gdatetime tests on toolbox - !1171 Revert "gdbus-codegen: emit GUnixFDLists if an arg has type 'h'" - !1173 gvariant: Limit recursion in g_variant_parse() - !1177 ci: Add libdbus development files to CI Docker images - !1179 Improve GPtrArray doc-comments - !1180 array: Avoid use of memcpy(dest, NULL, 0) - !1181 gmain: Clarify thread safety of some common GSource functions - !1182 gio: Fix typo in URL - !1186 Allow using an empty GValue with g_param_value_set_default() - !1189 gparamspecs: Fix type class leaks on error handling paths - !1197 Fix GDBus test failures on non-Linux (in particular FreeBSD) - !1200 Minor fixes from a scan-build run * Translation updates: - Catalan - Chinese (Taiwan) - Spanish Overview of changes in GLib 2.63.0 ================================== * Add g_fsync() API (#35) * Fix regression in g_file_copy() when passing `G_FILE_COPY_TARGET_DEFAULT_PERMS` flag; the destination permissions would be private rather than following the process’ umask (!1142) * Several `GDateTime` parsing fixes (!1127) * Always build the tests if installed-tests are enabled, so that the tests can actually be installed (!1141) * Rework atomic function implementations to use memory barrier in the correct place (when compiler intrinsics aren’t providing the atomics), and fix signedness issues (#1449, #1565) * Use the OS’ `fdwalk()` function (if safe) to speed up `g_spawn_*()` on BSD (#1638) * Remove the macOS `dyld` `GModule` implementation in favour of `dl` instead (!1093) * Bump Python requirement to ≥ 3.5, which we implicitly relied on anyway through our Meson dependency (!1132) * Bugs fixed: - #35 add g_fsync to API - #174 g_file_copy always preserves permissions, even if G_FILE_COPY_ALL_METADATA flag is not set - #259 docs: fix a misunderstanding in g_type_add_interface_* - #767 g_signal_lookup fails if class is not referenced - #1052 g_io_write_chars calls abort when given a null byte as input - #1449 glib fallback atomic int/ptr get/set have memory barrier in wrong place - #1565 Signedness of atomic operations - #1638 g_spawn_*() is extremely slow under certain circumstances - #1809 Provide API for working with PKCS11 backed certificates - #1843 TSAN false positive with g_atomic_pointer_get/g_atomic_pointer_set under Clang - #1865 g_variant_get_data_as_bytes fails after serializing a variant - #1875 Segfault and Overflow in __gio_xdg_cache_mime_type_subclass() with Wps-Office installed - #1887 glib 2.62.0 breaks loading dylibs as modules - #1888 2.62: docs build on Windows broken - #1897 glib 2.62.0 fails test 'test_writev_no_vectors' wih gcc7 - !1020 docs: Remove priv pointers from the tutorial example - !1062 gtype: mark the inline functions in G_DECLARE_*_TYPE() as UNUSED - !1080 tests: Fix skipping mkdir-with-parents-permission test - !1088 Various small scan-build fixes - !1090 giochannel: Clarify type of GSource callback in documentation - !1093 gmodule: remove macOS dyld implementation - !1095 Define G_IOV_MAX to 512 on macOS/iOS - !1099 gmem: clarify that g_malloc always uses the system allocator - !1109 doc: fix typo in gio/gsettings.c - !1110 gio: Add missing "gio remove" option to bash completion script - !1112 Add version macros for GLib 2.64 - !1115 gdatetime: Fix error handling in g_date_time_new_ordinal() - !1116 gmarkup: Add a limit on the number of attributes in an element - !1119 Annotate the return value of various utility functions - !1124 docs: Fix typo in GConverter{Input,Output}Stream section titles - !1125 gdatetime: Fix error handling in g_date_time_new_week() - !1126 fileinfo: Mention that usec mtimes are set - !1129 gdate: Fix tautological comparison warnings on Android - !1130 Improve GLIB_DEPRECATED_MACRO_FOR output - !1131 gio/gfileinfo: fix param reference in doc comment - !1132 build: Bump Python requirement to ≥ 3.5 - !1137 gregistrysettings: bump key name length to 2048 - !1138 Always build tests if we enabled installed-tests - !1139 g_file_info_get_modification_date_time: Calculate in integer domain * Translation updates: - Danish - Italian - Panjabi - Serbian - Turkish
Diffstat (limited to 'devel/glib2/patches')
-rw-r--r--devel/glib2/patches/patch-gio_tests_meson.build101
-rw-r--r--devel/glib2/patches/patch-glib_gatomic.c12
-rw-r--r--devel/glib2/patches/patch-glib_gatomic.h12
-rw-r--r--devel/glib2/patches/patch-glib_genviron.c9
-rw-r--r--devel/glib2/patches/patch-glib_gmain.c26
-rw-r--r--devel/glib2/patches/patch-glib_gspawn.c9
-rw-r--r--devel/glib2/patches/patch-glib_meson.build11
-rw-r--r--devel/glib2/patches/patch-glib_tests_hash.c12
-rw-r--r--devel/glib2/patches/patch-gmodule_gmodule-ar.c29
-rw-r--r--devel/glib2/patches/patch-gmodule_gmodule-dl.c57
-rw-r--r--devel/glib2/patches/patch-gmodule_gmodule-dyld.c32
-rw-r--r--devel/glib2/patches/patch-gmodule_gmodule-win32.c16
-rw-r--r--devel/glib2/patches/patch-gmodule_gmodule.c57
-rw-r--r--devel/glib2/patches/patch-meson.build117
14 files changed, 57 insertions, 443 deletions
diff --git a/devel/glib2/patches/patch-gio_tests_meson.build b/devel/glib2/patches/patch-gio_tests_meson.build
deleted file mode 100644
index 7b39aeaac25..00000000000
--- a/devel/glib2/patches/patch-gio_tests_meson.build
+++ /dev/null
@@ -1,101 +0,0 @@
-$NetBSD: patch-gio_tests_meson.build,v 1.2 2020/01/23 23:54:22 sevan Exp $
-
-Darwin: Set LD_LIBRARY_PATH to run uninstalled executable with @rpath.
-Check objcopy(1) supports --add-symbol which may not be available on
-legacy systems.
-https://gitlab.gnome.org/GNOME/glib/commit/dac4a48d14461a118d8ad7825a39e224bf128807
-
---- gio/tests/meson.build.orig 2019-12-19 16:33:15.000000000 +0000
-+++ gio/tests/meson.build
-@@ -470,7 +470,9 @@ if not meson.is_cross_build() or meson.h
- plugin_resources_c = custom_target('plugin-resources.c',
- input : 'test4.gresource.xml',
- output : 'plugin-resources.c',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate-source',
-@@ -494,7 +496,9 @@ if not meson.is_cross_build() or meson.h
- test_gresource = custom_target('test.gresource',
- input : 'test.gresource.xml',
- output : 'test.gresource',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -505,7 +509,9 @@ if not meson.is_cross_build() or meson.h
- test_resources2_c = custom_target('test_resources2.c',
- input : 'test3.gresource.xml',
- output : 'test_resources2.c',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -516,7 +522,9 @@ if not meson.is_cross_build() or meson.h
- test_resources2_h = custom_target('test_resources2.h',
- input : 'test3.gresource.xml',
- output : 'test_resources2.h',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -528,7 +536,9 @@ if not meson.is_cross_build() or meson.h
- input : 'test2.gresource.xml',
- depends : big_test_resource,
- output : 'test_resources.c',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -539,7 +549,9 @@ if not meson.is_cross_build() or meson.h
- digit_test_resources_c = custom_target('digit_test_resources.c',
- input : '111_digit_test.gresource.xml',
- output : 'digit_test_resources.c',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--sourcedir=' + meson.current_build_dir(),
-@@ -550,7 +562,9 @@ if not meson.is_cross_build() or meson.h
- digit_test_resources_h = custom_target('digit_test_resources.h',
- input : '111_digit_test.gresource.xml',
- output : 'digit_test_resources.h',
-- command : [glib_compile_resources,
-+ command : [env_program.path(),
-+ 'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
-+ glib_compile_resources,
- '--target=@OUTPUT@',
- '--sourcedir=' + meson.current_source_dir(),
- '--generate',
-@@ -577,9 +591,13 @@ if not meson.is_cross_build() or meson.h
- # Support for --add-symbol was added to LLVM objcopy in 2019
- # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
- # LLVM once that support is in a stable release.
-+ objcopy_valid = false
- objcopy = find_program('objcopy', required : false)
-+ if objcopy.found()
-+ objcopy_valid = run_command(objcopy, '--help').stdout().contains('--add-symbol')
-+ endif
-
-- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found()
-+ if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() and objcopy_valid
- test_gresource_binary = custom_target('test5.gresource',
- input : 'test5.gresource.xml',
- output : 'test5.gresource',
diff --git a/devel/glib2/patches/patch-glib_gatomic.c b/devel/glib2/patches/patch-glib_gatomic.c
index a1b40e9adc5..c2585a84f05 100644
--- a/devel/glib2/patches/patch-glib_gatomic.c
+++ b/devel/glib2/patches/patch-glib_gatomic.c
@@ -1,9 +1,9 @@
-$NetBSD: patch-glib_gatomic.c,v 1.1 2019/06/26 10:42:50 prlw1 Exp $
+$NetBSD: patch-glib_gatomic.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
Ignore __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as is already done
for android and linux. PR pkg/54298
---- glib/gatomic.c.orig 2019-06-10 17:47:20.000000000 +0000
+--- glib/gatomic.c.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/gatomic.c
@@ -94,8 +94,6 @@
* implement the atomic operations in a lock-free manner.
@@ -11,10 +11,10 @@ for android and linux. PR pkg/54298
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-
- #if defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
- /* The implementation used in this code path in gatomic.h assumes
- * 4-byte int */
-@@ -667,14 +665,6 @@ gsize
+ /**
+ * g_atomic_int_get:
+ * @atomic: a pointer to a #gint or #guint
+@@ -658,14 +656,6 @@ gsize
return InterlockedXor (atomic, val);
#endif
}
diff --git a/devel/glib2/patches/patch-glib_gatomic.h b/devel/glib2/patches/patch-glib_gatomic.h
index cbe9c6e8a25..f7f7b3507d5 100644
--- a/devel/glib2/patches/patch-glib_gatomic.h
+++ b/devel/glib2/patches/patch-glib_gatomic.h
@@ -1,9 +1,9 @@
-$NetBSD: patch-glib_gatomic.h,v 1.1 2019/06/26 10:42:50 prlw1 Exp $
+$NetBSD: patch-glib_gatomic.h,v 1.2 2020/03/04 15:11:48 wiz Exp $
Ignore __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as is already done
for android and linux. PR pkg/54298
---- glib/gatomic.h.orig 2019-06-10 17:47:20.000000000 +0000
+--- glib/gatomic.h.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/gatomic.h
@@ -82,7 +82,7 @@ gint g_atomic_int_exc
@@ -13,10 +13,10 @@ for android and linux. PR pkg/54298
+#if defined(G_ATOMIC_LOCK_FREE)
/* We prefer the new C11-style atomic extension of GCC if available */
- #if defined(__ATOMIC_SEQ_CST) && !defined(__clang__)
-@@ -250,7 +250,7 @@ G_END_DECLS
- (gsize) __sync_fetch_and_xor ((atomic), (val)); \
- }))
+ #if defined(__ATOMIC_SEQ_CST)
+@@ -372,7 +372,7 @@ G_END_DECLS
+
+ #endif /* !defined(__ATOMIC_SEQ_CST) */
-#else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */
+#else /* defined(G_ATOMIC_LOCK_FREE) */
diff --git a/devel/glib2/patches/patch-glib_genviron.c b/devel/glib2/patches/patch-glib_genviron.c
index d70aeedfc7c..ff26525214c 100644
--- a/devel/glib2/patches/patch-glib_genviron.c
+++ b/devel/glib2/patches/patch-glib_genviron.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-glib_genviron.c,v 1.1 2019/12/29 19:40:56 triaxx Exp $
+$NetBSD: patch-glib_genviron.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
Avoid the build failure with Clang on FreeBSD (see PR 54752).
Set environ as a weak symbol (thanks to Joerg).
---- glib/genviron.c.orig 2019-12-19 16:33:15.000000000 +0000
+--- glib/genviron.c.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/genviron.c
-@@ -321,7 +321,11 @@ g_setenv (const gchar *variable,
+@@ -329,8 +329,12 @@ g_setenv (const gchar *variable,
/* According to the Single Unix Specification, environ is not
* in any system header, although unistd.h often declares it.
*/
@@ -13,7 +13,8 @@ Set environ as a weak symbol (thanks to Joerg).
+extern __attribute__((__weak__)) char **environ;
+#else
extern char **environ;
-+#endif
#endif
++#endif
/**
+ * g_unsetenv:
diff --git a/devel/glib2/patches/patch-glib_gmain.c b/devel/glib2/patches/patch-glib_gmain.c
index 85c2955cd5d..33da84fffa0 100644
--- a/devel/glib2/patches/patch-glib_gmain.c
+++ b/devel/glib2/patches/patch-glib_gmain.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-glib_gmain.c,v 1.4 2019/12/29 19:40:56 triaxx Exp $
+$NetBSD: patch-glib_gmain.c,v 1.5 2020/03/04 15:11:48 wiz Exp $
Imported patch from the upstream Bugzilla:
@@ -7,9 +7,9 @@ Imported patch from the upstream Bugzilla:
Tested on powerpc-apple-darwin9.
---- glib/gmain.c.orig 2019-12-19 16:33:15.000000000 +0000
+--- glib/gmain.c.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/gmain.c
-@@ -2758,47 +2758,31 @@ g_get_monotonic_time (void)
+@@ -2886,47 +2886,31 @@ g_get_monotonic_time (void)
gint64
g_get_monotonic_time (void)
{
@@ -18,12 +18,7 @@ Tested on powerpc-apple-darwin9.
+ guint64 val;
- if (timebase_info.denom == 0)
-+ /* we get nanoseconds from mach_absolute_time() using timebase_info */
-+ mach_timebase_info (&timebase_info);
-+ val = mach_absolute_time();
-+
-+ if (timebase_info.numer != timebase_info.denom)
- {
+- {
- /* This is a fraction that we must use to scale
- * mach_absolute_time() by in order to reach nanoseconds.
- *
@@ -32,9 +27,7 @@ Tested on powerpc-apple-darwin9.
- * picoseconds. Try to deal nicely with that.
- */
- mach_timebase_info (&timebase_info);
-+ guint64 t_high, t_low;
-+ guint64 result_high, result_low;
-
+-
- /* We actually want microseconds... */
- if (timebase_info.numer % 1000 == 0)
- timebase_info.numer /= 1000;
@@ -60,6 +53,15 @@ Tested on powerpc-apple-darwin9.
- g_error ("Got weird mach timebase info of %d/%d. Please file a bug against GLib.",
- timebase_info.numer, timebase_info.denom);
- }
++ /* we get nanoseconds from mach_absolute_time() using timebase_info */
++ mach_timebase_info (&timebase_info);
++ val = mach_absolute_time();
++
++ if (timebase_info.numer != timebase_info.denom)
++ {
++ guint64 t_high, t_low;
++ guint64 result_high, result_low;
++
+ /* 64 bit x 32 bit / 32 bit with 96-bit intermediate
+ * algorithm lifted from qemu */
+ t_low = (val & 0xffffffffLL) * (guint64)timebase_info.numer;
diff --git a/devel/glib2/patches/patch-glib_gspawn.c b/devel/glib2/patches/patch-glib_gspawn.c
index 482c6f5f9d6..69636285fd9 100644
--- a/devel/glib2/patches/patch-glib_gspawn.c
+++ b/devel/glib2/patches/patch-glib_gspawn.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-glib_gspawn.c,v 1.1 2019/12/29 19:40:56 triaxx Exp $
+$NetBSD: patch-glib_gspawn.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
Avoid the build failure with Clang on FreeBSD (see PR 54752).
Set environ as a weak symbol (thanks to Joerg).
---- glib/gspawn.c.orig 2019-12-19 16:33:15.000000000 +0000
+--- glib/gspawn.c.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/gspawn.c
-@@ -85,7 +85,11 @@
+@@ -85,8 +85,12 @@
#ifdef HAVE__NSGETENVIRON
#define environ (*_NSGetEnviron())
#else
@@ -13,7 +13,8 @@ Set environ as a weak symbol (thanks to Joerg).
+extern __attribute__((__weak__)) char **environ;
+#else
extern char **environ;
-+#endif
#endif
++#endif
#ifndef O_CLOEXEC
+ #define O_CLOEXEC 0
diff --git a/devel/glib2/patches/patch-glib_meson.build b/devel/glib2/patches/patch-glib_meson.build
index 877e7493978..e8b6c533327 100644
--- a/devel/glib2/patches/patch-glib_meson.build
+++ b/devel/glib2/patches/patch-glib_meson.build
@@ -1,10 +1,10 @@
-$NetBSD: patch-glib_meson.build,v 1.7 2019/12/29 19:40:56 triaxx Exp $
+$NetBSD: patch-glib_meson.build,v 1.8 2020/03/04 15:11:48 wiz Exp $
- On Darwin, allow building without Cocoa.
- Don't bother with gtester as it's slated for deprecation anyway:
https://gitlab.gnome.org/GNOME/glib/issues/1441
---- glib/meson.build.orig 2019-12-19 16:33:15.000000000 +0000
+--- glib/meson.build.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/meson.build
@@ -316,7 +316,7 @@ else
platform_deps = []
@@ -15,7 +15,7 @@ $NetBSD: patch-glib_meson.build,v 1.7 2019/12/29 19:40:56 triaxx Exp $
glib_sources += files('gosxutils.m')
endif
-@@ -410,24 +410,7 @@ if host_system == 'windows'
+@@ -410,25 +410,8 @@ if host_system == 'windows'
include_directories : configinc,
dependencies : [libglib_dep])
endif
@@ -26,7 +26,7 @@ $NetBSD: patch-glib_meson.build,v 1.7 2019/12/29 19:40:56 triaxx Exp $
- include_directories : configinc,
- dependencies : [libglib_dep])
endif
--
+
-report_conf = configuration_data()
-report_conf.set('GLIB_VERSION', glib_version)
-report_conf.set('PYTHON', python_name)
@@ -37,6 +37,7 @@ $NetBSD: patch-glib_meson.build,v 1.7 2019/12/29 19:40:56 triaxx Exp $
- configuration: report_conf,
- install_mode: 'rwxr-xr-x'
-)
-
+-
install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
+ gdb_conf = configuration_data()
diff --git a/devel/glib2/patches/patch-glib_tests_hash.c b/devel/glib2/patches/patch-glib_tests_hash.c
index 0955bee8934..800d81eea3f 100644
--- a/devel/glib2/patches/patch-glib_tests_hash.c
+++ b/devel/glib2/patches/patch-glib_tests_hash.c
@@ -1,11 +1,11 @@
-$NetBSD: patch-glib_tests_hash.c,v 1.2 2019/12/29 19:40:56 triaxx Exp $
+$NetBSD: patch-glib_tests_hash.c,v 1.3 2020/03/04 15:11:48 wiz Exp $
Revert GHashTable improvements
https://gitlab.gnome.org/GNOME/glib/merge_requests/208
to fix PR pkg/54310
---- glib/tests/hash.c.orig 2019-12-19 16:33:15.000000000 +0000
+--- glib/tests/hash.c.orig 2020-02-27 16:12:52.000000000 +0000
+++ glib/tests/hash.c
@@ -1353,9 +1353,6 @@ struct _GHashTable
gint nnodes;
@@ -17,7 +17,7 @@ to fix PR pkg/54310
gpointer *keys;
guint *hashes;
gpointer *values;
-@@ -1390,23 +1387,6 @@ count_keys (GHashTable *h, gint *unused, gint *occupie
+@@ -1390,23 +1387,6 @@ count_keys (GHashTable *h, gint *unused,
}
}
@@ -47,13 +47,13 @@ to fix PR pkg/54310
{
- if (h->hashes[i] >= 2)
+ if (h->hashes[i] < 2)
- {
-- g_assert_cmpint (h->hashes[i], ==, h->hash_func (fetch_key_or_value (h->keys, i, h->have_big_keys)));
++ {
+ g_assert (h->keys[i] == NULL);
+ g_assert (h->values[i] == NULL);
+ }
+ else
-+ {
+ {
+- g_assert_cmpint (h->hashes[i], ==, h->hash_func (fetch_key_or_value (h->keys, i, h->have_big_keys)));
+ g_assert_cmpint (h->hashes[i], ==, h->hash_func (h->keys[i]));
}
}
diff --git a/devel/glib2/patches/patch-gmodule_gmodule-ar.c b/devel/glib2/patches/patch-gmodule_gmodule-ar.c
deleted file mode 100644
index 820e53fc4bd..00000000000
--- a/devel/glib2/patches/patch-gmodule_gmodule-ar.c
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-gmodule_gmodule-ar.c,v 1.1 2018/10/08 10:12:06 prlw1 Exp $
-
-https://gitlab.gnome.org/GNOME/glib/issues/19
-
---- gmodule/gmodule-ar.c.orig 2017-07-13 23:03:39.000000000 +0000
-+++ gmodule/gmodule-ar.c
-@@ -141,19 +141,10 @@ _g_module_self (void)
- }
-
- static void
--_g_module_close (gpointer handle,
-- gboolean is_unref)
-+_g_module_close (gpointer handle)
- {
-- /* are there any systems out there that have dlopen()/dlclose()
-- * without a reference count implementation?
-- */
-- is_unref |= 1;
--
-- if (is_unref)
-- {
-- if (dlclose (handle) != 0)
-- g_module_set_error (fetch_dlerror (TRUE));
-- }
-+ if (dlclose (handle) != 0)
-+ g_module_set_error (fetch_dlerror (TRUE));
- }
-
- static gpointer
diff --git a/devel/glib2/patches/patch-gmodule_gmodule-dl.c b/devel/glib2/patches/patch-gmodule_gmodule-dl.c
deleted file mode 100644
index 192f3739179..00000000000
--- a/devel/glib2/patches/patch-gmodule_gmodule-dl.c
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-gmodule_gmodule-dl.c,v 1.1 2018/10/08 10:12:06 prlw1 Exp $
-
-RTLD_GLOBAL is a bug.
-https://gitlab.gnome.org/GNOME/glib/issues/19
-
---- gmodule/gmodule-dl.c.orig 2018-01-08 21:34:19.000000000 +0000
-+++ gmodule/gmodule-dl.c
-@@ -106,46 +106,13 @@ _g_module_open (const gchar *file_name,
- static gpointer
- _g_module_self (void)
- {
-- gpointer handle;
--
-- /* to query symbols from the program itself, special link options
-- * are required on some systems.
-- */
--
-- /* On Android 32 bit (i.e. not __LP64__), dlopen(NULL)
-- * does not work reliable and generally no symbols are found
-- * at all. RTLD_DEFAULT works though.
-- * On Android 64 bit, dlopen(NULL) seems to work but dlsym(handle)
-- * always returns 'undefined symbol'. Only if RTLD_DEFAULT or
-- * NULL is given, dlsym returns an appropriate pointer.
-- */
--#if defined(__BIONIC__)
-- handle = RTLD_DEFAULT;
--#else
-- handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
--#endif
-- if (!handle)
-- g_module_set_error (fetch_dlerror (TRUE));
--
-- return handle;
-+ return RTLD_DEFAULT;
- }
-
- static void
--_g_module_close (gpointer handle,
-- gboolean is_unref)
-+_g_module_close (gpointer handle)
- {
-- /* are there any systems out there that have dlopen()/dlclose()
-- * without a reference count implementation?
-- *
-- * See above for the Android special case
-- */
--#if defined(__BIONIC__)
-- is_unref = (handle != RTLD_DEFAULT);
--#else
-- is_unref |= 1;
--#endif
--
-- if (is_unref)
-+ if (handle != RTLD_DEFAULT)
- {
- if (dlclose (handle) != 0)
- g_module_set_error (fetch_dlerror (TRUE));
diff --git a/devel/glib2/patches/patch-gmodule_gmodule-dyld.c b/devel/glib2/patches/patch-gmodule_gmodule-dyld.c
deleted file mode 100644
index d2bc967419a..00000000000
--- a/devel/glib2/patches/patch-gmodule_gmodule-dyld.c
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-gmodule_gmodule-dyld.c,v 1.1 2018/10/08 10:12:06 prlw1 Exp $
-
-http://bugzilla.gnome.org/show_bug.cgi?id=107626
-https://gitlab.gnome.org/GNOME/glib/issues/19
-
---- gmodule/gmodule-dyld.c.orig 2018-09-14 11:18:09.527026838 +0000
-+++ gmodule/gmodule-dyld.c
-@@ -96,8 +96,7 @@ _g_module_self (void)
- }
-
- static void
--_g_module_close (gpointer handle,
-- gboolean is_unref)
-+_g_module_close (gpointer handle)
- {
- if (handle == &self_module)
- return;
-@@ -118,7 +117,13 @@ _g_module_symbol (gpointer handle,
- if (NSIsSymbolNameDefined (symbol_name))
- sym = NSLookupAndBindSymbol (symbol_name);
- else
-- sym = NULL;
-+ {
-+ GModule *mod;
-+ for (mod = modules, sym = NULL; mod && !sym; mod = mod->next)
-+ {
-+ sym = NSLookupSymbolInModule (mod->handle, symbol_name);
-+ }
-+ }
- }
- else
- sym = NSLookupSymbolInModule (handle, symbol_name);
diff --git a/devel/glib2/patches/patch-gmodule_gmodule-win32.c b/devel/glib2/patches/patch-gmodule_gmodule-win32.c
deleted file mode 100644
index bd3a6c852b2..00000000000
--- a/devel/glib2/patches/patch-gmodule_gmodule-win32.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-gmodule_gmodule-win32.c,v 1.1 2018/10/08 10:12:06 prlw1 Exp $
-
-https://gitlab.gnome.org/GNOME/glib/issues/19
-
---- gmodule/gmodule-win32.c.orig 2018-01-08 21:34:19.000000000 +0000
-+++ gmodule/gmodule-win32.c
-@@ -105,8 +105,7 @@ _g_module_self (void)
- }
-
- static void
--_g_module_close (gpointer handle,
-- gboolean is_unref)
-+_g_module_close (gpointer handle)
- {
- if (handle != null_module_handle)
- if (!FreeLibrary (handle))
diff --git a/devel/glib2/patches/patch-gmodule_gmodule.c b/devel/glib2/patches/patch-gmodule_gmodule.c
deleted file mode 100644
index 67e4a3d85bc..00000000000
--- a/devel/glib2/patches/patch-gmodule_gmodule.c
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-gmodule_gmodule.c,v 1.1 2018/10/08 10:12:06 prlw1 Exp $
-
-RTLD_GLOBAL is a bug.
-https://gitlab.gnome.org/GNOME/glib/issues/19
-
---- gmodule/gmodule.c.orig 2018-01-08 21:34:19.000000000 +0000
-+++ gmodule/gmodule.c
-@@ -207,8 +207,7 @@ struct _GModule
- static gpointer _g_module_open (const gchar *file_name,
- gboolean bind_lazy,
- gboolean bind_local);
--static void _g_module_close (gpointer handle,
-- gboolean is_unref);
-+static void _g_module_close (gpointer handle);
- static gpointer _g_module_self (void);
- static gpointer _g_module_symbol (gpointer handle,
- const gchar *symbol_name);
-@@ -299,8 +298,7 @@ _g_module_open (const gchar *file_name,
- return NULL;
- }
- static void
--_g_module_close (gpointer handle,
-- gboolean is_unref)
-+_g_module_close (gpointer handle)
- {
- }
- static gpointer
-@@ -510,9 +508,8 @@ g_module_open (const gchar *file_name
- if (!main_module)
- {
- handle = _g_module_self ();
--/* On Android 64 bit, RTLD_DEFAULT is (void *)0x0
-- * so it always fails to create main_module if file_name is NULL */
--#if !defined(__BIONIC__) || !defined(__LP64__)
-+/* On Linux, handle == RTLD_DEFAULT is (void *)0x0 */
-+#if G_MODULE_IMPL != G_MODULE_IMPL_DL
- if (handle)
- #endif
- {
-@@ -617,7 +614,7 @@ g_module_open (const gchar *file_name
- module = g_module_find_by_handle (handle);
- if (module)
- {
-- _g_module_close (module->handle, TRUE);
-+ _g_module_close (module->handle);
- module->ref_count++;
- g_module_set_error (NULL);
-
-@@ -723,7 +720,7 @@ g_module_close (GModule *module)
- }
- module->next = NULL;
-
-- _g_module_close (module->handle, FALSE);
-+ _g_module_close (module->handle);
- g_free (module->file_name);
- g_free (module);
- }
diff --git a/devel/glib2/patches/patch-meson.build b/devel/glib2/patches/patch-meson.build
index 4db002df9d8..31ccf0e27be 100644
--- a/devel/glib2/patches/patch-meson.build
+++ b/devel/glib2/patches/patch-meson.build
@@ -1,4 +1,4 @@
-$NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
+$NetBSD: patch-meson.build,v 1.10 2020/03/04 15:11:48 wiz Exp $
- On Darwin, optionally use Cocoa (needed for X11 users).
@@ -17,17 +17,9 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
glib bug #1777
c.f., PR pkg/54909 and PR pkg/54298
---- meson.build.orig 2020-02-07 11:23:09.221446856 +0000
+--- meson.build.orig 2020-02-27 16:12:52.000000000 +0000
+++ meson.build
-@@ -5,7 +5,6 @@ project('glib', 'c', 'cpp',
- default_options : [
- 'buildtype=debugoptimized',
- 'warning_level=1',
-- 'c_std=gnu89'
- ]
- )
-
-@@ -671,6 +670,7 @@ if host_system == 'darwin'
+@@ -677,6 +677,7 @@ if host_system == 'darwin'
#error "Detected GNUstep, not Cocoa"
#endif''',
name : 'Mac OS X Cocoa support')
@@ -35,98 +27,7 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
if glib_have_cocoa
glib_conf.set('HAVE_COCOA', true)
-@@ -1314,28 +1314,86 @@ else
- glibconfig_conf.set('g_searchpath_separator', ':')
- endif
-
--if sizet_size == short_size
-+g_sizet_compatibility = {
-+ 'short': sizet_size == short_size,
-+ 'int': sizet_size == int_size,
-+ 'long': sizet_size == long_size,
-+ 'long long': sizet_size == long_long_size,
-+}
-+
-+# Do separate checks for gcc/clang (and ignore other compilers for now), since
-+# we need to explicitly pass -Werror to the compilers.
-+# FIXME: https://github.com/mesonbuild/meson/issues/5399
-+# We can’t simplify these checks using a foreach loop because dictionary keys
-+# have to be string literals.
-+# FIXME: https://github.com/mesonbuild/meson/issues/5231
-+if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
-+ g_sizet_compatibility += {
-+ 'short': g_sizet_compatibility['short'] and cc.compiles(
-+ '''#include <stddef.h>
-+ size_t f (size_t *i) { return *i + 1; }
-+ int main (void) {
-+ unsigned short i = 0;
-+ f (&i);
-+ return 0;
-+ }''',
-+ args: ['-Werror'],
-+ name : 'GCC size_t typedef is short'),
-+ 'int': g_sizet_compatibility['int'] and cc.compiles(
-+ '''#include <stddef.h>
-+ size_t f (size_t *i) { return *i + 1; }
-+ int main (void) {
-+ unsigned int i = 0;
-+ f (&i);
-+ return 0;
-+ }''',
-+ args: ['-Werror'],
-+ name : 'GCC size_t typedef is int'),
-+ 'long': g_sizet_compatibility['long'] and cc.compiles(
-+ '''#include <stddef.h>
-+ size_t f (size_t *i) { return *i + 1; }
-+ int main (void) {
-+ unsigned long i = 0;
-+ f (&i);
-+ return 0;
-+ }''',
-+ args: ['-Werror'],
-+ name : 'GCC size_t typedef is long'),
-+ 'long long': g_sizet_compatibility['long long'] and cc.compiles(
-+ '''#include <stddef.h>
-+ size_t f (size_t *i) { return *i + 1; }
-+ int main (void) {
-+ unsigned long long i = 0;
-+ f (&i);
-+ return 0;
-+ }''',
-+ args: ['-Werror'],
-+ name : 'GCC size_t typedef is long long'),
-+ }
-+endif
-+
-+if g_sizet_compatibility['short']
- glibconfig_conf.set('glib_size_type_define', 'short')
- glibconfig_conf.set_quoted('gsize_modifier', 'h')
- glibconfig_conf.set_quoted('gssize_modifier', 'h')
- glibconfig_conf.set_quoted('gsize_format', 'hu')
- glibconfig_conf.set_quoted('gssize_format', 'hi')
- glibconfig_conf.set('glib_msize_type', 'SHRT')
--elif sizet_size == int_size
-+elif g_sizet_compatibility['int']
- glibconfig_conf.set('glib_size_type_define', 'int')
- glibconfig_conf.set_quoted('gsize_modifier', '')
- glibconfig_conf.set_quoted('gssize_modifier', '')
- glibconfig_conf.set_quoted('gsize_format', 'u')
- glibconfig_conf.set_quoted('gssize_format', 'i')
- glibconfig_conf.set('glib_msize_type', 'INT')
--elif sizet_size == long_size
-+elif g_sizet_compatibility['long']
- glibconfig_conf.set('glib_size_type_define', 'long')
- glibconfig_conf.set_quoted('gsize_modifier', 'l')
- glibconfig_conf.set_quoted('gssize_modifier', 'l')
- glibconfig_conf.set_quoted('gsize_format', 'lu')
- glibconfig_conf.set_quoted('gssize_format', 'li')
- glibconfig_conf.set('glib_msize_type', 'LONG')
--elif sizet_size == long_long_size
-+elif g_sizet_compatibility['long long']
- glibconfig_conf.set('glib_size_type_define', 'long long')
- glibconfig_conf.set_quoted('gsize_modifier', int64_m)
- glibconfig_conf.set_quoted('gssize_modifier', int64_m)
-@@ -1832,7 +1890,7 @@ endif
+@@ -1904,7 +1905,7 @@ endif
# proxy-libintl subproject.
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
# implementations. This could be extended if issues are found in some platforms.
@@ -135,7 +36,7 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
libintl = []
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
else
-@@ -1883,16 +1941,15 @@ if host_system != 'windows' and get_opti
+@@ -1955,16 +1956,15 @@ if host_system != 'windows' and get_opti
if cc.has_function('getxattr') and cc.has_header('sys/xattr.h')
glib_conf.set('HAVE_SYS_XATTR_H', 1)
glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_SYS_XATTR_H')
@@ -154,7 +55,7 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
if cc.compiles(glib_conf_prefix + '''
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
-@@ -1986,9 +2043,11 @@ endif
+@@ -2058,9 +2058,11 @@ endif
glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
@@ -168,8 +69,8 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
+python_name = python.path()
python_version = python.language_version()
- python_version_req = '>=3.4'
-@@ -1997,7 +2056,7 @@ if not python_version.version_compare(py
+ python_version_req = '>=3.5'
+@@ -2069,7 +2071,7 @@ if not python_version.version_compare(py
endif
# Determine which user environment-dependent files that we want to install
@@ -178,7 +79,7 @@ $NetBSD: patch-meson.build,v 1.9 2020/02/07 17:05:14 prlw1 Exp $
have_sh = find_program('sh', required : false).found() # For glib-gettextize
# Some installed tests require a custom environment
-@@ -2005,8 +2064,7 @@ env_program = find_program('env', requir
+@@ -2077,8 +2079,7 @@ env_program = find_program('env', requir
# FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
if host_system == 'sunos'