This file includes a patch to support switching between native and generic
application information interfaces.

The native interfaced is used for Quartz-based builds of GTK+ and uses
application bundle information, while the generic interface is the freedesktop
implementation working with standard .desktop files.

Both options are mutually exclusive, as glib (so far) only supports one
specific implementation that must be compiled and linked statically into the
shared library at build time.

For X11 builds of glib (our default), we want to support .desktop files.

IMPORTANT: this file includes only changes as generated after running
           autoreconf, but not to the automake/autoconf templates
           (configure.ac, Makefile.am), since we cannot easily use
           autoreconf in MacPorts due to other patches changing the
           generated configure script directly.
           Any such changes after the patch phase would be overwritten by
           re-generating configure.
           If you intend to change this patch, follow these steps:
             - run NOCONFIGURE=1 ./autogen.sh
             - copy the source directory as glib-...-old
             - apply patch-configure-switch-for-gappinfo-impl.diff
             - make any changes necessary, but ONLY to files that are being
               used by autoconf/automake/libtool to generate other files
               (e.g., configure.ac, Makefile.am) - do not edit configure or
               Makefile.in manually!
             - run NOCONFIGURE=1 ./autogen.sh again
             - diff against glib-...-old and save as
               patch-configure-switch-for-gappinfo-impl-mp.diff
             - *move* any changes to files used by autoconf/automake to
               patch-configure-switch-for-gappinfo-impl.diff, so that
               the new patch-configure-switch-for-gappinfo-impl-mp.diff file
               only includes generated changes

WARNING: changes to autoconf.ac will lead to the build system trying to
         re-generate and re-run the configure script, which will OVERWRITE
         MacPorts-specific changes!

--- config.h.in.orig	2017-10-02 10:02:22.000000000 -0500
+++ config.h.in	2017-10-02 17:24:24.000000000 -0500
@@ -714,6 +714,13 @@
 /* Use w32 threads */
 #undef THREADS_WIN32
 
+/* Prefer the generic (freedesktop-based) application information
+   implementation */
+#undef USE_APPINFO_GENERIC
+
+/* Prefer the native application information implementation */
+#undef USE_APPINFO_NATIVE
+
 /* Using GNU libiconv */
 #undef USE_LIBICONV_GNU
 
--- configure.orig	2017-10-02 18:22:29.000000000 -0500
+++ configure	2017-10-02 18:22:29.000000000 -0500
@@ -722,6 +722,10 @@
 LIBMOUNT_CFLAGS
 LIBELF_LIBS
 LIBELF_CFLAGS
+APPINFO_IMPL_GENERIC_FALSE
+APPINFO_IMPL_GENERIC_TRUE
+APPINFO_IMPL_NATIVE_FALSE
+APPINFO_IMPL_NATIVE_TRUE
 XATTR_LIBS
 HAVE_FAM_FALSE
 HAVE_FAM_TRUE
@@ -999,6 +1003,7 @@
 enable_selinux
 enable_fam
 enable_xattr
+with_appinfo_impl
 enable_libelf
 enable_libmount
 with_threads
@@ -1731,6 +1736,8 @@
   --with-gio-module-dir=DIR
                           load gio modules from this directory
                           [LIBDIR/gio/modules]
+  --appinfo-impl=[native/generic]
+                          use appinfo implementation [native]
   --with-threads=[posix/win32]
                           specify a thread implementation to use
   --with-pcre=[internal/system]
@@ -26344,6 +26351,49 @@
 fi
 
 
+
+# Check whether --with-appinfo-impl was given.
+if test "${with_appinfo_impl+set}" = set; then :
+  withval=$with_appinfo_impl;
+else
+  with_appinfo_impl='native'
+fi
+
+
+if test "$with_appinfo_impl" != "native" && test "$with_appinfo_impl" != "generic"; then
+  with_appinfo_impl="native"
+fi
+
+ if test "$with_appinfo_impl" = "native"; then
+  APPINFO_IMPL_NATIVE_TRUE=
+  APPINFO_IMPL_NATIVE_FALSE='#'
+else
+  APPINFO_IMPL_NATIVE_TRUE='#'
+  APPINFO_IMPL_NATIVE_FALSE=
+fi
+
+ if test "$with_appinfo_impl" = "generic"; then
+  APPINFO_IMPL_GENERIC_TRUE=
+  APPINFO_IMPL_GENERIC_FALSE='#'
+else
+  APPINFO_IMPL_GENERIC_TRUE='#'
+  APPINFO_IMPL_GENERIC_FALSE=
+fi
+
+
+case $with_appinfo_impl in
+  native)
+
+$as_echo "#define USE_APPINFO_NATIVE 1" >>confdefs.h
+
+    ;;
+  generic)
+
+$as_echo "#define USE_APPINFO_GENERIC 1" >>confdefs.h
+
+    ;;
+esac
+
 # Check whether --enable-libelf was given.
 if test "${enable_libelf+set}" = set; then :
   enableval=$enable_libelf;
@@ -29790,6 +29840,14 @@
   as_fn_error $? "conditional \"HAVE_FAM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${APPINFO_IMPL_NATIVE_TRUE}" && test -z "${APPINFO_IMPL_NATIVE_FALSE}"; then
+  as_fn_error $? "conditional \"APPINFO_IMPL_NATIVE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${APPINFO_IMPL_GENERIC_TRUE}" && test -z "${APPINFO_IMPL_GENERIC_FALSE}"; then
+  as_fn_error $? "conditional \"APPINFO_IMPL_GENERIC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_LIBMOUNT_TRUE}" && test -z "${HAVE_LIBMOUNT_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_LIBMOUNT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
--- gio/Makefile.in.orig	2017-06-24 06:14:15.000000000 -0500
+++ gio/Makefile.in	2017-06-24 06:26:20.000000000 -0500
@@ -160,55 +160,65 @@
 @ENABLE_INSTALLED_TESTS_TRUE@	$(dist_installed_test_data)
 @ENABLE_INSTALLED_TESTS_TRUE@am__append_13 = $(test_ltlibraries) $(installed_test_ltlibraries)
 @ENABLE_INSTALLED_TESTS_TRUE@am__append_14 = $(installed_test_meta_DATA)
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_15 = xdgmime
-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@am__append_16 = gio-2.0.lib
-@OS_WIN32_TRUE@am__append_17 = $(win32_settings_sources)
-@OS_COCOA_TRUE@am__append_18 = $(cocoa_settings_sources)
-@HAVE_INOTIFY_TRUE@am__append_19 = inotify
-@HAVE_INOTIFY_TRUE@am__append_20 = inotify/libinotify.la
+@APPINFO_IMPL_GENERIC_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_15 = xdgmime
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_16 = xdgmime
+@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@am__append_17 = gio-2.0.lib
+@OS_WIN32_TRUE@am__append_18 = $(win32_settings_sources)
+@OS_COCOA_TRUE@am__append_19 = $(cocoa_settings_sources)
+@HAVE_INOTIFY_TRUE@am__append_20 = inotify
 @HAVE_INOTIFY_TRUE@am__append_21 = inotify/libinotify.la
-@HAVE_KQUEUE_TRUE@am__append_22 = kqueue
-@HAVE_KQUEUE_TRUE@am__append_23 = kqueue/libkqueue.la
+@HAVE_INOTIFY_TRUE@am__append_22 = inotify/libinotify.la
+@HAVE_KQUEUE_TRUE@am__append_23 = kqueue
 @HAVE_KQUEUE_TRUE@am__append_24 = kqueue/libkqueue.la
-@OS_WIN32_TRUE@am__append_25 = win32
-@OS_WIN32_TRUE@am__append_26 = win32/libgiowin32.la
+@HAVE_KQUEUE_TRUE@am__append_25 = kqueue/libkqueue.la
+@OS_WIN32_TRUE@am__append_26 = win32
 @OS_WIN32_TRUE@am__append_27 = win32/libgiowin32.la
-@HAVE_FAM_TRUE@am__append_28 = fam
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_29 = xdgmime/libxdgmime.la
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_30 = xdgmime/libxdgmime.la
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_31 = gdesktopappinfo.h
-@MAC_OS_X_9_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_32 = gcocoanotificationbackend.c
-@HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@am__append_33 = \
+@OS_WIN32_TRUE@am__append_28 = win32/libgiowin32.la
+@HAVE_FAM_TRUE@am__append_29 = fam
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_30 = gosxappinfo.h
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_31 = xdgmime/libxdgmime.la
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_32 = xdgmime/libxdgmime.la
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_33 = gdesktopappinfo.h
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_34 = xdgmime/libxdgmime.la
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_35 = xdgmime/libxdgmime.la
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_36 = gdesktopappinfo.h
+@MAC_OS_X_9_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_37 = gcocoanotificationbackend.c
+@HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@am__append_38 = \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	gnetworkmonitornetlink.c \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	gnetworkmonitornetlink.h \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	gnetworkmonitornm.c	 \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	gnetworkmonitornm.h	 \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	$(NULL)
 
-@OS_WIN32_TRUE@am__append_34 = gwin32appinfo.c gwin32appinfo.h
-@OS_WIN32_TRUE@am__append_35 = gcontenttype-win32.c
-@OS_WIN32_TRUE@am__append_36 = -lshlwapi -lws2_32 -ldnsapi -liphlpapi
-@OS_COCOA_TRUE@am__append_37 = gosxcontenttype.c
-@OS_COCOA_TRUE@am__append_38 = gosxappinfo.c gosxappinfo.h
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_39 = gcontenttype.c
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_40 = gdesktopappinfo.c
+@APPINFO_IMPL_NATIVE_TRUE@@OS_WIN32_TRUE@am__append_39 = gwin32appinfo.h
+@APPINFO_IMPL_NATIVE_TRUE@@OS_WIN32_TRUE@am__append_40 = gwin32appinfo.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_WIN32_TRUE@am__append_41 = gdesktopappinfo.h
+@APPINFO_IMPL_NATIVE_FALSE@@OS_WIN32_TRUE@am__append_42 = gdesktopappinfo.c
+@OS_WIN32_TRUE@am__append_43 = gcontenttype-win32.c
+@OS_WIN32_TRUE@am__append_44 = -lshlwapi -lws2_32 -ldnsapi -liphlpapi
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_45 = gosxcontenttype.c
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_46 = gosxappinfo.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_47 = gcontenttype.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_48 = gdesktopappinfo.c
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_49 = gcontenttype.c
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_50 = gdesktopappinfo.c
 
 # This is dumb.  The ObjC source file should be properly named .m
-@OS_COCOA_TRUE@am__append_41 = -xobjective-c
-@OS_COCOA_TRUE@am__append_42 = -Wl,-framework,Foundation -Wl,-framework,AppKit
-@HAVE_LIBMOUNT_TRUE@am__append_43 = $(LIBMOUNT_CFLAGS)
-@HAVE_LIBMOUNT_TRUE@am__append_44 = $(LIBMOUNT_LIBS)
+@OS_COCOA_TRUE@am__append_51 = -xobjective-c
+@OS_COCOA_TRUE@am__append_52 = -Wl,-framework,Foundation -Wl,-framework,AppKit
+@HAVE_LIBMOUNT_TRUE@am__append_53 = $(LIBMOUNT_CFLAGS)
+@HAVE_LIBMOUNT_TRUE@am__append_54 = $(LIBMOUNT_LIBS)
 bin_PROGRAMS = gio-querymodules$(EXEEXT) glib-compile-schemas$(EXEEXT) \
 	glib-compile-resources$(EXEEXT) gsettings$(EXEEXT) \
 	gdbus$(EXEEXT) $(am__EXEEXT_1) gresource$(EXEEXT) gio$(EXEEXT)
-@ENABLE_DTRACE_TRUE@am__append_45 = gio_probes.h gio_probes.lo
-@ENABLE_DTRACE_TRUE@am__append_46 = gio_probes.h gio_probes.h.tmp
-@ENABLE_DTRACE_TRUE@am__append_47 = gio_probes.lo
-@ENABLE_SYSTEMTAP_TRUE@am__append_48 = $(tapset_DATA)
+@ENABLE_DTRACE_TRUE@am__append_55 = gio_probes.h gio_probes.lo
+@ENABLE_DTRACE_TRUE@am__append_56 = gio_probes.h gio_probes.h.tmp
+@ENABLE_DTRACE_TRUE@am__append_57 = gio_probes.lo
+@ENABLE_SYSTEMTAP_TRUE@am__append_58 = $(tapset_DATA)
 
 # ------------------------------------------------------------------------
 # gapplication(1) tool
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_49 = gapplication
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_59 = gapplication
 subdir = gio
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \
@@ -273,8 +283,9 @@
 LTLIBRARIES = $(installed_test_LTLIBRARIES) $(lib_LTLIBRARIES) \
 	$(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(am__append_20) $(am__append_23) \
-	$(am__append_26) $(am__append_29) $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_2 = $(am__append_21) $(am__append_24) \
+	$(am__append_27) $(am__append_31) $(am__append_34) \
+	$(am__DEPENDENCIES_1)
 @HAVE_LIBMOUNT_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
 am__libgio_2_0_la_SOURCES_DIST = gappinfo.c gappinfoprivate.h \
 	gasynchelper.c gasynchelper.h gasyncinitable.c gasyncresult.c \
@@ -359,26 +370,25 @@
 	glocalvfs.h gsocks4proxy.c gsocks4proxy.h gsocks4aproxy.c \
 	gsocks4aproxy.h gsocks5proxy.c gsocks5proxy.h \
 	thumbnail-verify.h thumbnail-verify.c gwin32appinfo.c \
-	gwin32appinfo.h gosxappinfo.c gosxappinfo.h gdesktopappinfo.c \
-	gcontenttype-win32.c gosxcontenttype.c gcontenttype.c \
-	gfiledescriptorbased.c gunixconnection.c \
-	gunixcredentialsmessage.c gunixfdlist.c gunixfdmessage.c \
-	gunixmount.c gunixmount.h gunixmounts.c gunixsocketaddress.c \
-	gunixvolume.c gunixvolume.h gunixvolumemonitor.c \
-	gunixvolumemonitor.h gunixinputstream.c gunixoutputstream.c \
-	gcontenttypeprivate.h gfdonotificationbackend.c \
-	ggtknotificationbackend.c gportalnotificationbackend.c \
-	gdocumentportal.c gdocumentportal.h gopenuriportal.c \
-	gopenuriportal.h gportalsupport.c gportalsupport.h \
-	gnetworkmonitorportal.c gnetworkmonitorportal.h \
-	gproxyresolverportal.c gproxyresolverportal.h xdp-dbus.c \
-	xdp-dbus.h gcocoanotificationbackend.c \
-	gnetworkmonitornetlink.c gnetworkmonitornetlink.h \
-	gnetworkmonitornm.c gnetworkmonitornm.h gdbusdaemon.c \
-	gdbusdaemon.h gdbus-daemon-generated.c \
-	gdbus-daemon-generated.h gwin32registrykey.c \
-	gwin32registrykey.h gwin32mount.c gwin32mount.h \
-	gwin32volumemonitor.c gwin32volumemonitor.h \
+	gdesktopappinfo.c gosxappinfo.c gcontenttype-win32.c \
+	gosxcontenttype.c gcontenttype.c gfiledescriptorbased.c \
+	gunixconnection.c gunixcredentialsmessage.c gunixfdlist.c \
+	gunixfdmessage.c gunixmount.c gunixmount.h gunixmounts.c \
+	gunixsocketaddress.c gunixvolume.c gunixvolume.h \
+	gunixvolumemonitor.c gunixvolumemonitor.h gunixinputstream.c \
+	gunixoutputstream.c gcontenttypeprivate.h \
+	gfdonotificationbackend.c ggtknotificationbackend.c \
+	gportalnotificationbackend.c gdocumentportal.c \
+	gdocumentportal.h gopenuriportal.c gopenuriportal.h \
+	gportalsupport.c gportalsupport.h gnetworkmonitorportal.c \
+	gnetworkmonitorportal.h gproxyresolverportal.c \
+	gproxyresolverportal.h xdp-dbus.c xdp-dbus.h \
+	gcocoanotificationbackend.c gnetworkmonitornetlink.c \
+	gnetworkmonitornetlink.h gnetworkmonitornm.c \
+	gnetworkmonitornm.h gdbusdaemon.c gdbusdaemon.h \
+	gdbus-daemon-generated.c gdbus-daemon-generated.h \
+	gwin32registrykey.c gwin32registrykey.h gwin32mount.c \
+	gwin32mount.h gwin32volumemonitor.c gwin32volumemonitor.h \
 	gwin32inputstream.c gwin32outputstream.c gwin32outputstream.h \
 	gwin32networking.h gvdb/gvdb-format.h gvdb/gvdb-reader.h \
 	gvdb/gvdb-reader.c gdelayedsettingsbackend.h \
@@ -524,24 +534,29 @@
 	libgio_2_0_la-gioenumtypes.lo libgio_2_0_la-glistmodel.lo \
 	libgio_2_0_la-gliststore.lo $(am__objects_2) $(am__objects_3) \
 	$(am__objects_4) $(am__objects_1)
-@OS_WIN32_TRUE@am__objects_6 = libgio_2_0_la-gwin32appinfo.lo
-@OS_COCOA_TRUE@am__objects_7 = libgio_2_0_la-gosxappinfo.lo
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__objects_8 = libgio_2_0_la-gdesktopappinfo.lo
-am__objects_9 = $(am__objects_6) $(am__objects_7) $(am__objects_8)
-@OS_WIN32_TRUE@am__objects_10 = libgio_2_0_la-gcontenttype-win32.lo
-@OS_COCOA_TRUE@am__objects_11 = libgio_2_0_la-gosxcontenttype.lo
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__objects_12 =  \
+@APPINFO_IMPL_NATIVE_TRUE@@OS_WIN32_TRUE@am__objects_6 = libgio_2_0_la-gwin32appinfo.lo
+@APPINFO_IMPL_NATIVE_FALSE@@OS_WIN32_TRUE@am__objects_7 = libgio_2_0_la-gdesktopappinfo.lo
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_8 = libgio_2_0_la-gosxappinfo.lo
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_9 = libgio_2_0_la-gdesktopappinfo.lo
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__objects_10 = libgio_2_0_la-gdesktopappinfo.lo
+am__objects_11 = $(am__objects_6) $(am__objects_7) $(am__objects_8) \
+	$(am__objects_9) $(am__objects_10)
+@OS_WIN32_TRUE@am__objects_12 = libgio_2_0_la-gcontenttype-win32.lo
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_13 = libgio_2_0_la-gosxcontenttype.lo
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_14 = libgio_2_0_la-gcontenttype.lo
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__objects_15 =  \
 @OS_COCOA_FALSE@@OS_UNIX_TRUE@	libgio_2_0_la-gcontenttype.lo
-am__objects_13 = $(am__objects_10) $(am__objects_11) $(am__objects_12)
-am__objects_14 = libgio_2_0_la-xdp-dbus.lo
-am__objects_15 = libgio_2_0_la-gnetworkmonitorportal.lo \
-	libgio_2_0_la-gproxyresolverportal.lo $(am__objects_14) \
+am__objects_16 = $(am__objects_12) $(am__objects_13) $(am__objects_14) \
+	$(am__objects_15)
+am__objects_17 = libgio_2_0_la-xdp-dbus.lo
+am__objects_18 = libgio_2_0_la-gnetworkmonitorportal.lo \
+	libgio_2_0_la-gproxyresolverportal.lo $(am__objects_17) \
 	$(am__objects_1)
-@MAC_OS_X_9_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_16 = libgio_2_0_la-gcocoanotificationbackend.lo
-@HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@am__objects_17 = libgio_2_0_la-gnetworkmonitornetlink.lo \
+@MAC_OS_X_9_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__objects_19 = libgio_2_0_la-gcocoanotificationbackend.lo
+@HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@am__objects_20 = libgio_2_0_la-gnetworkmonitornetlink.lo \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	libgio_2_0_la-gnetworkmonitornm.lo \
 @HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@	$(am__objects_1)
-@OS_UNIX_TRUE@am__objects_18 = libgio_2_0_la-gfiledescriptorbased.lo \
+@OS_UNIX_TRUE@am__objects_21 = libgio_2_0_la-gfiledescriptorbased.lo \
 @OS_UNIX_TRUE@	libgio_2_0_la-gunixconnection.lo \
 @OS_UNIX_TRUE@	libgio_2_0_la-gunixcredentialsmessage.lo \
 @OS_UNIX_TRUE@	libgio_2_0_la-gunixfdlist.lo \
@@ -559,17 +574,17 @@
 @OS_UNIX_TRUE@	libgio_2_0_la-gdocumentportal.lo \
 @OS_UNIX_TRUE@	libgio_2_0_la-gopenuriportal.lo \
 @OS_UNIX_TRUE@	libgio_2_0_la-gportalsupport.lo \
-@OS_UNIX_TRUE@	$(am__objects_15) $(am__objects_1) \
-@OS_UNIX_TRUE@	$(am__objects_16) $(am__objects_17)
-am__objects_19 = libgio_2_0_la-gdbusdaemon.lo \
+@OS_UNIX_TRUE@	$(am__objects_18) $(am__objects_1) \
+@OS_UNIX_TRUE@	$(am__objects_19) $(am__objects_20)
+am__objects_22 = libgio_2_0_la-gdbusdaemon.lo \
 	libgio_2_0_la-gdbus-daemon-generated.lo $(am__objects_1)
-am__objects_20 = $(am__objects_19) libgio_2_0_la-gwin32registrykey.lo \
+am__objects_23 = $(am__objects_22) libgio_2_0_la-gwin32registrykey.lo \
 	libgio_2_0_la-gwin32mount.lo \
 	libgio_2_0_la-gwin32volumemonitor.lo \
 	libgio_2_0_la-gwin32inputstream.lo \
 	libgio_2_0_la-gwin32outputstream.lo $(am__objects_1)
-@OS_WIN32_TRUE@am__objects_21 = $(am__objects_20)
-am__objects_22 = libgio_2_0_la-gvdb-reader.lo \
+@OS_WIN32_TRUE@am__objects_24 = $(am__objects_23)
+am__objects_25 = libgio_2_0_la-gvdb-reader.lo \
 	libgio_2_0_la-gdelayedsettingsbackend.lo \
 	libgio_2_0_la-gkeyfilesettingsbackend.lo \
 	libgio_2_0_la-gmemorysettingsbackend.lo \
@@ -577,16 +592,16 @@
 	libgio_2_0_la-gsettingsbackend.lo \
 	libgio_2_0_la-gsettingsschema.lo \
 	libgio_2_0_la-gsettings-mapping.lo libgio_2_0_la-gsettings.lo
-@OS_WIN32_TRUE@am__objects_23 =  \
+@OS_WIN32_TRUE@am__objects_26 =  \
 @OS_WIN32_TRUE@	libgio_2_0_la-gregistrysettingsbackend.lo
-@OS_WIN32_TRUE@am__objects_24 = $(am__objects_23)
-@OS_COCOA_TRUE@am__objects_25 =  \
+@OS_WIN32_TRUE@am__objects_27 = $(am__objects_26)
+@OS_COCOA_TRUE@am__objects_28 =  \
 @OS_COCOA_TRUE@	libgio_2_0_la-gnextstepsettingsbackend.lo
-@OS_COCOA_TRUE@am__objects_26 = $(am__objects_25)
-am__objects_27 = $(am__objects_22) $(am__objects_24) $(am__objects_26)
-am_libgio_2_0_la_OBJECTS = $(am__objects_5) $(am__objects_9) \
-	$(am__objects_13) $(am__objects_18) $(am__objects_21) \
-	$(am__objects_27) $(am__objects_1)
+@OS_COCOA_TRUE@am__objects_29 = $(am__objects_28)
+am__objects_30 = $(am__objects_25) $(am__objects_27) $(am__objects_29)
+am_libgio_2_0_la_OBJECTS = $(am__objects_5) $(am__objects_11) \
+	$(am__objects_16) $(am__objects_21) $(am__objects_24) \
+	$(am__objects_30) $(am__objects_1)
 libgio_2_0_la_OBJECTS = $(am_libgio_2_0_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -725,9 +740,11 @@
 am__giounixinclude_HEADERS_DIST = gfiledescriptorbased.h \
 	gunixconnection.h gunixcredentialsmessage.h gunixmounts.h \
 	gunixfdlist.h gunixfdmessage.h gunixinputstream.h \
-	gunixoutputstream.h gunixsocketaddress.h gdesktopappinfo.h
+	gunixoutputstream.h gunixsocketaddress.h gosxappinfo.h \
+	gdesktopappinfo.h gwin32appinfo.h
 am__giowin32include_HEADERS_DIST = gwin32inputstream.h \
-	gwin32outputstream.h
+	gwin32outputstream.h gosxappinfo.h gdesktopappinfo.h \
+	gwin32appinfo.h
 HEADERS = $(gioinclude_HEADERS) $(giounixinclude_HEADERS) \
 	$(giowin32include_HEADERS) $(nodist_gioinclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
@@ -1221,12 +1238,12 @@
 BUILT_SOURCES = $(xdp_dbus_built_sources) gconstructor_as_data.h \
 	gioenumtypes.h gioenumtypes.c gdbus-daemon-generated.c \
 	gdbus-daemon-generated.h gnetworking.h $(NULL) \
-	$(am__append_45)
+	$(am__append_55)
 BUILT_EXTRA_DIST = gio.rc
 CLEANFILES = *.log *.trs $(am__append_14) $(xdp_dbus_built_sources) \
 	gdbus-daemon-generated.c gdbus-daemon-generated.h \
-	gio-public-headers.txt gconstructor_as_data.h $(am__append_46) \
-	$(am__append_48)
+	gio-public-headers.txt gconstructor_as_data.h $(am__append_56) \
+	$(am__append_58)
 DISTCLEANFILES = gioenumtypes.h gioenumtypes.c
 MAINTAINERCLEANFILES = 
 
@@ -1287,7 +1304,7 @@
 nobase_installed_test_DATA = $(am__append_12)
 noinst_LTLIBRARIES = $(am__append_2)
 noinst_SCRIPTS = $(am__append_4)
-noinst_DATA = $(am__append_5) $(am__append_16)
+noinst_DATA = $(am__append_5) $(am__append_17)
 check_LTLIBRARIES = $(am__append_6)
 check_SCRIPTS = $(am__append_8)
 check_DATA = $(am__append_9)
@@ -1315,8 +1332,9 @@
 @ENABLE_INSTALLED_TESTS_TRUE@                      $(dist_test_scripts) $(dist_installed_test_scripts)
 
 @ENABLE_INSTALLED_TESTS_TRUE@installed_test_meta_DATA = $(installed_testcases:=.test)
-SUBDIRS = gdbus-2.0/codegen $(am__append_15) $(am__append_19) \
-	$(am__append_22) $(am__append_25) . tests $(am__append_28)
+SUBDIRS = gdbus-2.0/codegen $(am__append_15) $(am__append_16) \
+	$(am__append_20) $(am__append_23) $(am__append_26) . tests \
+	$(am__append_29)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
 AM_CPPFLAGS = \
@@ -1406,8 +1424,8 @@
 	gsettings-mapping.c		\
 	gsettings.c
 
-settings_sources = $(settings_base_sources) $(am__append_17) \
-	$(am__append_18)
+settings_sources = $(settings_base_sources) $(am__append_18) \
+	$(am__append_19)
 @OS_WIN32_TRUE@win32_settings_sources = \
 @OS_WIN32_TRUE@	gregistrysettingsbackend.h	\
 @OS_WIN32_TRUE@	gregistrysettingsbackend.c
@@ -1493,14 +1511,16 @@
 	thumbnail-verify.c		\
 	$(NULL)
 
-platform_libadd = $(am__append_20) $(am__append_23) $(am__append_26) \
-	$(am__append_29) $(am__append_36)
-platform_deps = $(am__append_21) $(am__append_24) $(am__append_27) \
-	$(am__append_30)
-appinfo_sources = $(am__append_34) $(am__append_38) $(am__append_40)
-appinfo_headers = $(am__append_31)
-contenttype_sources = $(am__append_35) $(am__append_37) \
-	$(am__append_39)
+platform_libadd = $(am__append_21) $(am__append_24) $(am__append_27) \
+	$(am__append_31) $(am__append_34) $(am__append_44)
+platform_deps = $(am__append_22) $(am__append_25) $(am__append_28) \
+	$(am__append_32) $(am__append_35)
+appinfo_sources = $(am__append_40) $(am__append_42) $(am__append_46) \
+	$(am__append_48) $(am__append_50)
+appinfo_headers = $(am__append_30) $(am__append_33) $(am__append_36) \
+	$(am__append_39) $(am__append_41)
+contenttype_sources = $(am__append_43) $(am__append_45) \
+	$(am__append_47) $(am__append_49)
 @OS_UNIX_TRUE@unix_sources = gfiledescriptorbased.c gunixconnection.c \
 @OS_UNIX_TRUE@	gunixcredentialsmessage.c gunixfdlist.c \
 @OS_UNIX_TRUE@	gunixfdmessage.c gunixmount.c gunixmount.h \
@@ -1514,7 +1534,7 @@
 @OS_UNIX_TRUE@	gdocumentportal.h gopenuriportal.c \
 @OS_UNIX_TRUE@	gopenuriportal.h gportalsupport.c \
 @OS_UNIX_TRUE@	gportalsupport.h $(portal_sources) $(NULL) \
-@OS_UNIX_TRUE@	$(am__append_32) $(am__append_33)
+@OS_UNIX_TRUE@	$(am__append_37) $(am__append_38)
 @OS_UNIX_TRUE@giounixincludedir = $(includedir)/gio-unix-2.0/gio
 @OS_UNIX_TRUE@giounixinclude_HEADERS = \
 @OS_UNIX_TRUE@	gfiledescriptorbased.h  \
@@ -1526,7 +1546,7 @@
 @OS_UNIX_TRUE@	gunixinputstream.h 	\
 @OS_UNIX_TRUE@	gunixoutputstream.h 	\
 @OS_UNIX_TRUE@	gunixsocketaddress.h	\
-@OS_UNIX_TRUE@	$(appinfo_headers) \
+@OS_UNIX_TRUE@	$(appinfo_headers)	\
 @OS_UNIX_TRUE@	$(NULL)
 
 gdbus_daemon_sources = \
@@ -1566,6 +1586,7 @@
 @OS_WIN32_TRUE@giowin32include_HEADERS = \
 @OS_WIN32_TRUE@	gwin32inputstream.h \
 @OS_WIN32_TRUE@	gwin32outputstream.h \
+@OS_WIN32_TRUE@	$(appinfo_headers) \
 @OS_WIN32_TRUE@	$(NULL)
 
 xdp_dbus_built_sources = xdp-dbus.c xdp-dbus.h
@@ -1749,16 +1770,16 @@
 	$(top_builddir)/gmodule/libgmodule-2.0.la \
 	$(top_builddir)/glib/libglib-2.0.la $(platform_libadd) \
 	$(ZLIB_LIBS) $(SELINUX_LIBS) $(GLIB_LIBS) $(XATTR_LIBS) \
-	$(NETWORK_LIBS) $(NULL) $(am__append_44) $(am__append_47)
+	$(NETWORK_LIBS) $(NULL) $(am__append_54) $(am__append_57)
 libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
 @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined
 @OS_WIN32_AND_DLL_COMPILATION_TRUE@gio_win32_res = gio-win32-res.o
 @OS_WIN32_AND_DLL_COMPILATION_TRUE@gio_win32_res_ldflag = -Wl,$(gio_win32_res)
 libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
-	$(am__append_41) $(am__append_43)
+	$(am__append_51) $(am__append_53)
 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) $(gio_win32_res_ldflag) \
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-	-export-dynamic $(no_undefined) $(am__append_42)
+	-export-dynamic $(no_undefined) $(am__append_52)
 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
 gio_headers = \
 	gappinfo.h 		\
@@ -3831,13 +3852,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -c -o libgio_2_0_la-gwin32appinfo.lo `test -f 'gwin32appinfo.c' || echo '$(srcdir)/'`gwin32appinfo.c
 
-libgio_2_0_la-gosxappinfo.lo: gosxappinfo.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -MT libgio_2_0_la-gosxappinfo.lo -MD -MP -MF $(DEPDIR)/libgio_2_0_la-gosxappinfo.Tpo -c -o libgio_2_0_la-gosxappinfo.lo `test -f 'gosxappinfo.c' || echo '$(srcdir)/'`gosxappinfo.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgio_2_0_la-gosxappinfo.Tpo $(DEPDIR)/libgio_2_0_la-gosxappinfo.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gosxappinfo.c' object='libgio_2_0_la-gosxappinfo.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -c -o libgio_2_0_la-gosxappinfo.lo `test -f 'gosxappinfo.c' || echo '$(srcdir)/'`gosxappinfo.c
-
 libgio_2_0_la-gdesktopappinfo.lo: gdesktopappinfo.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -MT libgio_2_0_la-gdesktopappinfo.lo -MD -MP -MF $(DEPDIR)/libgio_2_0_la-gdesktopappinfo.Tpo -c -o libgio_2_0_la-gdesktopappinfo.lo `test -f 'gdesktopappinfo.c' || echo '$(srcdir)/'`gdesktopappinfo.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgio_2_0_la-gdesktopappinfo.Tpo $(DEPDIR)/libgio_2_0_la-gdesktopappinfo.Plo
@@ -3845,6 +3859,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -c -o libgio_2_0_la-gdesktopappinfo.lo `test -f 'gdesktopappinfo.c' || echo '$(srcdir)/'`gdesktopappinfo.c
 
+libgio_2_0_la-gosxappinfo.lo: gosxappinfo.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -MT libgio_2_0_la-gosxappinfo.lo -MD -MP -MF $(DEPDIR)/libgio_2_0_la-gosxappinfo.Tpo -c -o libgio_2_0_la-gosxappinfo.lo `test -f 'gosxappinfo.c' || echo '$(srcdir)/'`gosxappinfo.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgio_2_0_la-gosxappinfo.Tpo $(DEPDIR)/libgio_2_0_la-gosxappinfo.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gosxappinfo.c' object='libgio_2_0_la-gosxappinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -c -o libgio_2_0_la-gosxappinfo.lo `test -f 'gosxappinfo.c' || echo '$(srcdir)/'`gosxappinfo.c
+
 libgio_2_0_la-gcontenttype-win32.lo: gcontenttype-win32.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgio_2_0_la_CPPFLAGS) $(CPPFLAGS) $(libgio_2_0_la_CFLAGS) $(CFLAGS) -MT libgio_2_0_la-gcontenttype-win32.lo -MD -MP -MF $(DEPDIR)/libgio_2_0_la-gcontenttype-win32.Tpo -c -o libgio_2_0_la-gcontenttype-win32.lo `test -f 'gcontenttype-win32.c' || echo '$(srcdir)/'`gcontenttype-win32.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgio_2_0_la-gcontenttype-win32.Tpo $(DEPDIR)/libgio_2_0_la-gcontenttype-win32.Plo
--- gio/giomodule.c.orig	2017-06-22 07:52:49.000000000 -0500
+++ gio/giomodule.c	2017-06-24 06:25:26.000000000 -0500
@@ -43,12 +43,13 @@
 #endif
 #include <glib/gstdio.h>
 
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX)
+#if !defined(HAVE_COCOA) || defined(USE_APPINFO_GENERIC)
 #include "gdesktopappinfo.h"
-#endif
-#ifdef HAVE_COCOA
+#elif defined(HAVE_COCOA)
 #include "gosxappinfo.h"
 #endif
+#endif
 
 #ifdef HAVE_COCOA
 #include <AvailabilityMacros.h>
@@ -978,7 +979,7 @@
     {
       registered_extensions = TRUE;
       
-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
+#if defined(G_OS_UNIX) && (!defined(HAVE_COCOA) || defined(USE_APPINFO_GENERIC))
 #if !GLIB_CHECK_VERSION (3, 0, 0)
       ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
       G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@@ -1119,8 +1120,10 @@
 #endif
 #ifdef HAVE_COCOA
       g_type_ensure (g_nextstep_settings_backend_get_type ());
+#ifndef USE_APPINFO_GENERIC
       g_type_ensure (g_osx_app_info_get_type ());
 #endif
+#endif
 #ifdef G_OS_UNIX
       g_type_ensure (_g_unix_volume_monitor_get_type ());
       g_type_ensure (g_fdo_notification_backend_get_type ());