aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/png++/patches/fix-destdir.patch
blob: 2a454565c59500616e6f119d2ab385e74a250af2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/Makefile
+++ b/Makefile
@@ -54,8 +54,8 @@
 uninstall: uninstall-headers uninstall-docs
 
 install-headers:
-	mkdir -p $(PREFIX)/include/png++
-	cp $(headers) $(PREFIX)/include/png++
+	mkdir -p $(DESTDIR)/$(PREFIX)/include/png++
+	cp $(headers) $(DESTDIR)/$(PREFIX)/include/png++
 
 uninstall-headers:
 	rm -rf $(PREFIX)/include/png++
@@ -103,7 +103,7 @@
 
 install-docs:
 	if [ -d doc ]; then \
-		dir=$(PREFIX)/share/doc/$(dist_dir); \
+		dir=$(DESTDIR)/$(PREFIX)/share/doc/$(dist_dir); \
 		rm -rf $$dir; \
 		mkdir -p $$dir \
 		&& cp -r $(doc_files) doc/html $$dir; \