stage print/mp-letter & print/mp-a4

Also update MASTER_SITES which have disappeared and moving it to
LOCAL/obrien.  Includes various cleanups like removal of DOS endings
in the makefile.

PR:		185989
Submitted by:	takefu (airport.fm)
Approved by:	maintainer timeout (6 months), staging blanket
This commit is contained in:
John Marino 2014-07-28 11:05:17 +00:00
parent 21cf2c681b
commit c7c31366c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363130
11 changed files with 235 additions and 91 deletions

View File

@ -4,5 +4,4 @@
PAPERSIZE= a4
MASTERDIR= ${.CURDIR}/../mp-letter
NO_STAGE= yes
.include "${MASTERDIR}/Makefile"

View File

@ -4,33 +4,26 @@
PORTNAME= mp-${PAPERSIZE}
PORTVERSION= 3.0.1
CATEGORIES= print
MASTER_SITES= ftp://relay.NUXI.org/pub/misc/ \
ftp://ftp.netsw.org/system/tools/print/ \
# ftp://ftp.fu-berlin.de/unix/tools/mp/
# ftp://ftp.inria.fr/system/user/
MASTER_SITES= LOCAL/obrien
DISTNAME= mp-3.0.1
MAINTAINER= ports@FreeBSD.org
COMMENT= A PostScript printing util for ASCII files, email, USENET news articles, etc
COMMENT= PostScript printing util for ASCII files
WRKSRC= ${WRKDIR}/mp
MAN1= mp.1
MLINKS= mp.1 digestp.1 - filep.1 - filofaxp.1 \
- franklinp.1 - mailp.1 - newsp.1 \
- timemanp.1 - timesysp.1
LINKS= digestp filep filofaxp franklinp mailp newsp timemanp timesysp
PAPERSIZE?= letter
.if ${PAPERSIZE:tl} == a4
INSTALL_TARGET= install-a4
.endif
NO_STAGE= yes
pre-patch:
@${CP} ${WRKSRC}/Makefile.dist ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's/<iostream\.h>/<iostream> using namespace std;/' \
-e 's/enum action_type/action_type/g' \
-e 's/enum text_type/text_type/g' \
${WRKSRC}/header.cc ${WRKSRC}/input.cc ${WRKSRC}/main.cc \
${WRKSRC}/print.cc ${WRKSRC}/print.hh
MAKEFILE= Makefile.dist
MAKE_ARGS= STAGEDIR=${STAGEDIR}
post-install:
.for a in ${LINKS}
${LN} -sf mp.1 ${STAGEDIR}${PREFIX}/man/man1/${a}.1
.endfor
.include <bsd.port.mk>

View File

@ -0,0 +1,111 @@
--- Makefile.dist.orig 1993-08-01 20:28:21.000000000 +0000
+++ Makefile.dist
@@ -45,11 +45,14 @@ PROLOGUE = -DPROLOGUE=\"$(MPLIBDIR)\"
# Default locations where mp files will be installed.
# You might wish to alter these values.
#
-MPPATH = /usr/local
+#MPPATH = /usr/local
+MPPATH = $(PREFIX)
MPBINDIR = $(MPPATH)/bin
-MPLIBDIR = $(MPPATH)/lib
+#MPLIBDIR = $(MPPATH)/lib
+MPLIBDIR = $(MPPATH)/share/mp
MPMANDIR = $(MPPATH)/man/man$(MPMANSECT)
-MPMANSECT = l
+#MPMANSECT = l
+MPMANSECT = 1
#---------------------------------------------------------------------
# Alternate names for the mailp frontend
#
@@ -58,11 +61,13 @@ MAILPNAMES = mailp newsp digestp filep f
# Compilation flags and standard macro definitions.
#
CDEFS = $(GECOSFIELDS) $(GECOSLENGTH) $(PROLOGUE)
-CCOMP = -O
+CXXFLAGS ?= $(CFLAGS)
+CCOMP := $(CXXFLAGS)
CCFLAGS = $(CCOMP) $(CDEFS)
LDFLAGS =
-CCC = g++
+CXXFLAGS = $(CCFLAGS) # needed for gmake's implicit rule
+CCC = $(CXX)
#=================================================================
.KEEPSTATE:
@@ -95,7 +100,7 @@ mp: $(OBJS) mp.man
SHELL = /bin/sh
install-a4: common-install
@echo " Adjusting for A4 paper"
- -@cd $(MPLIBDIR); \
+ @cd $(DESTDIR)$(MPLIBDIR); \
cp mp.common.ps /tmp/tmp-pro; \
sed < /tmp/tmp-pro > mp.common.ps \
-e 's|^/fullwidth 8.5 inch def|/fullwidth 595 def|' \
@@ -107,47 +112,19 @@ install: common-install
@echo "**IMPORTANT NOTE**"
@echo
@echo "Mp is setup by default to work with US Letter sized paper."
- @echo "If you are using A4 sized paper, you should reinstall, by
+ @echo "If you are using A4 sized paper, you should reinstall, by"
@echo "doing a:"
@echo
- @echo "make install-a4"
+ @echo "make PAPERSIZE=a4 reinstall"
@echo
common-install: $(BINARIES)
-# mp
- -cp mp $(MPBINDIR)
- -chmod 751 $(MPBINDIR)/mp
- -strip $(MPBINDIR)/mp
-# mp.1
- -cp mp.1 $(MPMANDIR)/mp.$(MPMANSECT)
- -chmod 644 $(MPMANDIR)/mp.$(MPMANSECT)
-# mp.common.ps
- -cp mp.common.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.common.ps
-# mp.pro.ps
- -cp mp.pro.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.ps
-# mp.pro.l.ps
- -cp mp.pro.l.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.l.ps
-# mp.pro.alt.ps
- -cp mp.pro.alt.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.alt.ps
-# mp.pro.altl.ps
- -cp mp.pro.altl.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.altl.ps
-# mp.pro.ff.ps
- -cp mp.pro.ff.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.ff.ps
-# mp.pro.fp.ps
- -cp mp.pro.fp.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.fp.ps
-# mp.pro.tm.ps
- -cp mp.pro.tm.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.tm.ps
-# mp.pro.ts.ps
- -cp mp.pro.ts.ps $(MPLIBDIR)
- -chmod 644 $(MPLIBDIR)/mp.pro.ts.ps
+ $(BSD_INSTALL_PROGRAM) mp $(DESTDIR)$(MPBINDIR)
+ $(BSD_INSTALL_MAN) mp.1 $(DESTDIR)$(MPMANDIR)/mp.$(MPMANSECT)
+ mkdir -p $(DESTDIR)$(MPLIBDIR)
+ $(BSD_INSTALL_DATA) mp.common.ps mp.pro.ps mp.pro.l.ps \
+ mp.pro.alt.ps mp.pro.altl.ps mp.pro.ff.ps \
+ mp.pro.fp.ps mp.pro.tm.ps mp.pro.ts.ps $(DESTDIR)$(MPLIBDIR)
#
# NOTE: If you don't want the mailp, newsp, filep ... symbolic links
# installed, then you should comment out the following seven lines.
@@ -155,8 +132,7 @@ common-install: $(BINARIES)
@echo Making mp links
-@for name in $(MAILPNAMES); do \
echo -n $$name " "; \
- rm -f $(MPBINDIR)/$$name; \
- ln -s $(MPBINDIR)/mp $(MPBINDIR)/$$name; \
+ ln -s mp $(DESTDIR)$(MPBINDIR)/$$name; \
done
@echo

View File

@ -1,58 +0,0 @@
--- Makefile.orig Wed Jul 29 21:42:13 1998
+++ Makefile Wed Jul 29 21:42:24 1998
@@ -45,11 +45,14 @@
# Default locations where mp files will be installed.
# You might wish to alter these values.
#
-MPPATH = /usr/local
+#MPPATH = /usr/local
+MPPATH = $(PREFIX)
MPBINDIR = $(MPPATH)/bin
-MPLIBDIR = $(MPPATH)/lib
+#MPLIBDIR = $(MPPATH)/lib
+MPLIBDIR = $(MPPATH)/share/mp
MPMANDIR = $(MPPATH)/man/man$(MPMANSECT)
-MPMANSECT = l
+#MPMANSECT = l
+MPMANSECT = 1
#---------------------------------------------------------------------
# Alternate names for the mailp frontend
#
@@ -58,11 +61,13 @@
# Compilation flags and standard macro definitions.
#
CDEFS = $(GECOSFIELDS) $(GECOSLENGTH) $(PROLOGUE)
-CCOMP = -O
+CXXFLAGS ?= $(CFLAGS)
+CCOMP := $(CXXFLAGS)
CCFLAGS = $(CCOMP) $(CDEFS)
LDFLAGS =
-CCC = g++
+CXXFLAGS = $(CCFLAGS) # needed for gmake's implicit rule
+CCC = $(CXX)
#=================================================================
.KEEPSTATE:
@@ -107,10 +112,10 @@
@echo "**IMPORTANT NOTE**"
@echo
@echo "Mp is setup by default to work with US Letter sized paper."
- @echo "If you are using A4 sized paper, you should reinstall, by
+ @echo "If you are using A4 sized paper, you should reinstall, by"
@echo "doing a:"
@echo
- @echo "make install-a4"
+ @echo "make PAPERSIZE=a4 reinstall"
@echo
common-install: $(BINARIES)
@@ -122,6 +127,8 @@
-cp mp.1 $(MPMANDIR)/mp.$(MPMANSECT)
-chmod 644 $(MPMANDIR)/mp.$(MPMANSECT)
# mp.common.ps
+ -mkdir $(MPLIBDIR)
+#
-cp mp.common.ps $(MPLIBDIR)
-chmod 644 $(MPLIBDIR)/mp.common.ps
# mp.pro.ps

View File

@ -1,11 +0,0 @@
--- print.cc.orig Sat Jun 19 18:04:15 1999
+++ print.cc Sat Jun 19 18:04:57 1999
@@ -33,7 +33,7 @@
{
char *ptr ; // Pointer to current time or date string.
int len ;
- long clock ; // Used by the localtime function call.
+ time_t clock ; // Used by the localtime function call.
struct stat status ; // Stat(2) information from current file (-modtime).
struct tm *tm ; // Used by the localtime and asctime calls.
char *timenow ; // Used to set TimeNow field with users name.

View File

@ -0,0 +1,12 @@
--- header.cc.orig 1993-08-02 05:28:21.000000000 +0900
+++ header.cc 2014-01-22 10:38:20.000000000 +0900
@@ -11,7 +11,8 @@
// to the comments or the code of this program, but if reported
// to me then an attempt will be made to fix them.
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

View File

@ -1,6 +1,16 @@
--- input.cc.orig Sun Aug 1 13:28:22 1993
+++ input.cc Sat Jan 29 17:59:31 2000
@@ -134,6 +134,8 @@
--- input.cc.orig 1993-08-02 05:28:22.000000000 +0900
+++ input.cc 2014-01-22 10:40:22.000000000 +0900
@@ -11,7 +11,8 @@
// to the comments or the code of this program, but if reported
// to me then an attempt will be made to fix them.
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -134,6 +135,8 @@
else if (!argcmp(argv[i], "-from", 4)) // Print originators name.
print_orig = 1 ;
@ -9,7 +19,7 @@
else if (!argcmp(argv[i], "-help", 2)) // Print usage message.
usage() ;
@@ -273,11 +275,11 @@
@@ -273,11 +276,11 @@
case DO_TEXT : prt.message_for = "Listing for ";
digest = 0 ;
break ;

View File

@ -0,0 +1,12 @@
--- main.cc.orig 1993-08-02 05:28:21.000000000 +0900
+++ main.cc 2014-01-22 10:40:54.000000000 +0900
@@ -14,7 +14,8 @@
// to the comments or the code of this program, but if reported
// to me then an attempt will be made to fix them.
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

View File

@ -0,0 +1,48 @@
--- print.cc.orig 1993-08-02 05:28:21.000000000 +0900
+++ print.cc 2014-01-22 10:39:29.000000000 +0900
@@ -11,7 +11,8 @@
// to the comments or the code of this program, but if reported
// to me then an attempt will be made to fix them.
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -33,7 +34,7 @@
{
char *ptr ; // Pointer to current time or date string.
int len ;
- long clock ; // Used by the localtime function call.
+ time_t clock ; // Used by the localtime function call.
struct stat status ; // Stat(2) information from current file (-modtime).
struct tm *tm ; // Used by the localtime and asctime calls.
char *timenow ; // Used to set TimeNow field with users name.
@@ -68,7 +69,7 @@
void
-Print::end(enum action_type op)
+Print::end(action_type op)
{
int pval ;
@@ -316,7 +317,7 @@
void
-Print::show_text(enum text_type op, char *hdr, char *str)
+Print::show_text(text_type op, char *hdr, char *str)
{
static char *fontstr[MAXTTYPES] = {
"BoldFont ", // T_BOLD.
@@ -355,7 +356,7 @@
void
-Print::start(enum action_type op)
+Print::start(action_type op)
{
switch (op)
{

View File

@ -0,0 +1,19 @@
--- print.hh.orig 1993-08-02 05:28:22.000000000 +0900
+++ print.hh 2014-01-22 09:51:43.000000000 +0900
@@ -43,13 +43,13 @@
FILE *ofp ; // Output file pointer (stdout or print cmd).
Print () ;
- void end (enum action_type) ;
+ void end (action_type) ;
FILE *makecmd (char *) ;
void print_extra (void) ;
void show_prologue (char *) ;
- void show_text (enum text_type, char *, char *) ;
+ void show_text (text_type, char *, char *) ;
void show_trailer (void) ;
- void start (enum action_type) ;
+ void start (action_type) ;
private:
void do_date (void) ;

View File

@ -7,6 +7,15 @@ bin/mp
bin/newsp
bin/timemanp
bin/timesysp
man/man1/mp.1.gz
man/man1/digestp.1.gz
man/man1/filep.1.gz
man/man1/filofaxp.1.gz
man/man1/franklinp.1.gz
man/man1/mailp.1.gz
man/man1/newsp.1.gz
man/man1/timemanp.1.gz
man/man1/timesysp.1.gz
share/mp/mp.common.ps
share/mp/mp.pro.alt.ps
share/mp/mp.pro.altl.ps