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

Bug#1063452: tty-clock FTCBFS: hard codes the build architecture pkg-config



Source: tty-clock
Version: 2.3-4
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

tty-clock fails to cross build from source, because the upstream
Makefile hard codes the build architecture pkg-config. I'm attaching a
patch that makes pkg-config substitutable. After applying it, tty-clock
becomes cross buildable.

Helmut
--- tty-clock-2.3.orig/Makefile
+++ tty-clock-2.3/Makefile
@@ -4,6 +4,7 @@
 
 SRC = ttyclock.c
 CC ?= gcc
+PKG_CONFIG ?= pkg-config
 BIN = tty-clock
 PREFIX ?= /usr/local
 INSTALLPATH = ${DESTDIR}${PREFIX}/bin
@@ -16,8 +17,8 @@
 		CFLAGS += -Wall -g $$(ncursesw5-config --cflags)
 		LDFLAGS += $$(ncursesw5-config --libs)
 else
-	CFLAGS += -Wall -g $$(pkg-config --cflags ncurses)
-	LDFLAGS += $$(pkg-config --libs ncurses)
+	CFLAGS += -Wall -g $$($(PKG_CONFIG) --cflags ncurses)
+	LDFLAGS += $$($(PKG_CONFIG) --libs ncurses)
 endif
 
 tty-clock : ${SRC}

Reply to: