From nobody Mon Feb 27 22:49:43 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PQbKh20Vdz3tGtD; Mon, 27 Feb 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQbKh1Wj0z3r71; Mon, 27 Feb 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ey5qOqg4Rc5YPiTdRlc/jVZE/Wepo+aLxehLbGKj2y0=; b=MPrDFeMvkgH0gkDya5t0iWjaeSoZUfpKyz/2vOMW8VoVRQFbSlD6bCzWJYWTS2BS3k5SDP wzD5iR+aYAIuBc4wzBHF+xGXWKfHZ5NOKtr9zJMZAQD8aKIRO2VKVBDxAgDkwp1FQrEBlw GDX3k0u87Vni/jkAAjMqEwj6kGxR0fK6c6kiIJiXpaRr+etRyzAjE113dwUkuhjmtfMqit lS9x5xQItx4wRfRdWr7+rsdjGioBjtDNRIlzwzDQDxJ/nnBnSfjNphbM4+3hxqGSpkCOkk ulKpSkB8hss8TV/d+lqegG++lAhGPfEX7zDEjQWIjPcSipn+P53lFc/6f53SfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ey5qOqg4Rc5YPiTdRlc/jVZE/Wepo+aLxehLbGKj2y0=; b=iPLv0X5iMB75in1qRMtHrTooo2psgd1/HnFcM/VymHMRsWuPQqv9sNR2f8/bKPa4zfN+gP HO6ZnbBf3O8QatN72H/B1PlyrLKWIcoCS2RecuJbz3pWu2mikOQUiuRkHBh6gPt8Lqgt1t czPVnEkJtoNE3wSZBL9B1bWuGMov5b7iCkFpuXoRJ74U57pdcSBI4ZgfBosG1xmoHgxbSU 4SPXAqz2VZCF6LLfVjSrDYxPniThaJCr+5WyLJFDd4nvNFbgAsdKKSEtfQfExvShKoH3v6 JyxEEPM6mRfdbN8oYJYH04eg0st7brY8pjOxee0pKkTkLGT6n1wPiEi4QPdKTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677538184; a=rsa-sha256; cv=none; b=Yi4uTQmofeBKdW5t25WYMNgDpnRSHgKBSUZDHUnh4W9yEQRt0lrkBUEyrAFjFDICIcbTlp WzfO2eNDbQYSbfNKnwMbvrTIQ8WQDOnFSYJx5MBN4cnvGGVY7KFfbRVqrnIe/wTIt9ZuBy AZ0+Zkd+H5NRKHByRWF8NBVpllgQF0Fsp5c0urR16ItsDhnlVdlgCboMo5802BtHHkLzvm /zBqYUQahwXDXYrFa2Aqs5+Sb24X/SW3kzttoVpaKSXUGk9Vx+ty+krDDTF/xA5dwPNnlt CH5eWI524NaRf4hv0e8ejxzHPvaWI34mRVJTm116kp8E40wFVgqGTltWZi/0Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PQbKh0Svvzjcr; Mon, 27 Feb 2023 22:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31RMnhxW078273; Mon, 27 Feb 2023 22:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31RMnhIO078272; Mon, 27 Feb 2023 22:49:43 GMT (envelope-from git) Date: Mon, 27 Feb 2023 22:49:43 GMT Message-Id: <202302272249.31RMnhIO078272@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: f74f218fb096 - main - mail/mboxgrep: update to 0.7.10 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f74f218fb09698b02c83148a996e4c764ab2821e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=f74f218fb09698b02c83148a996e4c764ab2821e commit f74f218fb09698b02c83148a996e4c764ab2821e Author: Robert Clausecker AuthorDate: 2023-02-24 23:17:07 +0000 Commit: Robert Clausecker CommitDate: 2023-02-27 22:48:55 +0000 mail/mboxgrep: update to 0.7.10 - switch to upstream's new hoster - remove lots of old hacks and patches - remove hacked in OpenSSL dependency - patch makefiles to enable staging - adopt this unmaintained port Changelog: https://git.datatipp.se/dspiljar/mboxgrep/releases/tag/0.7.10 Approved by: flo (mentor) Differential Revision: https://reviews.freebsd.org/D38782 --- mail/mboxgrep/Makefile | 38 +++------- mail/mboxgrep/distinfo | 5 +- mail/mboxgrep/files/patch-doc_Makefile.in | 16 ++++ mail/mboxgrep/files/patch-src_Makefile.in | 22 +++--- mail/mboxgrep/files/patch-src_main.c | 23 ------ mail/mboxgrep/files/patch-src_mboxgrep.h | 35 --------- mail/mboxgrep/files/patch-src_md5.c | 37 +++++++++ mail/mboxgrep/files/patch-src_scan.c | 122 ------------------------------ mail/mboxgrep/files/patch-src_scan.h | 13 ---- 9 files changed, 76 insertions(+), 235 deletions(-) diff --git a/mail/mboxgrep/Makefile b/mail/mboxgrep/Makefile index 7a6fd40cfb19..505990f6d119 100644 --- a/mail/mboxgrep/Makefile +++ b/mail/mboxgrep/Makefile @@ -1,42 +1,26 @@ PORTNAME= mboxgrep -PORTVERSION= 0.7.9 -PORTREVISION= 5 +DISTVERSION= 0.7.10 CATEGORIES= mail -MASTER_SITES= SF +MASTER_SITES= https://git.datatipp.se/dspiljar/mboxgrep/archive/ +DISTNAME= ${DISTVERSION} +DIST_SUBDIR= ${PORTNAME} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= fuz@FreeBSD.org COMMENT= Utility to scan mailboxes for messages matching a regular expression WWW= http://mboxgrep.sourceforge.net/ LICENSE= GPLv2+ -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE_FILE= ${WRKSRC}/COPYING.md -USES= localbase ssl +USES= autoreconf localbase GNU_CONFIGURE= yes - -CFLAGS+= -I${OPENSSLINC} -LIBS+= -L${OPENSSLLIB} +WRKSRC= ${WRKDIR}/mboxgrep INFO= mboxgrep +PLIST_FILES= bin/mboxgrep man/man1/mboxgrep.1.gz -PORTDOCS= ChangeLog NEWS README TODO -PLIST_FILES= bin/mboxgrep \ - man/man1/mboxgrep.1.gz - -OPTIONS_DEFINE= DOCS PCRE - +OPTIONS_DEFINE= PCRE PCRE_LIB_DEPENDS= libpcre.so:devel/pcre - -pre-configure: - @${REINPLACE_CMD} -e 's,void \*tmpp,FILE \*tmpp,g' ${WRKSRC}/src/main.c - @${REINPLACE_CMD} -e 's,$$(mandir),$$(DESTDIR)$$(mandir),g' \ - -e 's,$$(infodir),$$(DESTDIR)$$(infodir),g' \ - ${WRKSRC}/src/Makefile.in ${WRKSRC}/doc/Makefile.in - -post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for f in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ -.endfor +PCRE_CONFIGURE_WITH= PCRE .include diff --git a/mail/mboxgrep/distinfo b/mail/mboxgrep/distinfo index f9b337791bb0..23d1f94d90b8 100644 --- a/mail/mboxgrep/distinfo +++ b/mail/mboxgrep/distinfo @@ -1,2 +1,3 @@ -SHA256 (mboxgrep-0.7.9.tar.gz) = 78d375a05c3520fad4bca88509d4da0dbe9fba31f36790bd20880e212acd99d7 -SIZE (mboxgrep-0.7.9.tar.gz) = 76067 +TIMESTAMP = 1677278119 +SHA256 (mboxgrep/0.7.10.tar.gz) = 396c1bae89540977abb23890bd9cdf68aa8048f68cf1abc061614fa9a0c465dc +SIZE (mboxgrep/0.7.10.tar.gz) = 76132 diff --git a/mail/mboxgrep/files/patch-doc_Makefile.in b/mail/mboxgrep/files/patch-doc_Makefile.in new file mode 100644 index 000000000000..b29f4a1679de --- /dev/null +++ b/mail/mboxgrep/files/patch-doc_Makefile.in @@ -0,0 +1,16 @@ +--- doc/Makefile.in.orig 2023-02-24 22:54:40 UTC ++++ doc/Makefile.in +@@ -33,9 +33,9 @@ distclean: + + .PHONY: install + install: mboxgrep.1 +- $(INSTALL) -d $(mandir)/man1 +- $(INSTALL) -m 0644 $(MANPAGE) $(mandir)/man1 +- $(INSTALL) -d $(infodir) +- $(INSTALL) -m 0644 mboxgrep.info $(infodir) ++ $(INSTALL) -d $(DESTDIR)/$(mandir)/man1 ++ $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)/$(mandir)/man1 ++ $(INSTALL) -d $(DESTDIR)/$(infodir) ++ $(INSTALL) -m 0644 mboxgrep.info $(DESTDIR)/$(infodir) + + .NOEXPORT: diff --git a/mail/mboxgrep/files/patch-src_Makefile.in b/mail/mboxgrep/files/patch-src_Makefile.in index 0e71264bbe1e..f3561f5a467d 100644 --- a/mail/mboxgrep/files/patch-src_Makefile.in +++ b/mail/mboxgrep/files/patch-src_Makefile.in @@ -1,28 +1,24 @@ ---- src/Makefile.in.orig 2003-03-30 23:07:10 UTC +--- src/Makefile.in.orig 2023-02-23 11:59:33 UTC +++ src/Makefile.in -@@ -21,12 +21,12 @@ srcdir = @srcdir@ +@@ -21,9 +21,9 @@ srcdir = @srcdir@ CC = @CC@ OBJS = info.o main.o mh.o scan.o maildir.o mbox.o misc.o \ -- wrap.o getopt.o getopt1.o md5.o -+ wrap.o +- wrap.o getopt.o getopt1.o md5.o re.o ++ wrap.o md5.o re.o SRCS = info.c main.c mh.c scan.c maildir.c mbox.c misc.c \ -- wrap.c getopt.c getopt1.c md5.c -+ wrap.c +- wrap.c getopt.c getopt1.c md5.c re.c ++ wrap.c md5.c re.c TARGET = mboxgrep CFLAGS = @CFLAGS@ --LIBS = @LIBS@ -+LIBS = @LIBS@ -lcrypto - INSTALL = @INSTALL@ - prefix = @prefix@ - SHELL = /bin/sh + LIBS = @LIBS@ @@ -51,7 +51,7 @@ distclean: .PHONY: install install: mboxgrep - $(INSTALL) -d $(prefix)/bin - $(INSTALL) -s $(TARGET) $(prefix)/bin -+ $(INSTALL) -d $(DESTDIR)$(prefix)/bin -+ $(INSTALL) -s $(TARGET) $(DESTDIR)$(prefix)/bin ++ $(INSTALL) -d $(DESTDIR)/$(prefix)/bin ++ $(INSTALL) -s $(TARGET) $(DESTDIR)/$(prefix)/bin .NOEXPORT: diff --git a/mail/mboxgrep/files/patch-src_main.c b/mail/mboxgrep/files/patch-src_main.c deleted file mode 100644 index e5a42981f622..000000000000 --- a/mail/mboxgrep/files/patch-src_main.c +++ /dev/null @@ -1,23 +0,0 @@ ---- src/main.c.orig 2003-08-24 19:23:50 UTC -+++ src/main.c -@@ -55,8 +55,9 @@ pcre_extra *hints; - char *boxname, *outboxname, *pipecmd, *tmpfilename; - int maildir_count = 0; - int count = 0; --void *tmpp; -+FILE *tmpp; - checksum_t *cs; -+option_t config; - - int - main (int argc, char **argv) -@@ -238,8 +239,7 @@ main (int argc, char **argv) - config.pid = (int) getpid (); - } - -- cs = (checksum_t *) xmalloc (sizeof (checksum_t)); -- cs->md5 = (char **) xcalloc (1, sizeof (char **)); -+ cs = xmalloc (sizeof (checksum_t)); - cs->n = 0; - - if (optind < argc && ! haveregex) diff --git a/mail/mboxgrep/files/patch-src_mboxgrep.h b/mail/mboxgrep/files/patch-src_mboxgrep.h deleted file mode 100644 index 3552201d7072..000000000000 --- a/mail/mboxgrep/files/patch-src_mboxgrep.h +++ /dev/null @@ -1,35 +0,0 @@ ---- src/mboxgrep.h.orig 2003-04-06 21:01:49 UTC -+++ src/mboxgrep.h -@@ -28,6 +28,7 @@ - #define HOST_NAME_SIZE 256 - - #include -+#include - - #include /* for tm structure */ - -@@ -99,10 +100,15 @@ typedef struct - } - folder_t; - -+typedef union { -+ uint64_t halves[2]; -+ unsigned char bytes[16]; -+} md5_t; -+ - typedef struct - { -- char **md5; - int n; -+ md5_t md5s[]; - } - checksum_t; - -@@ -129,6 +135,6 @@ typedef struct - } - option_t; - --option_t config; -+extern option_t config; - - #endif /* MBOXGREP_H */ diff --git a/mail/mboxgrep/files/patch-src_md5.c b/mail/mboxgrep/files/patch-src_md5.c new file mode 100644 index 000000000000..7364a508cbaa --- /dev/null +++ b/mail/mboxgrep/files/patch-src_md5.c @@ -0,0 +1,37 @@ +--- src/md5.c.orig 2023-02-24 22:59:50 UTC ++++ src/md5.c +@@ -26,32 +26,15 @@ + + #include + +-#if STDC_HEADERS || defined _LIBC + # include + # include +-#else +-# ifndef HAVE_MEMCPY +-# define memcpy(d, s, n) bcopy ((s), (d), (n)) +-# endif +-#endif + + #include "md5.h" + +-#ifdef _LIBC +-# include +-# if __BYTE_ORDER == __BIG_ENDIAN ++#include ++# if _BYTE_ORDER == _BIG_ENDIAN + # define WORDS_BIGENDIAN 1 + # endif +-/* We need to keep the namespace clean so define the MD5 function +- protected using leading __ . */ +-# define md5_init_ctx __md5_init_ctx +-# define md5_process_block __md5_process_block +-# define md5_process_bytes __md5_process_bytes +-# define md5_finish_ctx __md5_finish_ctx +-# define md5_read_ctx __md5_read_ctx +-# define md5_stream __md5_stream +-# define md5_buffer __md5_buffer +-#endif + + #ifdef WORDS_BIGENDIAN + # define SWAP(n) \ diff --git a/mail/mboxgrep/files/patch-src_scan.c b/mail/mboxgrep/files/patch-src_scan.c deleted file mode 100644 index 2584f0c4408a..000000000000 --- a/mail/mboxgrep/files/patch-src_scan.c +++ /dev/null @@ -1,122 +0,0 @@ ---- src/scan.c.orig 2003-04-06 21:01:49 UTC -+++ src/scan.c -@@ -59,7 +59,7 @@ - #include "mh.h" - #include "maildir.h" - #include "wrap.h" --#include "md5.h" -+#include - #ifdef HAVE_FTS_OPEN - # include - # include -@@ -73,7 +73,10 @@ - #include - #endif /* HAVE_LIBDMALLOC */ - --void scan_mailbox (char path[]) -+static int md5_check_message (const char *body, size_t bbytes); -+ -+void -+scan_mailbox (const char path[]) - /* {{{ */ - { - static FILE *outf; -@@ -95,7 +98,6 @@ void scan_mailbox (char path[]) - int isdup = 0; - time_t tt; - struct tm *ct; -- extern checksum_t *cs; - - extern option_t config; - -@@ -144,12 +146,12 @@ void scan_mailbox (char path[]) - - if ((config.format == MBOX) || (config.format == ZMBOX) || - (config.format == BZ2MBOX)) -- msg = (message_t *) mbox_read_message (mbox); -+ msg = mbox_read_message (mbox); - else if ((config.format == MH) || (config.format == NNMH) || - (config.format == NNML)) -- msg = (message_t *) mh_read_message (boxd); -+ msg = mh_read_message (boxd); - else if (config.format == MAILDIR) -- msg = (message_t *) maildir_read_message (maildird); -+ msg = maildir_read_message (maildird); - - if (msg == NULL) break; - -@@ -178,7 +180,7 @@ void scan_mailbox (char path[]) - } - - if (config.dedup) -- isdup = md5_check_message (msg->body, cs); -+ isdup = md5_check_message (msg->body, msg->bbytes); - - if (((res1 == 0) | (res2 == 0)) ^ ((config.invert ^ delete)) && - ((config.dedup && !isdup) || !config.dedup)) -@@ -281,7 +283,8 @@ void scan_mailbox (char path[]) - } - /* }}} */ - --void recursive_scan (char path[]) -+void -+recursive_scan (const char path[]) - /* {{{ */ - - { -@@ -312,37 +315,41 @@ void recursive_scan (char path[]) - fts_close (ftsfoo); - } - #else -- ftw (path, (void *) scan_mailbox, 1); -+ ftw (path, (int (*)(const char *, const struct *, int))scan_mailbox, 1); - #endif /* HAVE_FTS_OPEN */ - } - - /* }}} */ - --int md5_check_message (char *body, checksum_t *chksum) -+static int -+md5_check_message (const char *body, size_t bbytes) - /* {{{ */ - { -- struct md5_ctx a; -- unsigned char b[16]; -+ MD5_CTX a; -+ md5_t b; - int i; -+ extern checksum_t *cs; - -- md5_init_ctx (&a); -+ MD5_Init(&a); - if (body == NULL) -- md5_process_bytes ("", 0, &a); -+ MD5_Update(&a, "", 0); - else -- md5_process_bytes (body, strlen(body), &a); -- md5_finish_ctx(&a, b); -+ MD5_Update(&a, body, bbytes); -+ MD5_Final(b.bytes, &a); - -- for (i = 0; i < chksum->n; i++) -+ for (i = 0; i < cs->n; i++) - { -- if (0 == strncmp (chksum->md5[i], b, 16)) -+ if (b.halves[0] == cs->md5s[i].halves[0] && -+ b.halves[1] == cs->md5s[i].halves[1]) - return 1; - } - -- chksum->md5 = -- (char **) xrealloc (chksum->md5, (1 + chksum->n) * sizeof (char *)); -- chksum->md5[chksum->n] = xstrdup (b); -+ cs = -+ xrealloc (cs, sizeof(checksum_t) + (i + 1) * sizeof (md5_t)); -+ cs->md5s[i].halves[0] = b.halves[0]; -+ cs->md5s[i].halves[1] = b.halves[1]; - -- (chksum->n)++; -+ cs->n++; - - return 0; - } diff --git a/mail/mboxgrep/files/patch-src_scan.h b/mail/mboxgrep/files/patch-src_scan.h deleted file mode 100644 index c37be2d579ad..000000000000 --- a/mail/mboxgrep/files/patch-src_scan.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/scan.h.orig 2003-03-30 23:07:10 UTC -+++ src/scan.h -@@ -23,8 +23,7 @@ - - #include "mboxgrep.h" - --void scan_mailbox (char path[]); --void recursive_scan (char path[]); --int md5_check_message (char *body, checksum_t *chksum); -+void scan_mailbox(const char path[]); -+void recursive_scan(const char path[]); - - #endif /* SCAN_H */