Commit 03152345 authored by Hib Eris's avatar Hib Eris Committed by Bastien Nocera
Browse files

Use native update-mime-database for install when cross compiling

https://bugs.freedesktop.org/show_bug.cgi?id=42554
parent 5648aced
......@@ -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:
......
......@@ -55,6 +55,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])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment