Package: xzip / 1:1.8.2-4

respect_cflags_env Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Respect CFLAGS, CPPFLAGS, LDFLAGS environment variables
Author: Daniel Schepler <schepler@debian.org>
--- xzip-1.8.2.orig/Makefile
+++ xzip-1.8.2/Makefile
@@ -102,8 +102,9 @@ MANDIR = /usr/share/man
 
 # --------------------
 
-CFLAGS = -O
-LDFLAGS =
+CFLAGS ?= -O
+CPPFLAGS ?=
+LDFLAGS ?=
 LIBS = -L$(XLIB) -lX11 $(SYSTEMLIBS)
 
 # definitions for the default fonts. Users can override these with X resources.
@@ -150,17 +151,17 @@ test: $(XOBJS)
 $(OBJS) : $(INC) extern.c version.h
 
 .c.o:
-	$(CC) $(CFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) -c $<
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) -c $<
 
 pickle.o : pickle.h
 
 $(XOBJS) : $(INC) xio.h version.h
 
 xio.o: xio.c xio.h greypm.bm
-	$(CC) $(CFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) -c xio.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) -c xio.c
 
 xinit.o: xinit.c xio.h
-	$(CC) $(CFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) $(FONTDEFAULTLIST) -c xinit.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(SYSTEMFLAGS) -I$(XINCLUDE) $(FONTDEFAULTLIST) -c xinit.c
 
 install: $(PROGRAM)
 	install $(PROGRAM) $(DESTDIR)/$(BINDIR)