openbsd-ports/mail/metamail/patches/patch-src_Makefile
jca 3d213be634 Remove the need for stty and gtty, using tcgetattr and tcsetattr.
Kill gets() calls while here.  Corrections from ajacoutot and naddy,
ok naddy.
2013-11-30 15:13:06 +00:00

67 lines
2.3 KiB
Plaintext

$OpenBSD: patch-src_Makefile,v 1.2 2013/11/30 15:13:06 jca Exp $
--- src/Makefile.orig Wed Jan 26 18:32:33 1994
+++ src/Makefile Fri Nov 29 23:29:41 2013
@@ -38,7 +38,7 @@ FOOBAR-sun4=-Bstatic
STATICFLAG=FOOBAR${HOST_ARCH}
-CFLAGS = -g -I. ${$(STATICFLAG)}
+CFLAGS += -I. ${$(STATICFLAG)}
# The following is better if you want to make sure you run with SYSV defined
# CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV
# Also, for SGI Irix, compile in K&R mode
@@ -72,10 +72,10 @@ CONFIGDIR = .
# install -s -c $(LOCALBINDIR) $$file
#
#INSTALL = cp
-INSTALL = install -c -s
+INSTALL = install -c
# Root of installation tree
-INSTROOT = /usr/local
+INSTROOT = ${PREFIX}
#
# This is where binaries should be copied
LOCALBINDIR = ${INSTROOT}/bin
@@ -91,14 +91,14 @@ MAN4EXT = 4
FONTSUFFIX=pcf
# This is where the mailcap file should be put
-MAILCAPDIR = ${INSTROOT}/etc
+MAILCAPDIR = ${INSTROOT}/lib/metamail
# This helps with the "for" constructs below on some platforms:
SHELL=/bin/sh
-install: basics
+install: install-all
-basics::
+all basics::
(cd metamail ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}")
-${RM} bin/metamail
(cd bin; ${LN} ../metamail/metamail metamail)
@@ -117,7 +117,7 @@ basics::
(cd bin; ${LN} ../richmail/richtext richtext)
-${RM} bin/richtoatk
(cd bin; ${LN} ../richmail/richtoatk richtoatk)
- (cd fonts ; $(MAKE) CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}")
+ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}")
-${RM} bin/shownonascii
(cd bin; ${LN} ../fonts/shownonascii shownonascii)
-${RM} bin/mailto-hebrew
@@ -145,10 +145,12 @@ install-all: basics
echo "installing man page $$target";\
${CP} $$file $$target; \
done)
+ @mkdir -p $(MAILCAPDIR)
@echo "Renaming old mailcap file to $(MAILCAPDIR)/mailcap.old
- -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old
+ @-mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old
@echo "installing file $(MAILCAPDIR)/mailcap"
${CP} mailcap $(MAILCAPDIR)
+ (cd fonts ; $(MAKE) PREFIX=${PREFIX} CONFIGDIR=../${CONFIGDIR} CFLAGS="${CFLAGS}" CC="${CC}" LDLIBS="${LDLIBS}" FONTSUFFIX="${FONTSUFFIX}" install)
uninstall-all:
@(cd bin; \