summaryrefslogtreecommitdiff
path: root/misc/dialog/patches/patch-aa
blob: 2608a3eafcb94875f141ed937b6c941cc1487b29 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
$NetBSD: patch-aa,v 1.6 2000/07/28 20:30:11 jlam Exp $

--- Makefile.orig	Thu Jan  9 01:19:34 1997
+++ Makefile	Fri Jul 28 15:30:22 2000
@@ -17,8 +17,8 @@
 # can be disabled to make dialog a bit smaller (could be done for more things)
 HAVE_GUAGE=true
 
-BINDIR = /usr/bin
-MANDIR = /usr/man/man1/
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man1
 
 CC = gcc
 CPP = gcc -E
@@ -30,7 +30,7 @@
 # do not edit below this line
 
 CFLAGS = $(OPTIM) -DLOCALE -DVERSION=\"0.6z\"
-LDFLAGS = -L .
+LDFLAGS += -L . -L${LOCALBASE}/lib
 LDLIBS = -ldialog
 
 OBJS = checklist.o inputbox.o menubox.o msgbox.o \
@@ -42,8 +42,13 @@
 OBJS+=mouse.o
 endif
 ifeq ($(HAVE_NCURSES), true)
-CFLAGS+=-DHAVE_NCURSES -I/usr/include/ncurses
+CFLAGS+=-DHAVE_NCURSES
+endif
+ifeq ($(HAVE_TRUE_NCURSES), true)
+CFLAGS+=-DHAVE_TRUE_NCURSES -I${LOCALBASE}/include
 LDLIBS+=-lncurses
+else
+LDLIBS+=-lcurses
 endif
 ifeq ($(HAVE_RC_FILE), true)
 CFLAGS+=-DHAVE_RC_FILE
@@ -59,7 +64,7 @@
 all: libdialog.a dialog
 
 libdialog.a: $(OBJS)
-	ar rcs libdialog.a $(OBJS)
+	ar rc libdialog.a $(OBJS)
 
 dialog: dialog.o
 
@@ -70,7 +75,7 @@
 include .depend
 
 install: dialog libdialog.a
-	install -s dialog $(BINDIR)
+	${BSD_INSTALL_PROGRAM} dialog $(BINDIR)
 	cp dialog.man dialog.1
 ifeq ($(HAVE_RC_FILE),false)
 	mv dialog.1 dialog.in
@@ -82,7 +87,7 @@
 endif
 	mv dialog.1 dialog.in
 	sed -e "/COMMENTSTART/,/COMMENTEND/d" dialog.in >dialog.1
-	install -m 644 dialog.1 $(MANDIR)
+	${BSD_INSTALL_MAN} dialog.1 $(MANDIR)
 #	install -m 644 libdialog.a /usr/lib/
 
 depend: