void-packages/srcpkgs/iwgtk/patches/fix-makefile.patch

30 lines
763 B
Diff

https://patch-diff.githubusercontent.com/raw/J-Lentz/iwgtk/pull/14.patch
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-CC=gcc
-CFLAGS=`pkg-config --cflags gtk+-3.0`
+CC?=gcc
+CCINCS=`pkg-config --cflags gtk+-3.0`
LDLIBS=`pkg-config --libs gtk+-3.0`
-prefix=/usr/local
+prefix?=$(PREFIX)
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
datarootdir=$(prefix)/share
@@ -23,10 +23,10 @@
.PHONY : clean install uninstall
iwgtk : $(objects)
- $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
+ $(CC) $(CCINCS) $(CFLAGS) -o $@ $^ $(LDLIBS)
%.o : $(srcdir)/%.c $(headers)
- $(CC) -c $(CFLAGS) -o $@ $<
+ $(CC) -c $(CCINCS) $(CFLAGS) -o $@ $<
$(srcdir)/icons.c : icons.gresource.xml $(icons)
glib-compile-resources --target=$@ --sourcedir=icons --generate-source $<