summaryrefslogtreecommitdiff
path: root/package/wine
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-22 22:35:20 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-22 22:35:20 +0100
commit79c7bae6cbd6c1dd062c32709f17ac0a6611bfbf (patch)
tree6285cad288cc7a7820dd1862652ea5bfa86cf27f /package/wine
parent88511ccf4a6e0338cbfd8dc985b9ebcda5d0e6b2 (diff)
wine: handle all *-config scripts
We already had a patch to allow us to explicitly pass the location of the sane-config script, but wine's configure script uses several other *-config scripts. This commit extends the wine patch and wine.mk to explicitly pss the location of all *-config scripts that may be used by wine. The wine patch has been submitted upstream. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/wine')
-rw-r--r--package/wine/0001-configure-allow-to-override-the-location-of-the-conf.patch109
-rw-r--r--package/wine/0001-sane-config-fix.patch21
-rw-r--r--package/wine/wine.mk4
3 files changed, 113 insertions, 21 deletions
diff --git a/package/wine/0001-configure-allow-to-override-the-location-of-the-conf.patch b/package/wine/0001-configure-allow-to-override-the-location-of-the-conf.patch
new file mode 100644
index 000000000..9fc9f64aa
--- /dev/null
+++ b/package/wine/0001-configure-allow-to-override-the-location-of-the-conf.patch
@@ -0,0 +1,109 @@
+From 18078feecc8da0ab2693d0bb5423489fa62920ef Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Tue, 22 Dec 2015 21:25:19 +0100
+Subject: [PATCH] configure: allow to override the location of the *-config
+ scripts
+
+Currently, the configure.ac calls a number of *-config scripts to get
+details about installed libraries. It assumes that those *-config
+scripts are readily available in the PATH.
+
+While this is true in most situations, it may not be true when
+cross-compiling: you may have the *-config scripts matching the target
+environment in a location that isn't in the PATH. For such situations,
+it is very useful to be able to override the location of such *-config
+scripts using environment variables.
+
+The proposed changes does not introduce any functional difference if
+you don't pass those new environment variables: if they are not
+passed, it falls back to the current value.
+
+However, if those *_CONFIG variables are passed, then they are used as
+the path to the corresponding *-config script.
+
+The ${FOO_CONFIG:-foo-config} construct is POSIX compliant, so it is
+available in all shells.
+
+(Patch submitted upstream.)
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 86f12c5..37ceab5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1191,7 +1191,7 @@ dnl **** Check for libxml2 ****
+ if test "x$with_xml" != "xno"
+ then
+ WINE_PACKAGE_FLAGS(XML2,[libxml-2.0],[-lxml2],
+- [`xml2-config --cflags 2>/dev/null`],[`xml2-config --libs 2>/dev/null`],
++ [`${XML2_CONFIG:-xml2-config} --cflags 2>/dev/null`],[`${XML2_CONFIG:-xml2-config} --libs 2>/dev/null`],
+ [AC_CHECK_HEADERS([libxml/parser.h libxml/xmlsave.h libxml/SAX2.h])
+ if test "$ac_cv_header_libxml_parser_h" = "yes" -a "$ac_cv_header_libxml_xmlsave_h" = "yes" -a "$ac_cv_header_libxml_SAX2_h" = "yes"
+ then
+@@ -1220,7 +1220,7 @@ WINE_WARNING_WITH(xml,[test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"],
+ if test "x$with_xslt" != "xno"
+ then
+ WINE_PACKAGE_FLAGS(XSLT,[libxslt],[-lxml2],
+- [`xslt-config --cflags 2>/dev/null`],[`xslt-config --libs 2>/dev/null`],
++ [`${XSLT_CONFIG:-xslt-config} --cflags 2>/dev/null`],[`${XSLT_CONFIG:-xslt-config} --libs 2>/dev/null`],
+ [AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,,
+ [#ifdef HAVE_LIBXSLT_PATTERN_H
+ # include <libxslt/pattern.h>
+@@ -1291,7 +1291,7 @@ WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurse
+ dnl **** Check for SANE ****
+ if test "x$with_sane" != "xno"
+ then
+- 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=""])])
+@@ -1311,7 +1311,7 @@ dnl **** Check for libgphoto2 ****
+ if test "x$with_gphoto" != "xno"
+ then
+ WINE_PACKAGE_FLAGS(GPHOTO2,[libgphoto2],[-lgphoto2],
+- [`gphoto2-config --cflags 2>/dev/null`],[`gphoto2-config --libs 2>/dev/null`],
++ [`${GPHOTO2_CONFIG:-gphoto2-config} --cflags 2>/dev/null`],[`${GPHOTO2_CONFIG:-gphoto2-config} --libs 2>/dev/null`],
+ [AC_CHECK_HEADER(gphoto2-camera.h,
+ [AC_CHECK_LIB(gphoto2,gp_camera_new,
+ [AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have the libgphoto2 development environment])],
+@@ -1319,8 +1319,8 @@ then
+ [$GPHOTO2_LIBS])],
+ [GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""])])
+ WINE_PACKAGE_FLAGS(GPHOTO2_PORT,[libgphoto2_port],[-lgphoto2_port],
+- [`gphoto2-port-config --cflags 2>/dev/null`],
+- [`gphoto2-port-config --libs 2>/dev/null`],
++ [`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --cflags 2>/dev/null`],
++ [`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --libs 2>/dev/null`],
+ [AC_CHECK_HEADER(gphoto2-port.h,
+ [AC_CHECK_LIB(gphoto2_port,gp_port_info_list_new,
+ [AC_DEFINE(HAVE_GPHOTO2_PORT, 1, [Define if we have the libgphoto2_port development environment])],
+@@ -1382,8 +1382,8 @@ dnl **** Check for FreeType 2 ****
+ if test "x$with_freetype" != "xno"
+ then
+ WINE_PACKAGE_FLAGS(FREETYPE,[freetype2],[-lfreetype],
+- [`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`],
+- [`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`],
++ [`(${FREETYPE_CONFIG:-freetype-config} --cflags || ${FREETYPE2_CONFIG:-freetype2-config} --cflags) 2>/dev/null`],
++ [`(${FREETYPE_CONFIG:-freetype-config} --libs || ${FREETYPE2_CONFIG:-freetype2-config} --libs) 2>/dev/null`],
+ [AC_CHECK_HEADERS([ft2build.h])
+ if test "$ac_cv_header_ft2build_h" = "yes"
+ then
+@@ -1538,8 +1538,8 @@ AC_SUBST(CUPS_CFLAGS,"")
+ if test "x$with_cups" != "xno"
+ then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+- ac_cups_cflags=`cups-config --cflags 2>/dev/null`
+- ac_cups_libs=`cups-config --ldflags 2>/dev/null`
++ ac_cups_cflags=`${CUPS_CONFIG:-cups-config} --cflags 2>/dev/null`
++ ac_cups_libs=`${CUPS_CONFIG:-cups-config} --ldflags 2>/dev/null`
+ CPPFLAGS="$CPPFLAGS $ac_cups_cflags"
+ AC_CHECK_HEADERS(cups/cups.h,
+ [WINE_CHECK_SONAME(cups,cupsGetDefault,
+--
+2.6.4
+
diff --git a/package/wine/0001-sane-config-fix.patch b/package/wine/0001-sane-config-fix.patch
deleted file mode 100644
index bccde7dc0..000000000
--- a/package/wine/0001-sane-config-fix.patch
+++ /dev/null
@@ -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 <thomas.petazzoni@free-electrons.com>
-
-Index: b/configure.ac
-===================================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -1291,7 +1291,7 @@
- dnl **** Check for SANE ****
- if test "x$with_sane" != "xno"
- then
-- 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 1d935cc5a..2cd5c302c 100644
--- a/package/wine/wine.mk
+++ b/package/wine/wine.mk
@@ -49,6 +49,7 @@ endif
ifeq ($(BR2_PACKAGE_CUPS),y)
WINE_CONF_OPTS += --with-cups
WINE_DEPENDENCIES += cups
+WINE_CONF_ENV += CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config
else
WINE_CONF_OPTS += --without-cups
endif
@@ -73,6 +74,7 @@ WINE_CONF_OPTS += --with-freetype
HOST_WINE_CONF_OPTS += --with-freetype
WINE_DEPENDENCIES += freetype
HOST_WINE_DEPENDENCIES += host-freetype
+WINE_CONF_ENV += FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config
else
WINE_CONF_OPTS += --without-freetype
HOST_WINE_CONF_OPTS += --without-freetype
@@ -144,6 +146,7 @@ endif
ifeq ($(BR2_PACKAGE_LIBXML2),y)
WINE_CONF_OPTS += --with-xml
WINE_DEPENDENCIES += libxml2
+WINE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config
else
WINE_CONF_OPTS += --without-xml
endif
@@ -151,6 +154,7 @@ endif
ifeq ($(BR2_PACKAGE_LIBXSLT),y)
WINE_CONF_OPTS += --with-xslt
WINE_DEPENDENCIES += libxslt
+WINE_CONF_ENV += XSLT_CONFIG=$(STAGING_DIR)/usr/bin/xslt-config
else
WINE_CONF_OPTS += --without-xslt
endif