From patchwork Fri Dec 4 16:52:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Zwing?= X-Patchwork-Id: 552806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id F268F1402A0 for ; Sat, 5 Dec 2015 03:52:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dawncrow.de header.i=@dawncrow.de header.b=hjU947+Z; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4509C8C433; Fri, 4 Dec 2015 16:52:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5nhSNqqT2Yur; Fri, 4 Dec 2015 16:52:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B77CF8C353; Fri, 4 Dec 2015 16:52:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C84121C10DA for ; Fri, 4 Dec 2015 16:52:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C6992939B2 for ; Fri, 4 Dec 2015 16:52:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jZyUE5NKz18Y for ; Fri, 4 Dec 2015 16:52:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.221]) by hemlock.osuosl.org (Postfix) with ESMTPS id C27DC93983 for ; Fri, 4 Dec 2015 16:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1449247955; l=3429; s=domk; d=dawncrow.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:From:References:To:Subject; bh=8fVnqZBHx1wi/w6xaNLafkjBi7bLB/tB6c6npzVghis=; b=hjU947+Z/BXs92oB8SYUuHTEsFmrS+8p8ik4G7GLekq8CNmt1ZvXh3IFJcIPQ29+iEQ SZ0B9alHxsNdeO57IZIwF4zajKMFR8aYtHiy3U3OggRR1J9R52CVx+vtO2+cbJDnMHC3R bMOupaRdB2GhGyWJSZZu6efd2RJICCwtxsY= X-RZG-AUTH: :ImkWY2CseuihIZy6ZWWciR6unPh5JPSWE7VxbdUCFBN5njG7Q28CH4dMeHLjXw== X-RZG-CLASS-ID: mo00 Received: from [192.168.178.40] ([185.61.122.196]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id N0764crB4GqY0gC (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 4 Dec 2015 17:52:34 +0100 (CET) To: Thomas Petazzoni , buildroot@uclibc.org References: <1436094900-3217-1-git-send-email-thomas.petazzoni@free-electrons.com> From: =?UTF-8?Q?Andr=c3=a9_Hentschel?= X-Enigmail-Draft-Status: N1110 Message-ID: <5661C4CF.7030709@dawncrow.de> Date: Fri, 4 Dec 2015 17:52:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1436094900-3217-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: Re: [Buildroot] [PATCH] wine: fix sane related build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Hi Thomas, Moving this discussion to the correct thread... I meanwhile submitted https://bugs.winehq.org/show_bug.cgi?id=39660 which didn't caught much attention yet. But I looked at it myself and I think I found a way to avoid patching Wine. Wines configure exposes special COMPONENT_CFLAGS and COMPONENT_LIBS variables which get prioritized over "guessed" tools. What's your opinion on this (afaict it works): Am 05.07.2015 um 13:15 schrieb Thomas Petazzoni: > If sane is installed system-wide on the build machine, then the > sane-config binary found is the one of the system, which returns > incorrect library paths for cross-compilation. > > To fix this, this commit adds a patch to wine to make it support a > SANE_CONFIG environment variable, and then adjusts wine.mk to > explicitly pass the path to $(STAGING_DIR)/usr/bin/sane-config. > > Fixes: > > http://autobuild.buildroot.org/results/8bd/8bdc1eed55075313403aa8a6c9af6a427bce198e/ > > Signed-off-by: Thomas Petazzoni > --- > package/wine/0003-sane-config-fix.patch | 21 +++++++++++++++++++++ > package/wine/wine.mk | 1 + > 2 files changed, 22 insertions(+) > create mode 100644 package/wine/0003-sane-config-fix.patch > > diff --git a/package/wine/0003-sane-config-fix.patch b/package/wine/0003-sane-config-fix.patch > new file mode 100644 > index 0000000..d53843a > --- /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 1ae038e..d6fb9c6 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 > diff --git a/package/wine/wine.mk b/package/wine/wine.mk index 38576db..e29d616 100644 --- a/package/wine/wine.mk +++ b/package/wine/wine.mk @@ -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