summaryrefslogtreecommitdiffstats
path: root/patches/libX11-1.1.4/libX11-1.1.4-fix-cross-compile.diff
blob: e6b307f7c6937083f4a3f69a537c7726bde395bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# Submitted-By: Sascha Hauer, 2006-02-23
# Committed-By: Sascha Hauer
#
# Error:
#
# makekeys gets crosscompiled but is needed for the host
#
# Description:
#
# use Benes *_FOR_BUILD hack
#
# rediffed for X.org7.1 by Luotao Fu, 2006-06-19
# State:
#
# not reported upstream
#
# This patch is broken: it should use CC_FOR_BUILD only if
# crosscompiling; at the moment it breaks if CC_FOR_BUILD is not set and
# we build for the host. See nfsutils for an example how to solve it
# correctly. (MKL, RSC)
#

---
 src/util/Makefile.am |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Index: libX11-1.1.3/src/util/Makefile.am
===================================================================
--- libX11-1.1.3.orig/src/util/Makefile.am	2007-05-16 17:34:44.000000000 +0200
+++ libX11-1.1.3/src/util/Makefile.am	2007-10-17 16:59:32.000000000 +0200
@@ -1,11 +1,18 @@
 # $XdotOrg: lib/X11/src/util/Makefile.am,v 1.4 2006-02-19 02:14:12 jamey Exp $
 
-noinst_PROGRAMS=makekeys
+# evil hack
+CFLAGS=$(CFLAGS_FOR_BUILD) $(X11_CFLAGS) $(BIGREQS_CFLAGS)
+CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+CC=$(CC_FOR_BUILD)
+LIBTOOL = @LIBTOOL@ --tag=CC
 
-makekeys_CFLAGS=$(X11_CFLAGS)
+noinst_PROGRAMS=makekeys
 
-#override CC = gcc
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+makekeys_CFLAGS=$(CFLAGS_FOR_BUILD)
+makekeys_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
+makekeys_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 
 EXTRA_DIST = mkks.sh