Skip to content
Snippets Groups Projects
Commit 3d355583 authored by Ross Burton's avatar Ross Burton Committed by Richard Purdie
Browse files

gtk+3: refresh cross.patch


cross.patch was accepted upstream, so update this patch with the commit that was
merged.

(From OE-Core rev: 8e5ffa370c4259f925a0454fe7fd81c80ef2174b)

Signed-off-by: default avatarRoss Burton <ross.burton@intel.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent 4287f703
Branches
Tags
No related merge requests found
Upstream-Status: Submitted [#691301]
Upstream-Status: Backport [SHA 53083ea7b423482b203372f02d097edbef894a7d]
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 2ce72e5d53e84a2eba8c3f2cb6af25ffffc46ea9 Mon Sep 17 00:00:00 2001
From b670abe861e8dde067f544b9131edc28575d63ab Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Mon, 7 Jan 2013 12:49:27 +0000
Subject: [PATCH] build: support cross-compilation by natively building
......@@ -17,16 +17,16 @@ assumes that you'd set PKG_CONFIG_FOR_BUILD to a host pkg-config binary.
https://bugzilla.gnome.org/show_bug.cgi?id=691301
---
configure.ac | 25 +++++++--
configure.ac | 39 ++++++++++----
gtk/Makefile.am | 12 ++++-
gtk/native/Makefile.am | 12 +++++
m4/ax_prog_cc_for_build.m4 | 125 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 168 insertions(+), 6 deletions(-)
4 files changed, 177 insertions(+), 11 deletions(-)
create mode 100644 gtk/native/Makefile.am
create mode 100644 m4/ax_prog_cc_for_build.m4
diff --git a/configure.ac b/configure.ac
index 0069a9f..35b5f27 100644
index 0069a9f..f502e06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,9 @@ AC_CONFIG_SRCDIR([gdk/gdktypes.h])
......@@ -56,38 +56,47 @@ index 0069a9f..35b5f27 100644
MATH_LIB=-lm
AC_MSG_CHECKING([for native Win32])
LIB_EXE_MACHINE_FLAG=X86
@@ -868,14 +870,28 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
@@ -868,14 +870,32 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
+if test "x$enable_gtk2_dependency" = xyes; then
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
if test x$GTK_UPDATE_ICON_CACHE = xno; then
REBUILD_PNGS=#
fi
+elif test "x$cross_compiling" = xyes; then
+ # If no GTK+2 dependency and cross compiling, we need to find a host gdk-pixbuf.
- AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
- if test x$GTK_UPDATE_ICON_CACHE = xno; then
- REBUILD_PNGS=#
- fi
-fi
+AS_IF([test "x$enable_gtk2_dependency" = xyes],
+ [AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
+ if test x$GTK_UPDATE_ICON_CACHE = xno; then
+ REBUILD_PNGS=#
+ fi],
+
+ [test "x$cross_compiling" = xyes],
+ [# If no GTK+2 dependency and cross compiling, we need to find a host gdk-pixbuf.
+ # pkg.m4 blocks all variable starting with PKG, so allow this one
+ m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
+
+ AS_IF([test x$PKG_CONFIG_FOR_BUILD = x],
+ [AC_MSG_ERROR([You must define PKG_CONFIG_FOR_BUILD when cross compiling])])
+
+ AC_MSG_CHECKING([for native gdk-pixbuf])
+ if AC_RUN_LOG([$PKG_CONFIG_FOR_BUILD --exists --print-errors gdk-pixbuf-2.0]); then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([native gdk-pixbuf not found])
+ fi
+ AS_IF([AC_RUN_LOG([$PKG_CONFIG_FOR_BUILD --exists --print-errors gdk-pixbuf-2.0])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([native gdk-pixbuf not found])])
+
+ NATIVE_GDKPIXBUF_CFLAGS=`$PKG_CONFIG_FOR_BUILD --cflags gdk-pixbuf-2.0`
+ NATIVE_GDKPIXBUF_LIBS=`$PKG_CONFIG_FOR_BUILD --libs gdk-pixbuf-2.0`
+ AC_SUBST(NATIVE_GDKPIXBUF_CFLAGS)
+ AC_SUBST(NATIVE_GDKPIXBUF_LIBS)
fi
+ AC_SUBST(NATIVE_GDKPIXBUF_LIBS)]
+)
-AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
+AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$enable_gtk2_dependency" = xyes])
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
@@ -1742,6 +1758,7 @@ gtk/makefile.msc
@@ -1742,6 +1762,7 @@ gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/a11y/Makefile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment