xorg: add a new cross-compile fix for libXt 1.0.6
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 28 Jul 2009 09:24:10 +0000 (11:24 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 28 Jul 2009 09:53:04 +0000 (11:53 +0200)
The cross-compile fix included in mainline of libXt between 1.0.5 and
1.0.6 is not sufficient. It allows to pass a different compiler for
the host tools, but still uses the TARGET_CFLAGS/TARGET_LDFLAGS to
compile the host tools, which obviously isn't correct.

The new patch allows to use the CFLAGS_FOR_BUILD/LDFLAGS_FOR_BUILD
variables as the CFLAGS/LDFLAGS to build the host tools.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/x11r7/xlib_libXt/xlib_libXt-1.0.6-cross-compile-fix.patch [new file with mode: 0644]
package/x11r7/xlib_libXt/xlib_libXt.mk

diff --git a/package/x11r7/xlib_libXt/xlib_libXt-1.0.6-cross-compile-fix.patch b/package/x11r7/xlib_libXt/xlib_libXt-1.0.6-cross-compile-fix.patch
new file mode 100644 (file)
index 0000000..f02edcb
--- /dev/null
@@ -0,0 +1,28 @@
+diff --git a/configure.ac b/configure.ac
+index 043ab5f..cb00a41 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,6 +48,10 @@ if test x"$CC_FOR_BUILD" = x; then
+       fi
+ fi
+ AC_SUBST([CC_FOR_BUILD])
++CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
++AC_SUBST(CFLAGS_FOR_BUILD)
++LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
++AC_SUBST(LDFLAGS_FOR_BUILD)
+ PKG_CHECK_MODULES(XT, sm x11 xproto kbproto)
+diff --git a/util/Makefile.am b/util/Makefile.am
+index 0d3ff01..37b78d2 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -5,6 +5,8 @@ noinst_PROGRAMS = makestrs
+ endif
+ CC = @CC_FOR_BUILD@
++CFLAGS = @CFLAGS_FOR_BUILD@
++LDFLAGS = @LDFLAGS_FOR_BUILD@
+ EXTRA_DIST = \
+       Shell.ht \
index 13e43c1bf48b5a9f632332e1b1f15673ff48208f..2fcf889161a8f90d23b489415b4692fe6e3120d9 100644 (file)
@@ -7,7 +7,8 @@
 XLIB_LIBXT_VERSION = 1.0.6
 XLIB_LIBXT_SOURCE = libXt-$(XLIB_LIBXT_VERSION).tar.bz2
 XLIB_LIBXT_SITE = http://xorg.freedesktop.org/releases/individual/lib
-XLIB_LIBXT_AUTORECONF = NO
+XLIB_LIBXT_AUTORECONF = YES
+XLIB_LIBXT_LIBTOOL_PATCH = NO
 XLIB_LIBXT_INSTALL_STAGING = YES
 XLIB_LIBXT_DEPENDENCIES = xlib_libSM xlib_libX11 xproto_kbproto xproto_xproto xcb-proto libxcb
 XLIB_LIBXT_CONF_ENV = CC_FOR_BUILD="/usr/bin/gcc -I$(STAGING_DIR)/usr/include"