From c7c31366c7b1c93523149f3d0faa210b300addb9 Mon Sep 17 00:00:00 2001 From: John Marino Date: Mon, 28 Jul 2014 11:05:17 +0000 Subject: [PATCH] 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 --- print/mp-a4/Makefile | 1 - print/mp-letter/Makefile | 27 ++--- print/mp-letter/files/patch-Makefile.dist | 111 ++++++++++++++++++ print/mp-letter/files/patch-aa | 58 --------- print/mp-letter/files/patch-ae | 11 -- print/mp-letter/files/patch-header.cc | 12 ++ .../files/{patch-ab => patch-input.cc} | 18 ++- print/mp-letter/files/patch-main.cc | 12 ++ print/mp-letter/files/patch-print.cc | 48 ++++++++ print/mp-letter/files/patch-print.hh | 19 +++ print/mp-letter/pkg-plist | 9 ++ 11 files changed, 235 insertions(+), 91 deletions(-) create mode 100644 print/mp-letter/files/patch-Makefile.dist delete mode 100644 print/mp-letter/files/patch-aa delete mode 100644 print/mp-letter/files/patch-ae create mode 100644 print/mp-letter/files/patch-header.cc rename print/mp-letter/files/{patch-ab => patch-input.cc} (71%) create mode 100644 print/mp-letter/files/patch-main.cc create mode 100644 print/mp-letter/files/patch-print.cc create mode 100644 print/mp-letter/files/patch-print.hh diff --git a/print/mp-a4/Makefile b/print/mp-a4/Makefile index 5867a667bf9f..a65be8eaab47 100644 --- a/print/mp-a4/Makefile +++ b/print/mp-a4/Makefile @@ -4,5 +4,4 @@ PAPERSIZE= a4 MASTERDIR= ${.CURDIR}/../mp-letter -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/print/mp-letter/Makefile b/print/mp-letter/Makefile index 35f3acaa6d03..48f868c2cae7 100644 --- a/print/mp-letter/Makefile +++ b/print/mp-letter/Makefile @@ -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// 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 diff --git a/print/mp-letter/files/patch-Makefile.dist b/print/mp-letter/files/patch-Makefile.dist new file mode 100644 index 000000000000..f6298dd4d17c --- /dev/null +++ b/print/mp-letter/files/patch-Makefile.dist @@ -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 + diff --git a/print/mp-letter/files/patch-aa b/print/mp-letter/files/patch-aa deleted file mode 100644 index 7abc50789465..000000000000 --- a/print/mp-letter/files/patch-aa +++ /dev/null @@ -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 diff --git a/print/mp-letter/files/patch-ae b/print/mp-letter/files/patch-ae deleted file mode 100644 index ba5ca7c3a9f5..000000000000 --- a/print/mp-letter/files/patch-ae +++ /dev/null @@ -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. diff --git a/print/mp-letter/files/patch-header.cc b/print/mp-letter/files/patch-header.cc new file mode 100644 index 000000000000..dca9e176fbe3 --- /dev/null +++ b/print/mp-letter/files/patch-header.cc @@ -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 ++#include ++using namespace std; + #include + #include + #include diff --git a/print/mp-letter/files/patch-ab b/print/mp-letter/files/patch-input.cc similarity index 71% rename from print/mp-letter/files/patch-ab rename to print/mp-letter/files/patch-input.cc index 25b166ad26f5..4f9ece9ba58b 100644 --- a/print/mp-letter/files/patch-ab +++ b/print/mp-letter/files/patch-input.cc @@ -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 ++#include ++using namespace std; + #include + #include + #include +@@ -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 ; diff --git a/print/mp-letter/files/patch-main.cc b/print/mp-letter/files/patch-main.cc new file mode 100644 index 000000000000..56aaffc2417e --- /dev/null +++ b/print/mp-letter/files/patch-main.cc @@ -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 ++#include ++using namespace std; + #include + #include + #include diff --git a/print/mp-letter/files/patch-print.cc b/print/mp-letter/files/patch-print.cc new file mode 100644 index 000000000000..a8edc181e673 --- /dev/null +++ b/print/mp-letter/files/patch-print.cc @@ -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 ++#include ++using namespace std; + #include + #include + #include +@@ -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) + { diff --git a/print/mp-letter/files/patch-print.hh b/print/mp-letter/files/patch-print.hh new file mode 100644 index 000000000000..7c945a2d2aef --- /dev/null +++ b/print/mp-letter/files/patch-print.hh @@ -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) ; diff --git a/print/mp-letter/pkg-plist b/print/mp-letter/pkg-plist index 4c3ca52b165c..5ecc3ed1f6aa 100644 --- a/print/mp-letter/pkg-plist +++ b/print/mp-letter/pkg-plist @@ -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