Source: horst
Version: 5.1-1
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

horst 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, dh_auto_build substitutes them and
horst cross builds successfully. Please consider applying the attached
patch.

Helmut
--- horst-5.1.orig/Makefile
+++ horst-5.1/Makefile
@@ -54,6 +54,7 @@
 	radiotap/radiotap.o			   \
 	util.o					   \
 	wlan_util.o
+PKG_CONFIG ?= pkg-config
 LIBS=-lncurses -lm
 CFLAGS+=-std=gnu99 -Wall -Wextra -g -I. -DVERSION=\"$(VERSION)\"
 
@@ -83,7 +84,7 @@
     endif
   else
     OBJS += ifctrl-nl80211.o
-    CFLAGS += $(shell pkg-config --cflags libnl-$(LIBNL))
+    CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-$(LIBNL))
     ifeq ($(LIBNL),tiny)
       LIBS+=-lnl-tiny
     else
@@ -100,9 +101,9 @@
 all: $(NAME)
 
 .objdeps.mk: $(OBJS:%.o=%.c)
-	gcc -MM -I. $^ >$@
+	$(CC) -MM -I. $^ >$@
 ifeq ($(OSX),1)
-	gcc -MM -I. ifctrl-osx.m >>$@
+	$(CC) -MM -I. ifctrl-osx.m >>$@
 endif
 
 -include .objdeps.mk

Reply via email to