1 $NetBSD: patch-aa,v 1.2 2007/12/27 15:37:44 joerg Exp $
6 --- Makefile.orig 2002-03-20 05:59:19.000000000 +0000
10 # set INSTALLROOT to the installation base; it is used to set the
11 # other directory variables below
12 -INSTALLROOT = /usr/local
13 +INSTALLROOT = $(PREFIX)
16 # set LIBDIR to where you will keep the datafiles, fontspecs, and "hanwin.tcl"
17 -LIBDIR = $(INSTALLROOT)/lib/Hanzim
18 +LIBDIR = $(INSTALLROOT)/lib/hanzim
19 #LIBDIR = /usr/local/lib/Hanzim
22 @@ -24,7 +24,7 @@ MANDIR = $(INSTALLROOT)/man
23 #MANDIR = /usr/local/man
25 # set DOCDIR to where you want the documentation files to reside
26 -DOCDIR = $(INSTALLROOT)/doc
27 +DOCDIR = $(INSTALLROOT)/share/doc/hanzim
28 #DOCDIR = $(INSTALLROOT)/share/doc
29 #DOCDIR = /usr/local/share/doc
30 #DOCDIR = /usr/share/doc
31 @@ -41,13 +41,13 @@ OS=UNIX
34 # location of Tcl and Tk libraries
35 -LIBTCLDIR = -L /usr/lib
36 +#LIBTCLDIR = -L /usr/lib
38 # location of x library
39 -LIBXDIR = -L /usr/X11/lib
40 +#LIBXDIR = -L /usr/X11/lib
42 # you might need to change "libtcl" and "libtk" to "libtcl8.x" and "libtk8.x"
43 -LIBS = $(LIBXDIR) $(LIBTCLDIR) -ltk -ltcl -lX11 -lm -ldl
44 +LIBS = $(LIBXDIR) $(LIBTCLDIR) -ltk -ltcl -lX11 -lm ${PTHREAD_LIBS} ${PTHREAD_LDADD}
48 @@ -55,11 +55,11 @@ RM = rm -f
49 # End of configuration.
50 ###############################################################################
54 DEFINES = -D$(OS) -DLIBDIR=\"$(LIBDIR)\"
55 -CFLAGS = -O2 $(DEFINES)
57 #CFLAGS = -O2 -Wall -pedantic -ansi $(DEFINES)
59 +LFLAGS = $(LIBS) $(LDFLAGS)
61 DIST_FILES = Hanzim/hanzim.h Hanzim/hgb_utf.h \
62 Hanzim/hanzim.c Hanzim/hanwin.c Hanzim/hinit.c Hanzim/hutil.c \
63 @@ -87,16 +87,17 @@ DIST_FILES = Hanzim/hanzim.h Hanzim/hgb_
64 $(CC) $(CFLAGS) -c hutil.c
67 - $(INSTALL) -s hanzim $(BINDIR)
68 - $(INSTALL) -m 0644 hanzim.man $(MANDIR)/man1/hanzim.1
69 - $(INSTALL) -m 0755 -d $(DOCDIR)
70 - $(INSTALL) -m 0644 hanzim.doc $(DOCDIR)
71 - $(INSTALL) -m 0755 -d $(LIBDIR)
73 - $(INSTALL) -m 0644 hanwin.tcl fonts.unix fonts.windows \
74 + $(BSD_INSTALL_PROGRAM) hanzim $(DESTDIR)$(BINDIR)
75 + $(BSD_INSTALL_MAN) hanzim.man $(DESTDIR)$(MANDIR)/man1/hanzim.1
76 + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DOCDIR)
77 + $(BSD_INSTALL_DATA) hanzim.doc $(DESTDIR)$(DOCDIR)
78 + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(LIBDIR)
80 + $(BSD_INSTALL_DATA) hanwin.tcl fonts.unix \
81 zidianf.gb zidianfl.b5 bushou.gb \
82 - cidianf.gb sanzicidianf.gb parts.gb $(LIBDIR)
83 - $(BINDIR)/hanzim -buildDB
84 + cidianf.gb sanzicidianf.gb parts.gb \
86 + HANZIM_LIB=$(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)/hanzim -buildDB
89 $(RM) $(BINDIR)/hanzim