From aeac6741d93da2f957e94c0d0a238b3813e9ef4e Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 9 Jul 2010 07:17:37 +0000 Subject: [PATCH] cleanup; mostly from Brad. - Cleans up the Makefile a bit of stuff that isn't necessary. - Add missing headers to get rid of implicit function warnings. - Renames conflicting MSGBUFSIZE define to POPMSGBUFSIZE. - Sync PLIST. - Remove stray space in DESCR. - Bump PKGNAME. --- mail/popclient/Makefile | 16 +++------- mail/popclient/patches/patch-Makefile_in | 37 ++++++++++++++++++++---- mail/popclient/patches/patch-getpass_c | 11 +++++++ mail/popclient/patches/patch-pop2_c | 26 +++++++++++++++-- mail/popclient/patches/patch-pop3_c | 35 ++++++++++++++++++---- mail/popclient/patches/patch-popclient_h | 12 ++++++++ mail/popclient/patches/patch-poprc_l_l | 11 +++++++ mail/popclient/patches/patch-socket_h | 8 ++--- mail/popclient/patches/patch-xmalloc_c | 11 +++++++ mail/popclient/pkg/DESCR | 2 +- mail/popclient/pkg/PLIST | 4 +-- 11 files changed, 141 insertions(+), 32 deletions(-) create mode 100644 mail/popclient/patches/patch-getpass_c create mode 100644 mail/popclient/patches/patch-popclient_h create mode 100644 mail/popclient/patches/patch-poprc_l_l create mode 100644 mail/popclient/patches/patch-xmalloc_c diff --git a/mail/popclient/Makefile b/mail/popclient/Makefile index c934f31f28a..91bbc6c76d7 100644 --- a/mail/popclient/Makefile +++ b/mail/popclient/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.19 2007/09/16 00:17:06 merdely Exp $ +# $OpenBSD: Makefile,v 1.20 2010/07/09 07:17:37 sthen Exp $ -COMMENT= client for pop2, pop3, apop, rpop +COMMENT= client for POP2, POP3, APOP, RPOP DISTNAME= popclient-3.0b6 -PKGNAME= ${DISTNAME}p0 +PKGNAME= ${DISTNAME}p1 CATEGORIES= mail MASTER_SITES= http://people.freebsd.org/~wosch/src/ @@ -13,14 +13,6 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes WANTLIB= c -CONFIGURE_STYLE=gnu dest old -CONFIGURE_ARGS= i386-unknown-freebsd2.1.0 - -ALL_TARGET= - -WRKDIST= ${WRKDIR}/popclient-3.0b6 - -pre-install: - @cp ${WRKSRC}/popclient.man ${WRKSRC}/popclient.1 +CONFIGURE_STYLE= gnu old .include diff --git a/mail/popclient/patches/patch-Makefile_in b/mail/popclient/patches/patch-Makefile_in index a24b7bcd24d..8de9a265adc 100644 --- a/mail/popclient/patches/patch-Makefile_in +++ b/mail/popclient/patches/patch-Makefile_in @@ -1,6 +1,6 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2000/06/05 00:31:33 espie Exp $ ---- Makefile.in.orig Wed Nov 22 14:08:22 1995 -+++ Makefile.in Mon Jun 5 02:17:51 2000 +$OpenBSD: patch-Makefile_in,v 1.2 2010/07/09 07:17:37 sthen Exp $ +--- Makefile.in.orig Wed Nov 22 08:08:22 1995 ++++ Makefile.in Thu Jul 8 21:50:46 2010 @@ -62,7 +62,7 @@ EXTRASRC = @EXTRASRC@ EXTRAOBJ = @EXTRAOBJ@ @@ -10,12 +10,39 @@ $OpenBSD: patch-Makefile_in,v 1.1 2000/06/05 00:31:33 espie Exp $ # Common prefix for machine-dependent installed files. exec_prefix = $(prefix) -@@ -187,7 +187,7 @@ $(infodir)/popclient.info: popclient.inf +@@ -169,17 +169,18 @@ install: installdirs \ + $(mandir)/$(instname).$(manext) + + installdirs: +- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir) ++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \ ++ $(DESTDIR)$(mandir) + + $(bindir)/$(instname): popclient +- $(INSTALL_PROGRAM) popclient $@ ++ $(INSTALL_PROGRAM) popclient $(DESTDIR)$@ + + $(infodir)/popclient.info: popclient.info + if [ -r ./popclient.info ]; then dir=.; else dir=$(srcdir); fi; \ + for file in $${dir}/popclient.info*; do \ + name="`basename $$file`"; \ + $(INSTALL_DATA) $$file \ +- `echo $@ | sed "s,popclient.info\$$,$$name,"`; \ ++ `echo $(DESTDIR)$@ | sed "s,popclient.info\$$,$$name,"`; \ + done + # Run install-info only if it exists. + # Use `if' instead of just prepending `-' to the +@@ -187,11 +188,11 @@ $(infodir)/popclient.info: popclient.info # We use `$(SHELL) -c' because some shells do not # fail gracefully when there is an unknown command. if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --infodir=$(infodir) $$dir/popclient.info; \ -+ install-info $(infodir)/popclient.info $(infodir)/dir; \ ++ cd $(DESTDIR)$(infodir) && install-info popclient.info dir; \ else true; fi $(mandir)/$(instname).$(manext): popclient.man +- $(INSTALL_DATA) $(srcdir)/popclient.man $@ ++ $(INSTALL_DATA) $(srcdir)/popclient.man $(DESTDIR)$@ + + + .PHONY: clean realclean distclean mostlyclean diff --git a/mail/popclient/patches/patch-getpass_c b/mail/popclient/patches/patch-getpass_c new file mode 100644 index 00000000000..410c092a934 --- /dev/null +++ b/mail/popclient/patches/patch-getpass_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-getpass_c,v 1.1 2010/07/09 07:17:37 sthen Exp $ +--- getpass.c.orig Thu Jul 8 21:23:30 2010 ++++ getpass.c Thu Jul 8 21:24:51 2010 +@@ -46,6 +46,7 @@ + + #if defined(STDC_HEADERS) + #include ++#include + #endif + + #include diff --git a/mail/popclient/patches/patch-pop2_c b/mail/popclient/patches/patch-pop2_c index 9eb509e4111..02a469ba8be 100644 --- a/mail/popclient/patches/patch-pop2_c +++ b/mail/popclient/patches/patch-pop2_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-pop2_c,v 1.1 2000/06/05 00:31:34 espie Exp $ ---- pop2.c.orig Tue Sep 12 01:10:44 1995 -+++ pop2.c Mon Jun 5 02:15:41 2000 +$OpenBSD: patch-pop2_c,v 1.2 2010/07/09 07:17:37 sthen Exp $ +--- pop2.c.orig Mon Sep 11 19:10:44 1995 ++++ pop2.c Thu Jul 8 21:33:35 2010 @@ -67,6 +67,7 @@ #include @@ -21,3 +21,23 @@ $OpenBSD: patch-pop2_c,v 1.1 2000/06/05 00:31:34 espie Exp $ return(PS_SOCKET); } +@@ -496,8 +500,8 @@ int mboxfd; + int topipe; + { + int i,buflen,actsize; +- char buf [MSGBUFSIZE]; +- char frombuf [MSGBUFSIZE]; ++ char buf [POPMSGBUFSIZE]; ++ char frombuf [POPMSGBUFSIZE]; + char savec; + int msgTop; + int needFrom; +@@ -524,7 +528,7 @@ int topipe; + actsize = 0; + msgTop = !0; + while (msgsize > 0) { +- buflen = msgsize <= MSGBUFSIZE ? msgsize : MSGBUFSIZE; ++ buflen = msgsize <= POPMSGBUFSIZE ? msgsize : POPMSGBUFSIZE; + /* read a bufferful */ + if (SockRead(socket, buf, buflen) == 0) { + diff --git a/mail/popclient/patches/patch-pop3_c b/mail/popclient/patches/patch-pop3_c index c8e6b3e8699..415d2ab1015 100644 --- a/mail/popclient/patches/patch-pop3_c +++ b/mail/popclient/patches/patch-pop3_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-pop3_c,v 1.2 2004/08/07 18:18:20 naddy Exp $ ---- pop3.c.orig Tue Sep 12 01:48:48 1995 -+++ pop3.c Sat Aug 7 18:33:26 2004 +$OpenBSD: patch-pop3_c,v 1.3 2010/07/09 07:17:37 sthen Exp $ +--- pop3.c.orig Mon Sep 11 19:48:48 1995 ++++ pop3.c Thu Jul 8 21:33:54 2010 @@ -67,6 +67,7 @@ #include @@ -21,12 +21,37 @@ $OpenBSD: patch-pop3_c,v 1.2 2004/08/07 18:18:20 naddy Exp $ return(PS_SOCKET); } -@@ -609,7 +613,7 @@ int topipe; +@@ -583,10 +587,10 @@ int socket; + int mboxfd; + int topipe; + { +- char buf [MSGBUFSIZE]; ++ char buf [POPMSGBUFSIZE]; + char *bufp; + char savec; +- char fromBuf[MSGBUFSIZE]; ++ char fromBuf[POPMSGBUFSIZE]; + int needFrom; + int lines,sizeticker; + time_t now; +@@ -607,9 +611,9 @@ int topipe; + + /* read the message content from the server */ lines = 0; - sizeticker = MSGBUFSIZE; +- sizeticker = MSGBUFSIZE; ++ sizeticker = POPMSGBUFSIZE; while (1) { - if (SockGets(socket,buf,sizeof(buf)) < 0) + if (SockGets(socket,buf,sizeof(buf)-1) < 0) return(PS_SOCKET); bufp = buf; if (*bufp == '.') { +@@ -653,7 +657,7 @@ int topipe; + if (sizeticker <= 0) { + if (outlevel > O_SILENT && outlevel < O_VERBOSE && mboxfd != 1) + fputc('.',stderr); +- sizeticker = MSGBUFSIZE; ++ sizeticker = POPMSGBUFSIZE; + } + lines++; + } diff --git a/mail/popclient/patches/patch-popclient_h b/mail/popclient/patches/patch-popclient_h new file mode 100644 index 00000000000..f3cf5baeb6e --- /dev/null +++ b/mail/popclient/patches/patch-popclient_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-popclient_h,v 1.1 2010/07/09 07:17:37 sthen Exp $ +--- popclient.h.orig Thu Jul 8 21:32:47 2010 ++++ popclient.h Thu Jul 8 21:33:09 2010 +@@ -62,7 +62,7 @@ + + /* definitions for buffer sizes -- somewhat arbitrary */ + #define POPBUFSIZE 512 /* per RFC 937 */ +-#define MSGBUFSIZE 1024 /* size of message read buffer */ ++#define POPMSGBUFSIZE 1024 /* size of message read buffer */ + #define HOSTLEN 128 /* max hostname length */ + #define USERIDLEN 32 /* max user-length */ + #define PASSWORDLEN MAX_PASSWORD_LENGTH diff --git a/mail/popclient/patches/patch-poprc_l_l b/mail/popclient/patches/patch-poprc_l_l new file mode 100644 index 00000000000..d2b4e8ee2cf --- /dev/null +++ b/mail/popclient/patches/patch-poprc_l_l @@ -0,0 +1,11 @@ +$OpenBSD: patch-poprc_l_l,v 1.1 2010/07/09 07:17:37 sthen Exp $ +--- poprc_l.l.orig Thu Jul 8 22:03:47 2010 ++++ poprc_l.l Thu Jul 8 22:05:25 2010 +@@ -53,6 +53,7 @@ + + ***********************************************************************/ + ++#include + #include + #include "poproto.h" + #include "poprc_y.h" diff --git a/mail/popclient/patches/patch-socket_h b/mail/popclient/patches/patch-socket_h index 83b9f32f9ad..383e8b730f6 100644 --- a/mail/popclient/patches/patch-socket_h +++ b/mail/popclient/patches/patch-socket_h @@ -1,7 +1,7 @@ -$OpenBSD: patch-socket_h,v 1.1 2004/01/05 00:08:35 espie Exp $ ---- socket.h.orig 2004-01-05 01:05:36.000000000 +0100 -+++ socket.h 2004-01-05 01:06:02.000000000 +0100 -@@ -80,7 +80,7 @@ Send formatted output to the socket, fol +$OpenBSD: patch-socket_h,v 1.2 2010/07/09 07:17:37 sthen Exp $ +--- socket.h.orig Mon Aug 7 21:01:39 1995 ++++ socket.h Thu Jul 8 21:22:03 2010 +@@ -80,7 +80,7 @@ Send formatted output to the socket, followed by a CR-LF. Returns 0 for success. */ diff --git a/mail/popclient/patches/patch-xmalloc_c b/mail/popclient/patches/patch-xmalloc_c new file mode 100644 index 00000000000..f92482541d2 --- /dev/null +++ b/mail/popclient/patches/patch-xmalloc_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-xmalloc_c,v 1.1 2010/07/09 07:17:37 sthen Exp $ +--- xmalloc.c.orig Thu Jul 8 21:29:48 2010 ++++ xmalloc.c Thu Jul 8 21:30:38 2010 +@@ -36,6 +36,7 @@ + + #include + #include ++#include + #include + #include "popclient.h" + diff --git a/mail/popclient/pkg/DESCR b/mail/popclient/pkg/DESCR index 45984893b2d..bc9b23836c8 100644 --- a/mail/popclient/pkg/DESCR +++ b/mail/popclient/pkg/DESCR @@ -1,2 +1,2 @@ -POPCLIENT is a POP2, POP3, APOP, RPOP mail client for retrieving mail from a +POPCLIENT is a POP2, POP3, APOP, RPOP mail client for retrieving mail from a POP server. diff --git a/mail/popclient/pkg/PLIST b/mail/popclient/pkg/PLIST index caa9d3b6267..fcbf80b687b 100644 --- a/mail/popclient/pkg/PLIST +++ b/mail/popclient/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.4 2004/09/15 09:09:44 espie Exp $ -bin/popclient +@comment $OpenBSD: PLIST,v 1.5 2010/07/09 07:17:37 sthen Exp $ +@bin bin/popclient @info info/popclient.info @man man/man1/popclient.1