summaryrefslogtreecommitdiff
path: root/editors/mg/patches/patch-ag
blob: 4f7dc4de3713b812d074f1bb62e5b410da2ce95a (plain)
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
38
39
40
41
42
43
44
45
46
$NetBSD: patch-ag,v 1.5 2020/04/27 04:38:47 rillig Exp $

Use pkgsrc layout/flags.

--- Makefile.in.orig	2011-09-05 18:59:14.000000000 +0000
+++ Makefile.in
@@ -7,20 +7,21 @@
 
 name=		mg
 
-prefix=		/usr/local
+prefix?=	/usr/local
 bindir=		$(prefix)/bin
 libdir=		$(prefix)/lib
 includedir=	$(prefix)/include
-mandir=		$(prefix)/man
+mandir=		$(prefix)/${PKGMANDIR}
+docdir=		$(prefix)/share/doc
 
 
 CC=		gcc
 CFLAGS?=	-O2 -pipe
-CFLAGS+=	-g -Wall -Werror -Wno-error=unused-but-set-variable
-LIBS= 		-lncurses
+CFLAGS+=	-g -Wall -Werror
+LIBS+= 		-lncurses
 
-INSTALL=	/usr/bin/install
-STRIP=		/usr/bin/strip
+INSTALL?=	/usr/bin/install
+STRIP?=		/usr/bin/strip
 
 
 OBJS= 	autoexec.o \
@@ -86,8 +87,10 @@ clean:
 install: $(name) $(name).1
 	$(INSTALL) -d $(DESTDIR)$(bindir)
 	$(INSTALL) -d $(DESTDIR)$(mandir)/man1
+	$(INSTALL) -d $(DESTDIR)$(docdir)/mg
-	$(INSTALL) -m 755 $(name)		$(DESTDIR)$(bindir)/$(name)
+	$(BSD_INSTALL_PROGRAM) -m 755 $(name)	$(DESTDIR)$(bindir)/$(name)
 	$(INSTALL) -m 444 $(name).1		$(DESTDIR)$(mandir)/man1/$(name).1
+	$(INSTALL) -m 444 tutorial		$(DESTDIR)$(docdir)/mg/tutorial
 
 install-strip: install
 	$(STRIP) $(DESTDIR)$(bindir)/$(name)