[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#981130: dump1090-mutability FTCBFS: hard codes the build architecture pkg-config



Source: dump1090-mutability
Version: 1.15~20180310.4a16df3+dfsg-7
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

dump1090-mutability fails to cross build from source, because the
upstream Makefile hard codes the build architecture pkg-config and thus
it fails finding the relevant dependencies. Making it substitutable is
all that it takes to make dump1090-mutability cross buildable. Please
consider applying the attached patch.

Helmut
--- dump1090-mutability-1.15~20180310.4a16df3+dfsg.orig/Makefile
+++ dump1090-mutability-1.15~20180310.4a16df3+dfsg/Makefile
@@ -17,7 +17,8 @@
 CPPFLAGS+=-DMODES_DUMP1090_VERSION=\"$(DUMP1090_VERSION)\"
 CFLAGS+=-O2 -g -Wall -Werror -W -Wno-unknown-warning-option -Wno-format-truncation
 LIBS=-lpthread -lm
-LIBS_RTL=`pkg-config --libs libusb-1.0 librtlsdr`
+PKG_CONFIG?=pkg-config
+LIBS_RTL=`$(PKG_CONFIG) --libs libusb-1.0 librtlsdr`
 CC=gcc
 
 UNAME := $(shell uname)
@@ -48,7 +49,7 @@
 %.o: %.c *.h
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRACFLAGS) -c $< -o $@
 
-dump1090.o: CFLAGS += `pkg-config --cflags libusb-1.0 librtlsdr`
+dump1090.o: CFLAGS += `$(PKG_CONFIG) --cflags libusb-1.0 librtlsdr`
 
 dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o $(COMPAT)
 	$(CC) -g -o $@ $^ $(LIBS) $(LIBS_RTL) $(LDFLAGS)

Reply to: