Source: mate-user-share
Version: 1.18.0-1.1
Tags: patch upstream
User: [email protected]
Usertags: rebootstrap
mate-user-share fails to cross build from source, because it wrongly
uses pkg-config. The attached patch fixes all the issues and makes it
cross build. Let me briefly discuss the hunks:
* Using AC_PATH_PROG results in not considering $ac_tool_prefix. This
generally breaks cross compilation. AC_PATH_TOOL is an improvement,
but PKG_PROG_PKG_CONFIG is the correct upstream macro to use.
* Using PKG_CHECK_MODULES inside an if can break later PKG_CHECK_MODULES
relying on the AC_REQUIRE part being run. AS_IF ensures that
requirements are run before the condition.
* Running a bare pkg-config again misses $ac_tool_prefix.
Helmut
Index: mate-user-share-1.18.0/configure.ac
===================================================================
--- mate-user-share-1.18.0.orig/configure.ac
+++ mate-user-share-1.18.0/configure.ac
@@ -24,7 +24,7 @@
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_PATH_XTRA
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+PKG_PROG_PKG_CONFIG
AC_TYPE_PID_T
AC_TYPE_SIGNAL
@@ -53,13 +53,13 @@
BLUETOOTH_PKG="mate-bluetooth-1.0 >= 1.2.0"
AC_ARG_ENABLE(bluetooth, AS_HELP_STRING([--disable-bluetooth],[compile without bluetooth support]),,enable_bluetooth=no)
-if test "x$enable_bluetooth" = "xyes"; then
+AS_IF([test "x$enable_bluetooth" = "xyes"],[
PKG_CHECK_MODULES(BLUETOOTH, $BLUETOOTH_PKG)
AC_DEFINE(HAVE_BLUETOOTH, 1, [Set to true if mate-bluetooth support is available])
-else
+],[
BLUETOOTH_PKG=""
AC_MSG_WARN([Bluetooth support is disabled.])
-fi
+])
AM_CONDITIONAL(USE_BLUETOOTH, [test "$enable_bluetooth" = "yes"])
GLIB_REQUIRED_VERSION=2.36.0
@@ -144,7 +144,7 @@
PKG_CHECK_MODULES(EXTENSION,
libcaja-extension >= 1.17.1 $BLUETOOTH_PKG)
if test "${ac_with_cajadir}" = ""; then
- ac_with_cajadir=`pkg-config --variable=extensiondir libcaja-extension`
+ ac_with_cajadir=`$PKG_CONFIG --variable=extensiondir libcaja-extension`
fi
AC_SUBST(CAJADIR)
AC_MSG_NOTICE([installing caja plugin in ${ac_with_cajadir}])