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

The native interface 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 configure.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	2018-02-16 05:54:25.000000000 -0600
+++ config.h.in	2018-02-16 05:56:10.000000000 -0600
@@ -732,6 +732,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	2018-02-16 05:54:24.000000000 -0600
+++ configure	2018-02-16 05:56:09.000000000 -0600
@@ -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
@@ -997,6 +1001,7 @@
 enable_selinux
 enable_fam
 enable_xattr
+with_appinfo_impl
 enable_libelf
 enable_libmount
 with_threads
@@ -1730,6 +1735,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]
@@ -26422,6 +26429,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;
@@ -29879,6 +29929,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	2018-02-16 05:54:27.000000000 -0600
+++ gio/Makefile.in	2018-02-16 05:56:12.000000000 -0600
@@ -176,39 +176,45 @@
 @HAVE_FAM_TRUE@am__append_28 = fam
 @OS_UNIX_TRUE@am__append_29 = xdgmime/libxdgmime.la
 @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 = \
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_31 = gosxappinfo.h
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_32 = gdesktopappinfo.h
+@MAC_OS_X_9_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_33 = gcocoanotificationbackend.c
+@HAVE_NETLINK_TRUE@@OS_UNIX_TRUE@am__append_34 = \
 @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_35 = gwin32appinfo.h
+@APPINFO_IMPL_NATIVE_TRUE@@OS_WIN32_TRUE@am__append_36 = gwin32appinfo.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_WIN32_TRUE@am__append_37 = gdesktopappinfo.h
+@APPINFO_IMPL_NATIVE_FALSE@@OS_WIN32_TRUE@am__append_38 = gdesktopappinfo.c
+@OS_WIN32_TRUE@am__append_39 = gcontenttype-win32.c
+@OS_WIN32_TRUE@am__append_40 = -lshlwapi -lws2_32 -ldnsapi -liphlpapi
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_41 = gosxcontenttype.c
+@APPINFO_IMPL_NATIVE_TRUE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_42 = gosxappinfo.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_43 = gcontenttype.c
+@APPINFO_IMPL_NATIVE_FALSE@@OS_COCOA_TRUE@@OS_UNIX_TRUE@am__append_44 = gdesktopappinfo.c
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_45 = gcontenttype.c
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_46 = 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_47 = -xobjective-c
+@OS_COCOA_TRUE@am__append_48 = -Wl,-framework,Foundation -Wl,-framework,AppKit
+@HAVE_LIBMOUNT_TRUE@am__append_49 = $(LIBMOUNT_CFLAGS)
+@HAVE_LIBMOUNT_TRUE@am__append_50 = $(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_51 = gio_probes.h gio_probes.lo
+@ENABLE_DTRACE_TRUE@am__append_52 = gio_probes.h gio_probes.h.tmp
+@ENABLE_DTRACE_TRUE@am__append_53 = gio_probes.lo
+@ENABLE_SYSTEMTAP_TRUE@am__append_54 = $(tapset_DATA)
 
 # ------------------------------------------------------------------------
 # gapplication(1) tool
-@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_49 = gapplication
+@OS_COCOA_FALSE@@OS_UNIX_TRUE@am__append_55 = gapplication
 subdir = gio
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \
@@ -359,26 +365,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 gwin32networkmonitor.c \
 	gwin32networkmonitor.h gvdb/gvdb-format.h gvdb/gvdb-reader.h \
@@ -526,24 +531,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 \
@@ -561,19 +571,19 @@
 @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 \
 	libgio_2_0_la-gwin32networkmonitor.lo $(am__objects_1)
-@OS_WIN32_TRUE@am__objects_21 = $(am__objects_20)
+@OS_WIN32_TRUE@am__objects_24 = $(am__objects_23)
 am__dirstamp = $(am__leading_dot)dirstamp
-am__objects_22 = gvdb/libgio_2_0_la-gvdb-reader.lo \
+am__objects_25 = gvdb/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 \
@@ -581,16 +591,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@)
@@ -730,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	\
@@ -1224,12 +1236,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_51)
 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_52) \
+	$(am__append_54)
 DISTCLEANFILES = gioenumtypes.h gioenumtypes.c
 MAINTAINERCLEANFILES = 
 
@@ -1508,13 +1520,15 @@
 	$(NULL)
 
 platform_libadd = $(am__append_20) $(am__append_23) $(am__append_26) \
-	$(am__append_29) $(am__append_36)
+	$(am__append_29) $(am__append_40)
 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)
+appinfo_sources = $(am__append_36) $(am__append_38) $(am__append_42) \
+	$(am__append_44) $(am__append_46)
+appinfo_headers = $(am__append_31) $(am__append_32) $(am__append_35) \
+	$(am__append_37)
+contenttype_sources = $(am__append_39) $(am__append_41) \
+	$(am__append_43) $(am__append_45)
 @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 \
@@ -1528,7 +1542,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_33) $(am__append_34)
 @OS_UNIX_TRUE@giounixincludedir = $(includedir)/gio-unix-2.0/gio
 @OS_UNIX_TRUE@giounixinclude_HEADERS = \
 @OS_UNIX_TRUE@	gfiledescriptorbased.h  \
@@ -1540,7 +1554,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 = \
@@ -1582,6 +1596,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
@@ -1766,16 +1781,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_50) $(am__append_53)
 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_47) $(am__append_49)
 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_48)
 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
 gio_headers = \
 	gappinfo.h 		\
@@ -3873,13 +3888,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
@@ -3887,6 +3895,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	2018-01-22 14:28:02.000000000 -0600
+++ gio/giomodule.c	2018-02-16 05:55:21.000000000 -0600
@@ -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>
@@ -1011,7 +1012,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
@@ -1152,8 +1153,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 ());
