summaryrefslogtreecommitdiff
path: root/print/bg5ps/patches/patch-aa
blob: 50e2b3a8cceb65d984a0e203fa231c3d117aa17e (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
$NetBSD: patch-aa,v 1.2 2002/07/09 16:49:20 wiz Exp $

--- Makefile.orig	Tue Feb 15 04:41:27 2000
+++ Makefile
@@ -17,15 +17,16 @@
 
 OBJS = ttf2psm.o b5tou8.o b5_in.o gb_in.o gbtou8.o
 
-CC = gcc
+#CC = gcc
 INSTALL = install
-CFLAGS =
-LIBS = -lttf -lm
-INCLUDEDIR = 
+#CFLAGS =
+LDFLAGS = -Wl,-R${LOCALBASE}/lib
+LIBS = -lttf -lm -lintl
+INCLUDEDIR = -L/usr/lib -L${LOCALBASE}/lib
 
-prefix = /usr
-BINDIR = $(prefix)/bin
-ETCDIR = /etc/chinese/
+#prefix = /usr
+BINDIR = ${PREFIX}/bin
+ETCDIR = ${PKG_SYSCONFDIR}
 
 all: ttf2psm
 
@@ -33,13 +34,13 @@
 	$(CC) -c $(CFLAGS) $(INCLUDEDIR) $< -o $@
 
 ttf2psm: $(OBJS)
-	$(CC) $(CFLAGS) $(INCLUDEDIR) $(LIBS) -o ttf2psm $(OBJS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDEDIR) -o ttf2psm $(OBJS) $(LIBS)
 
 install: all bg5ps bg5ps.conf
 	mkdir -p $(ETCDIR)
 	mkdir -p $(BINDIR)
 	$(INSTALL) -m644 bg5ps.conf $(ETCDIR)/bg5ps.conf
-	$(INSTALL) -m755 bg5ps $(BINDIR)
+	$(INSTALL) -m755 bg5ps.new $(BINDIR)/bg5ps
 	$(INSTALL) -m755 ttf2psm $(BINDIR)
 
 clean: