kiss-mfavila-small/ports/aewm/patches/fix_pkg-config.patch
2021-09-16 19:06:34 -03:00

49 lines
1.4 KiB
Diff

Description: Fix FTCBFS by making pkg-config substitutable.
From: Helmut Grohne <helmut@subdivi.de>
---
diff --git a/Makefile b/Makefile
index 9d6c209..024ec8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
# aewm - Copyright 1998-2007 Decklin Foster <decklin@red-bean.com>.
# This program is free software; see LICENSE for details.
+PKG_CONFIG ?= pkg-config
+
# Set this to the location where you want to install
DESTDIR =
XROOT = /usr
@@ -10,8 +12,8 @@ OPT_WMFLAGS += -DSHAPE
OPT_WMLIB += -lXext
# Uncomment to add Xft support
-OPT_WMFLAGS += -DXFT `pkg-config --cflags xft`
-OPT_WMLIB += `pkg-config --libs xft` -lXext
+OPT_WMFLAGS += -DXFT `$(PKG_CONFIG) --cflags xft`
+OPT_WMLIB += `$(PKG_CONFIG) --libs xft` -lXext
# Uncomment for debugging (abandon all hope, ye who enter here)
#OPT_WMFLAGS += -DDEBUG
@@ -46,7 +48,7 @@ aepanel: $(CLIENTOBJ) menu.o parser.o
X11FLAGS = -I$(XROOT)/include
WMFLAGS = $(X11FLAGS) $(OPT_WMFLAGS)
-GTKFLAGS = `pkg-config --cflags gtk+-2.0`
+GTKFLAGS = `$(PKG_CONFIG) --cflags gtk+-2.0`
$(PLAINOBJ): %.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
@@ -62,7 +64,7 @@ $(GTKOBJ): %.o: %.c
X11LIB = -L$(XROOT)/lib -lX11
WMLIB = $(X11LIB) $(OPT_WMLIB)
-GTKLIB = `pkg-config --libs gtk+-2.0` -lX11
+GTKLIB = `$(PKG_CONFIG) --libs gtk+-2.0` -lX11
$(PLAINBIN): %: %.o
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@