File shared-mime-info-1.0-use-native-when-cross.patch of Package mingw-shared-mime-info

diff --git a/Makefile.am b/Makefile.am
index 56eb82f..ec53761 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,9 +46,15 @@ $(pkgconfig_DATA): config.status
 @INTLTOOL_XML_RULE@
 @INTLTOOL_DESKTOP_RULE@
 
+if CROSS_COMPILING
+  update_mime_database=$(UPDATE_MIME_DATABASE)
+else
+  update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
+endif
+
 install-data-hook: install-binPROGRAMS
 if ENABLE_UPDATE_MIMEDB
-	$(top_builddir)/update-mime-database$(EXEEXT) -V "$(DESTDIR)$(datadir)/mime"
+	$(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
 endif
 
 uninstall-hook:
diff --git a/configure.in b/configure.in
index 1937857..d6f9903 100644
--- a/configure.in
+++ b/configure.in
@@ -49,6 +49,15 @@ AC_ARG_ENABLE(update-mimedb,
    AC_HELP_STRING([--disable-update-mimedb],
                    [disable the update-mime-database after install [default=no]]),,
     enable_update_mimedb=yes)
+
+if test $cross_compiling = yes && test x$enable_update_mimedb = xyes; then
+  AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
+  if test x$UPDATE_MIME_DATABASE = xno; then
+    enable_update_mimedb=no
+    AC_MSG_WARN(Could not find the update-mime-database program in your PATH. Your mime database will not be updated upon install.)
+  fi
+fi
+
 AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
 
 AC_PATH_PROG([XMLLINT],[xmllint])