diff --git a/package/wine/0003-sane-config-fix.patch b/package/wine/0003-sane-config-fix.patch new file mode 100644 index 0000000000..d53843a70d --- /dev/null +++ b/package/wine/0003-sane-config-fix.patch @@ -0,0 +1,21 @@ +Add support for SANE_CONFIG variable + +Instead of using directly the sane-config command, allow to pass a +SANE_CONFIG environment variable to override where to find the +sane-config tool. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1375,7 +1375,7 @@ + if test "x$with_sane" != "xno" + then + ac_save_CPPFLAGS="$CPPFLAGS" +- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) ++ WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`]) + AC_CHECK_HEADER(sane/sane.h, + [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], + [SANE_CFLAGS=""]) diff --git a/package/wine/wine.mk b/package/wine/wine.mk index 1ae038efb5..d6fb9c6d01 100644 --- a/package/wine/wine.mk +++ b/package/wine/wine.mk @@ -174,6 +174,7 @@ endif ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) WINE_CONF_OPTS += --with-sane WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config else WINE_CONF_OPTS += --without-sane endif