Source: qxw Version: 20140331-1 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
qxw fails to cross build from source, because the upstream Makefile hard codes build architecture build tools such as gcc or pkg-config. After making them substitutable, qxw cross builds successfully. Please consider applying the attached patch. Helmut
--- qxw-20140331.orig/Makefile +++ qxw-20140331/Makefile @@ -24,7 +24,8 @@ all:: qxw deb:: qxw -CFLAGS := -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security `pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` -I/opt/local/include +PKG_CONFIG ?= pkg-config +CFLAGS := -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security `$(PKG_CONFIG) --cflags glib-2.0` `$(PKG_CONFIG) --cflags gtk+-2.0` -I/opt/local/include LFLAGS := -Wl,-Bsymbolic-functions -Wl,-z,relro -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lm -lcairo -lgobject-2.0 -lpcre -lglib-2.0 -pthread -lgthread-2.0 # -lrt as well? ifneq ($(filter deb,$(MAKECMDGOALS)),) @@ -34,22 +35,22 @@ endif qxw: qxw.o filler.o dicts.o gui.o draw.o Makefile - gcc -rdynamic -Wall -ldl qxw.o filler.o dicts.o gui.o draw.o $(LFLAGS) -o qxw + $(CC) -rdynamic -Wall -ldl qxw.o filler.o dicts.o gui.o draw.o $(LFLAGS) -o qxw qxw.o: qxw.c qxw.h filler.h dicts.h draw.h gui.h common.h Makefile - gcc $(CFLAGS) -c qxw.c -o qxw.o + $(CC) $(CFLAGS) -c qxw.c -o qxw.o gui.o: gui.c qxw.h filler.h dicts.h draw.h gui.h common.h Makefile - gcc $(CFLAGS) -c gui.c -o gui.o + $(CC) $(CFLAGS) -c gui.c -o gui.o filler.o: filler.c qxw.h filler.h dicts.h common.h Makefile - gcc $(CFLAGS) -c filler.c -o filler.o + $(CC) $(CFLAGS) -c filler.c -o filler.o dicts.o: dicts.c dicts.h gui.h common.h Makefile - gcc $(CFLAGS) -fno-strict-aliasing -c dicts.c -o dicts.o + $(CC) $(CFLAGS) -fno-strict-aliasing -c dicts.c -o dicts.o draw.o: draw.c qxw.h draw.h gui.h common.h Makefile - gcc $(CFLAGS) -c draw.c -o draw.o + $(CC) $(CFLAGS) -c draw.c -o draw.o .PHONY: clean clean: