summary refs log tree commit diff
path: root/OpenBSD/www/cgit-pink/patches/patch-Makefile
blob: b49eb37a95656da19f808b0f5729636cd25024ae (plain) (blame)
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
$OpenBSD: patch-Makefile,v 1.9 2018/08/04 09:19:35 kn Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -2,11 +2,11 @@ all::
 
 CGIT_VERSION = v1.2.1
 CGIT_SCRIPT_NAME = cgit.cgi
-CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
-CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
-CGIT_CONFIG = /etc/cgitrc
-CACHE_ROOT = /var/cache/cgit
-prefix = /usr/local
+CGIT_SCRIPT_PATH = /var/www/cgi-bin
+CGIT_DATA_PATH = /var/www/htdocs
+CGIT_CONFIG = /conf/cgitrc
+CACHE_ROOT = /tmp/cgit
+prefix = ${PREFIX}
 libdir = $(prefix)/lib
 filterdir = $(libdir)/cgit/filters
 docdir = $(prefix)/share/doc/cgit
@@ -90,8 +90,6 @@ install: all
 	$(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png
 	$(INSTALL) -m 0644 favicon.ico $(DESTDIR)$(CGIT_DATA_PATH)/favicon.ico
 	$(INSTALL) -m 0644 robots.txt $(DESTDIR)$(CGIT_DATA_PATH)/robots.txt
-	$(INSTALL) -m 0755 -d $(DESTDIR)$(filterdir)
-	$(COPYTREE) filters/* $(DESTDIR)$(filterdir)
 
 install-doc: install-man install-html install-pdf
 
p;id=6d7e3596ebb387265d8cfdc5b312e0ea76da8c8a&follow=1'>html: check return value of writeJason A. Donenfeld This squelches a gcc warning. It's also correct that we check to see if there are any partial or failed writes. For now, we just print a warning to stderr. In the future, perhaps it will prove wise to exit(1) on partial writes. 2013-03-20ui-shared: squelch compiler warning.Jason A. Donenfeld Since tail is initialized to 0, we will never get a warning on the last if statement, but recent gcc complains anyway. So, we initialize len as well. Future gcc versions should be able to optimize this out anyway. 2013-03-20cgit.mk: Use SHELL_PATH_SQ to run gen-version.shJohn Keeping On some platforms (notably Solaris) /bin/sh doesn't support enough of POSIX for gen-version.sh to run. Git's Makefile provides SHELL_PATH_SQ to address this issue so we just have to use it. Signed-off-by: John Keeping <john@keeping.me.uk> 2013-03-20cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping If CGIT_VERSION is in CGIT_CFLAGS then a change in version (for example because you have committed your changes) causes all of the CGit objects to be rebuilt. Avoid this by using EXTRA_CPPFLAGS to add the version for only those files that are affected and make them depend on VERSION. Signed-off-by: John Keeping <john@keeping.me.uk> 2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping We already have a global cgit_version which is set from the #define'd CGIT_VERSION in cgit.c. Change ui-patch.c to use this so that we only need to rebuild cgit.o when the version changes. Signed-off-by: John Keeping <john@keeping.me.uk> 2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping