From 26b6fd675b8acd56b45aa6ff763e3484aaf2941a Mon Sep 17 00:00:00 2001 From: Cheng-Lung Sung Date: Mon, 2 Jul 2007 07:54:40 +0000 Subject: [PATCH] - Update to 3.0 - buildable (and works) on amd64 [1] Added file(s): - files/patch-br.cpp: Workaround use of strndup PR: ports/113857 Submitted by: Nils Vogels Reviewed by: clsung [1] --- mail/mboxstats/Makefile | 5 +---- mail/mboxstats/distinfo | 6 +++--- mail/mboxstats/files/patch-br.cpp | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 mail/mboxstats/files/patch-br.cpp diff --git a/mail/mboxstats/Makefile b/mail/mboxstats/Makefile index b413900f4293..6b06e355dec6 100644 --- a/mail/mboxstats/Makefile +++ b/mail/mboxstats/Makefile @@ -7,7 +7,7 @@ # PORTNAME= mboxstats -PORTVERSION= 2.9 +PORTVERSION= 3.0 CATEGORIES= mail MASTER_SITES= http://vanheusden.com/mboxstats/ EXTRACT_SUFX= .tgz @@ -16,7 +16,6 @@ MAINTAINER= clsung@FreeBSD.org COMMENT= Creates top-10 lists of the messages in a mailbox PLIST_FILES= bin/mboxstats -ONLY_FOR_ARCHS= i386 alpha .include @@ -25,10 +24,8 @@ post-patch: @${REINPLACE_CMD} -e 's|PATH_MAX|FILENAME_MAX|g' ${WRKSRC}/main.cpp @${REINPLACE_CMD} -e 's|^CC=|CC?=|g' ${WRKSRC}/${MAKEFILE} @${REINPLACE_CMD} -e 's|^CPPFLAGS|CXXFLAGS|g' ${WRKSRC}/${MAKEFILE} -.if ${ARCH} == "i386" || ${ARCH} == "alpha" @${REINPLACE_CMD} -Ee 's,(stat|open)64,\1,g' ${WRKSRC}/main.cpp @${REINPLACE_CMD} -Ee 's,(stat|mmap|lseek|off)64,\1,g' ${WRKSRC}/br.h ${WRKSRC}/br.cpp -.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/mboxstats ${TARGETDIR}/bin diff --git a/mail/mboxstats/distinfo b/mail/mboxstats/distinfo index baab74e1023a..90c4d4e69347 100644 --- a/mail/mboxstats/distinfo +++ b/mail/mboxstats/distinfo @@ -1,3 +1,3 @@ -MD5 (mboxstats-2.9.tgz) = 527c73a6adaa90a1e928f65342fa8da4 -SHA256 (mboxstats-2.9.tgz) = 9d3843c5bb523f3dd335b559e4b95d20dc25da3cef866b538f5ff2806d9ce247 -SIZE (mboxstats-2.9.tgz) = 19293 +MD5 (mboxstats-3.0.tgz) = d6f222f036342f3502640e76f48c6a68 +SHA256 (mboxstats-3.0.tgz) = c3d3f83a84cddc08b825d7da9954c3c0a858bfad81c57479a4d36efa369f773e +SIZE (mboxstats-3.0.tgz) = 20075 diff --git a/mail/mboxstats/files/patch-br.cpp b/mail/mboxstats/files/patch-br.cpp new file mode 100644 index 000000000000..f89764bedf4e --- /dev/null +++ b/mail/mboxstats/files/patch-br.cpp @@ -0,0 +1,19 @@ +--- br.cpp.orig Tue Jun 19 17:54:16 2007 ++++ br.cpp Tue Jun 19 17:55:30 2007 +@@ -160,6 +160,16 @@ + return n_read; + } + ++char *strndup(char *in, int size) ++{ ++ char *out = (char *)malloc(size + 1); ++ ++ memcpy(out, in, size); ++ out[size] = 0x00; ++ ++ return out; ++} ++ + char * buffered_reader::read_line(void) + { + char *out = NULL;