0cdc2062bb432142b972ee65cc52c305be72bfff
[pkgsrc.git] / mail / faces / patches / patch-ab
1 $NetBSD: patch-ab,v 1.13 2006/01/08 14:30:01 tron Exp $
2
3 --- Makefile.dist.orig  1991-11-24 23:55:28.000000000 +0000
4 +++ Makefile.dist       2006-01-08 14:13:23.000000000 +0000
5 @@ -22,15 +22,18 @@
6  #  uncommented and set accordingly, if needed.
7  #
8  #========================================================================
9 +# Installation prefix.
10 +#PREFIX           ?=/usr/local
11 +#------------------------------------------------------------------------
12  #  If you want audio support, then the following line should be uncommented.
13  #
14 -#AUDIO_SUPPORT     = -DAUDIO_SUPPORT
15 +AUDIO_SUPPORT     = -DAUDIO_SUPPORT
16  #========================================================================
17  #  There is a default command (/usr/demo/SOUND/play), which is used to
18  #  play audio files. Alternatively you can specify your own custom
19  #  command here. Uncomment the following line and set appropriately.
20  #
21 -#AUDIO_CMD         = -DAUDIO_CMD=\"/usr/local/bin/play\"
22 +AUDIO_CMD         = -DAUDIO_CMD=\"$(LOCALBASE)/bin/rplay\"
23  #========================================================================
24  #  Faces displays a background pattern in its' window. When the window
25  #  is not completely full, this gives the appearance of trying to blend
26 @@ -38,7 +41,7 @@
27  #  can specify the name of a file containing an alternate pattern to use.
28  #  Uncomment the next two lines and set appropriately.
29  #
30 -#BACKNAME          = /usr/local/sample-background
31 +#BACKNAME          = $(PREFIX)/sample-background
32  #BACKGROUND        = -DBACKGROUND=\"$(BACKNAME)\"
33  #------------------------------------------------------------------------
34  #  Uncomment the following two lines to use the Domain Name Service to 
35 @@ -54,8 +57,8 @@
36  #  NOTE that for this to work you must have at least a minimal
37  #  /etc/resolv.conf file containing a valid nameserver entry.
38  #
39 -#DNSLOOKUP     = -DDNSLOOKUP
40 -#DNSLIB                = -lresolv
41 +DNSLOOKUP      = -DDNSLOOKUP
42 +DNSLIB         =
43  #------------------------------------------------------------------------
44  #  If you do not want to show the number of messages on the face icon,
45  #  then uncomment the next line.
46 @@ -72,12 +75,12 @@
47  #
48  #DONTSHOWUSER     = -DDONTSHOWUSER
49  #------------------------------------------------------------------------
50 -#  By default, faces looks for the face images in /usr/local/faces. If
51 +#  By default, faces looks for the face images in $(PREFIX)/faces. If
52  #  you wish to specify an alternate location, then these two lines should
53  #  be uncommented and set appropriately. Note that the value must be
54  #  a single directory name, not a colon separated list of paths.
55  #               
56 -FACEDIR           = /usr/local/faces
57 +FACEDIR           = $(PREFIX)/share/faces
58  CFACEDIR       = -DFACEDIR=\"$(FACEDIR)\"
59  #------------------------------------------------------------------------
60  #  It is possible to determine what type of monitoring faces does at
61 @@ -188,7 +191,7 @@
62  #  to the select call are different, and this definition should be
63  #  uncommented. You need to uncomment this for SunOS v3.x.
64  #
65 -#SELTYPE        = -DNO_43SELECT
66 +SELTYPE        = -DNO_43SELECT
67  #------------------------------------------------------------------------
68  #  If you are building faces on a Silicon Graphics machine, then you will
69  #  need to uncomment the following two definitions.
70 @@ -199,7 +202,7 @@
71  #  If the pending mail for users is in a different directory than
72  #  /usr/spool/mail, uncomment the following and set appropriately.
73  #
74 -#SPOOLDIR      = -DSPOOLDIR=\"/usr/mail\"
75 +SPOOLDIR       = -DSPOOLDIR=\"/var/mail\"
76  #------------------------------------------------------------------------
77  #  If faces is setup to monitor mail, then the name of the default
78  #  spoolfile is /usr/spool/mail/username. An alternative spoolfile name
79 @@ -258,8 +261,8 @@
80  #  library files are not in a standard place, then the following
81  #  two lines should be uncommented, and set appropriately.
82  #
83 -#X11INCDIR         = -I$(OPENWINHOME)/include
84 -#X11LIBDIR         = -L$(OPENWINHOME)/lib
85 +X11INCDIR         = -I${X11BASE}/include
86 +X11LIBDIR         = -L${X11BASE}/lib
87  #------------------------------------------------------------------------
88  #  If you are compiling the XView version, then the following two lines
89  #  should be uncommented, and set appropriately.
90 @@ -272,17 +275,19 @@
91  #  Default locations where faces files will be installed.
92  #  You might wish to alter these values.
93  #
94 -BINDIR         = /usr/local/bin
95 -LIBDIR         = /usr/local/lib
96 -MANDIR         = /usr/man
97 -MANSECT                = l
98 +BINDIR         = $(PREFIX)/bin
99 +LIBDIR         = $(PREFIX)/lib
100 +INCDIR         = $(PREFIX)/include
101 +MANDIR         = $(PREFIX)/man
102 +MANSECT                = 1
103  
104  #
105  #  Options for submakes
106  #
107  MAKEOPTS       = $(MFLAGS) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) \
108 -                           MANDIR=$(MANDIR) CC=$(CC) \
109 -                           NOINDEX=$(NOINDEX) SYSV=$(SYSV)
110 +                           INCDIR=$(INCDIR) MANDIR=$(MANDIR) CC="$(CC)" \
111 +                           NOINDEX=$(NOINDEX) SYSV=$(SYSV) PREFIX=$(PREFIX) \
112 +                           CCOMP="$(CCOMP)"
113  
114  #
115  # Override DEBUG on the command line as `DEBUG=-DDEBUG' to enable various
116 @@ -302,7 +307,7 @@
117                   $(SELTYPE) $(SGIDEF) $(SPOOLDIR) $(SPOOLFILE) $(SYSV) \
118                   $(TTEXT) $(TOPIX) $(UPDATE) $(USE_BZERO) $(USE_GETWD) \
119                   $(X11R3) $(X11INCDIR) $(XVIEWINCDIR) $(DEBUG)
120 -CCOMP          = -O
121 +CCOMP          = -g
122  CFLAGS         = $(CCOMP) $(CDEFS)
123  #
124  #=======================================================================
125 @@ -311,12 +316,9 @@
126  
127  BINARIES       = psfaces svfaces xfaces xvfaces
128  
129 -CC             = cc
130 -MAKE           = make
131 -
132  STDSRCS                = address.c get.c main.c mon.c parsefrom.c rec.c
133  STDOBJS                = address.o get.o main.o mon.o parsefrom.o rec.o
134 -STDLIBS                = compface/libcompface.a $(DNSLIB) $(SGILIBS)
135 +STDLIBS                = $(LDFLAGS) compface/libcompface.la $(DNSLIB) $(SGILIBS)
136  
137  COMPFACE       = compface
138  FACES          = facedir
139 @@ -357,25 +359,25 @@
140  #  Dell Unix (Interactive 386/ix): $(X11LIBDIR) -lX11 -linet
141  #  AT&T's XWIN:                    $(X11LIBDIR) -lX11_s -lc_s -lnsl_s -lpt
142  #
143 -X11LIBS                = $(X11LIBDIR) -lX11
144 +X11LIBS                = -lX11
145  XVIEWLIBS      = $(XVIEWLIBDIR) -lxview -lolgx -lX11
146  
147  help:
148                 @echo
149                 @echo "You need to specify one of the following options:"
150                 @echo
151 -               @echo "  make sunview    - to make the SunView version."
152 -               @echo "  make news       - to make the NeWS version."
153 -               @echo "  make x11        - to make the X11 version."
154 -               @echo "  make xview      - to make the XView version."
155 +               @echo "  ${MAKE} sunview    - to make the SunView version."
156 +               @echo "  ${MAKE} news       - to make the NeWS version."
157 +               @echo "  ${MAKE} x11        - to make the X11 version."
158 +               @echo "  ${MAKE} xview      - to make the XView version."
159                 @echo
160                 @echo "This should be followed by:"
161                 @echo
162 -               @echo "  make install"
163 -               @echo "  make clean"
164 +               @echo "  ${MAKE} install"
165 +               @echo "  ${MAKE} clean"
166                 @echo
167  
168 -all:           $(BINARIES)
169 +all:           x11
170  
171  news:          $(STDOBJS) news.o faces_cps.h
172                 (cd compface; $(MAKE) $(MAKEOPTS))
173 @@ -394,9 +396,8 @@
174  x11:           $(STDOBJS) x11.o
175                 (cd compface; $(MAKE) $(MAKEOPTS))
176                 (cd filters; $(MAKE) $(MAKEOPTS))
177 -               $(CC) -o xfaces $(CFLAGS) $(STDOBJS) x11.o \
178 +               $(LIBTOOL) $(CC) -o faces $(CFLAGS) $(STDOBJS) x11.o \
179                                         $(STDLIBS) $(X11LIBS) $(SVR4LIBS)
180 -               -cp xfaces faces
181  
182  xview:         $(STDOBJS) xview.o
183                 (cd compface; $(MAKE) $(MAKEOPTS))
184 @@ -406,21 +407,24 @@
185                 -cp xvfaces faces
186  
187  tables:
188 -               -mkdir $(FACEDIR)
189 -               -install -c -m 644 machine.tab $(FACEDIR)
190 -               -install -c -m 644 people.tab $(FACEDIR)
191 +               ${BSD_INSTALL_DATA_DIR} $(FACEDIR)
192 +               ${BSD_INSTALL_DATA} machine.tab $(FACEDIR)
193 +               ${BSD_INSTALL_DATA} people.tab $(FACEDIR)
194  
195  install:
196 +               ${MAKE} tables
197                 (cd compface; $(MAKE) $(MAKEOPTS) install)
198                 (cd filters; $(MAKE) $(MAKEOPTS) install)
199                 (cd scripts; $(MAKE) $(MAKEOPTS) install)
200 -               install -s -m 751 faces $(BINDIR)
201 -               install -c -m 755 face_update $(BINDIR)
202 -               install -c -m 755 faces.sendmail $(BINDIR)
203 -               install -c -m 644 faces.man \
204 +               $(LIBTOOL) ${BSD_INSTALL_PROGRAM} faces $(BINDIR)
205 +               ${BSD_INSTALL_SCRIPT} face_update $(BINDIR)
206 +               ${BSD_INSTALL_SCRIPT} faces.sendmail $(BINDIR)
207 +               ${BSD_INSTALL_MAN} faces.man \
208                                 $(MANDIR)/man$(MANSECT)/faces.$(MANSECT)
209 -               install -c -m 644 face_update.1 \
210 +               ${BSD_INSTALL_MAN} face_update.1 \
211                                 $(MANDIR)/man$(MANSECT)/face_update.$(MANSECT)
212 +               ${BSD_INSTALL_DATA_DIR} $(PREFIX)/lib/X11/app-defaults
213 +               ${BSD_INSTALL_DATA} Faces.ad $(PREFIX)/lib/X11/app-defaults/Faces
214  
215  clean:
216                 (cd compface; $(MAKE) $(MAKEOPTS) clean)