Skip to contentSkip to conversation

wine: Make the sane-config patch obsolete by using configure flags

PATCH New André Hentschel 2 participants 4 messages Dec 7, 2015 – Dec 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 wine: Make the sane-config patch obsolete by using configure flags

---
 package/wine/0003-sane-config-fix.patch | 21 ---------------------
 package/wine/wine.mk                    |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 package/wine/0003-sane-config-fix.patch
package/wine/0003-sane-config-fix.patch deleted +0 -21
deleted file mode 100644
index d53843a..0000000
@@ -1,21 +0,0 @@
-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 <[email protected]>
-
-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=""])
package/wine/wine.mk +2 -1
index 38576db..e29d616 100644
@@ -173,8 +173,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y)
 WINE_CONF_OPTS += --with-sane
+WINE_CONF_OPTS += SANE_CFLAGS="`$(STAGING_DIR)/usr/bin/sane-config --cflags 2>/dev/null`"
+WINE_CONF_OPTS += SANE_LIBS="`$(STAGING_DIR)/usr/bin/sane-config --ldflags 2>/dev/null`"
 WINE_DEPENDENCIES += sane-backends
-WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config
 else
 WINE_CONF_OPTS += --without-sane
 endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 wine: Make the sane-config patch obsolete by using configure flags

Andr?,

Quoted 6 lines · Andr? Hentschel
---
 package/wine/0003-sane-config-fix.patch | 21 ---------------------
 package/wine/wine.mk                    |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 package/wine/0003-sane-config-fix.patch

IMO, this is not the good choice. The patch should be kept and submitted upstream. There is absolutely no reason for upstream to reject the patch: it simply *adds* the possibility of passing a custom sane-config path through SANE_CONFIG, without changing *anything* to the existing behavior if SANE_CONFIG is not used.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/2 wine: Make the sane-config patch obsolete by using configure flags

Am 08.12.2015 um 09:48 schrieb Thomas Petazzoni:

Quoted 10 lines

Andr?,

Quoted 6 lines · Andr? Hentschel
---
 package/wine/0003-sane-config-fix.patch | 21 ---------------------
 package/wine/wine.mk                    |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 package/wine/0003-sane-config-fix.patch
Quoted 6 lines

IMO, this is not the good choice. The patch should be kept and submitted upstream. There is absolutely no reason for upstream to reject the patch: it simply *adds* the possibility of passing a custom sane-config path through SANE_CONFIG, without changing *anything* to the existing behavior if SANE_CONFIG is not used.

Hi Thomas,
rebase it, send it to wine-patches at winehq.org (maybe you need to register first, not sure), I'll also sign it off, but I totally doubt it gets in. One point might be that there's already a way with the variables I used in my patch or that your patch is not generic enough.

#3 lore raw

PATCH 1/2 wine: Make the sane-config patch obsolete by using configure flags

In reply to André Hentschel

Andr?,

Quoted 6 lines · Andr? Hentschel
---
 package/wine/0003-sane-config-fix.patch | 21 ---------------------
 package/wine/wine.mk                    |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)
 delete mode 100644 package/wine/0003-sane-config-fix.patch

As I said earlier, I didn't like your approach. So I cooked an improved patch for wine's configure.ac script to be able to explicitly pass the location of the various *-config scripts. I have submitted this patch upstream to the Wine project.

See
https://git.busybox.net/buildroot/commit/?id=79c7bae6cbd6c1dd062c32709f17ac0a6611bfbf.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com