Bug#929328: netmate FTCBFS: upstream Makefile hard codes build tools
Source: netmate
Version: 0.2.0-10
Tags: patch upstream
User: helmutg@debian.org
Usertags: rebootstrap
netmate fails to cross build from source, because the upstream Makefile
hard codes build tools such as gcc or pkg-config. The attached patch
makes them substitutable and netmate cross buildable. Please consider
applying it.
Helmut
--- netmate-0.2.0.orig/Makefile
+++ netmate-0.2.0/Makefile
@@ -10,12 +10,13 @@
DEBUGFLAGS = -g
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS)
LDFLAGS += -Wl,-z,relro
-GTK_CFLAGS = $(shell pkg-config --cflags gtk+-3.0)
-GTK_LIBS = $(shell pkg-config --libs gtk+-3.0)
+PKG_CONFIG ?= pkg-config
+GTK_CFLAGS = $(shell $(PKG_CONFIG) --cflags gtk+-3.0)
+GTK_LIBS = $(shell $(PKG_CONFIG) --libs gtk+-3.0)
all: netmate.c layer2.h layer3.h layer4.h
- gcc $(CPPFLAGS) $(GTK_CFLAGS) $(CFLAGS) -c netmate.c -o netmate.o
- gcc $(LDFLAGS) netmate.o $(GTK_LIBS) -lpcap -o netmate
+ $(CC) $(CPPFLAGS) $(GTK_CFLAGS) $(CFLAGS) -c netmate.c -o netmate.o
+ $(CC) $(LDFLAGS) netmate.o $(GTK_LIBS) -lpcap -o netmate
install:
install -D -m 755 netmate $(DESTDIR)/$(BINDIR)/netmate
Reply to: