pkgsrc/mail/faces/patches/patch-ac
jlam 7cd04d6fd0 Update mail/faces to 1.6.1nb1. Changes from version 1.6.1 are moving the
package under ${X11PREFIX} instead of trying to dual-install under both
${LOCALBASE} and ${X11BASE}, and strongly buildlink'fiying.
2001-11-30 16:29:28 +00:00

92 lines
2.8 KiB
Text

$NetBSD: patch-ac,v 1.11 2001/11/30 16:29:28 jlam Exp $
--- compface/Makefile.orig Wed Oct 23 22:28:06 1991
+++ compface/Makefile
@@ -22,20 +22,22 @@
# BINDIR, LIBDIR, and MANDIR are expected to be overridden by the
# calling Makefile
-BINDIR = /usr/local/bin
-LIBDIR = /usr/local/lib
-MANDIR = /usr/manl
+PREFIX ?=/usr/local
+BINDIR = $(PREFIX)/bin
+INCDIR = $(PREFIX)/include
+LIBDIR = $(PREFIX)/lib
+MANDIR = $(PREFIX)/man
NAME = compface
UNNAME = uncompface
EXECUTABLE = $(BINDIR)/$(NAME)
UNEXECUTABLE = $(BINDIR)/$(UNNAME)
-LIBNAME = lib$(NAME).a
+LIBNAME = lib$(NAME).la
LIBRARY = $(LIBDIR)/$(LIBNAME)
MAN1DIR = $(MANDIR)/man1
MAN3DIR = $(MANDIR)/man3
OBJECTS = arith.o file.o compress.o gen.o uncompface.o
-SOURCES = compface.c uncompface.o arith.c file.c compress.c gen.c \
+SOURCES = compface.c uncompface.c arith.c file.c compress.c gen.c \
cmain.c uncmain.c
HDRS = compface.h data.h
OTHERS = README $(NAME).1 $(NAME).3 Makefile
@@ -45,17 +47,16 @@
CCOMP = -g
CFLAGS = $(CDEFS) $(CCOMP)
-all: $(NAME) $(UNNAME)
+all: $(LIBNAME) $(NAME) $(UNNAME)
$(NAME) : cmain.o compface.o $(LIBNAME)
- $(CC) $(CFLAGS) -o $(NAME) cmain.o compface.o $(LIBNAME)
+ $(LIBTOOL) $(CC) $(CFLAGS) -o $(NAME) cmain.o compface.o $(LIBNAME)
$(UNNAME) : uncmain.o $(LIBNAME)
- $(CC) $(CFLAGS) -o $(UNNAME) uncmain.o $(LIBNAME)
+ $(LIBTOOL) $(CC) $(CFLAGS) -o $(UNNAME) uncmain.o $(LIBNAME)
-$(LIBNAME) : $(OBJECTS)
- ar rc $(LIBNAME) $(OBJECTS)
- -ranlib $(LIBNAME)
+$(LIBNAME) : $(OBJECTS:.o=.lo)
+ $(LIBTOOL) $(CC) -o $(LIBNAME) $(OBJECTS:.o=.lo) -rpath $(LIBDIR) -version-info 1:0
lint :
lint -abchx $(SOURCES)
@@ -64,21 +65,25 @@
rm -f *.o *.a *.sh core a.out $(NAME) $(UNNAME)
install : $(NAME) $(UNNAME) $(LIBNAME)
- -cp $(NAME) $(EXECUTABLE)
- strip $(EXECUTABLE)
- -cp $(UNNAME) $(UNEXECUTABLE)
- strip $(UNEXECUTABLE)
- -cp $(NAME).1 $(MAN1DIR)
- rm -f $(MAN1DIR)/$(UNNAME).1
- -ln $(MAN1DIR)/$(NAME).1 $(MAN1DIR)/$(UNNAME).1
- -cp $(LIBNAME) $(LIBRARY)
- -cp $(NAME).3 $(MAN3DIR)
- rm -f $(MAN3DIR)/$(UNNAME).3
- -ln $(MAN3DIR)/$(NAME).3 $(MAN3DIR)/$(UNNAME).3
+ $(LIBTOOL) ${BSD_INSTALL_DATA} $(LIBNAME) $(LIBDIR)
+ $(LIBTOOL) ${BSD_INSTALL_PROGRAM} $(NAME) $(EXECUTABLE)
+ $(LIBTOOL) ${BSD_INSTALL_PROGRAM} $(UNNAME) $(UNEXECUTABLE)
+ ${BSD_INSTALL_MAN} $(NAME).1 $(MAN1DIR)
+ rm -f $(MAN1DIR)/$(UNNAME).1*
+ -ln -fs $(MAN1DIR)/$(NAME).1 $(MAN1DIR)/$(UNNAME).1
+ ${BSD_INSTALL_MAN} $(NAME).3 $(MAN3DIR)
+ rm -f $(MAN3DIR)/$(UNNAME).3*
+ -ln -fs $(MAN3DIR)/$(NAME).3 $(MAN3DIR)/$(UNNAME).3
+ ${BSD_INSTALL_DATA} compface.h $(INCDIR)
shar :
shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
compress $(NAME).sh
+
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) $(CC) $(CFLAGS) -c $<
arith.o: arith.c compface.h data.h
cmain.o: cmain.c compface.h data.h