diff --git a/mail/mailagent/Makefile b/mail/mailagent/Makefile index efa14ec3dc13..36346dc20b8d 100644 --- a/mail/mailagent/Makefile +++ b/mail/mailagent/Makefile @@ -1,66 +1,69 @@ PORTNAME= mailagent PORTVERSION= 3.1.106 +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= ports@FreeBSD.org COMMENT= Sophisticated automatic mail-processing tool WWW= https://github.com/rmanfredi/mailagent LICENSE= ART10 LICENSE_FILE= ${WRKSRC}/Artistic USES= perl5 tar:bzip2 +USE_CSTD= c99 USE_GITHUB= yes GH_ACCOUNT= rmanfredi GH_TAGNAME= 9a14a15 ORGFILE= ${PREFIX}/etc/mailagent.orgname HAS_CONFIGURE= yes CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= -dres \ -Dperlpath='${PERL}' \ - -Dccflags='${CFLAGS}' \ + -Dcc='${CC}' \ + -Dccflags='${CFLAGS} -Wno-unknown-warning-option -Wno-unknown-warning -Wno-format-nonliteral -Wno-deprecated-non-prototype' \ -Dd_flockonly='define' \ -Dutmp='/var/run/utmp' \ -Dorgname='${ORGFILE}' \ -Dprefix='${PREFIX}' \ -Dmansrc='${STAGEDIR}${PREFIX}/man/man1' MAKE_JOBS_UNSAFE= yes MAKE_ENV= PATH=`dirname ${PERL}`:${PATH} INSTALL_PREFIX=${STAGEDIR} INSTALL_TARGET= install install.man SUB_LIST+= ORGFILE="${ORGFILE}" SUB_FILES= pkg-message PLIST_SUB+= ORGFILE="${ORGFILE}" pre-extract: @if [ `${SH} -c umask` != 0022 ]; then \ ${ECHO} "Please set umask to 022 before running make,"; \ ${ECHO} "or mailagent will not build successfully."; \ ${FALSE}; fi post-patch: @(cd ${WRKSRC}; \ ${REINPLACE_CMD} -i '' -e 's|exec perl -S|exec ${PERL} -S|' \ agent/edusers.SH agent/magent.sh agent/maildist.SH \ agent/mailhelp.SH agent/maillist.SH agent/mailpatch.SH \ agent/package.SH agent/test/TEST agent/test/atail \ bin/perload misc/getcost/getcost misc/mime/unmime \ misc/news/newsgate) TEST_CMD= '(cd ${WRKSRC}/agent/test; ${SETENV} ${MAKE_ENV} ${MAKE})' do-test: @if [ `${ID} -u` = 0 ]; then \ ${CHOWN} -R nobody ${WRKSRC}/agent/test; \ su -m nobody -c ${TEST_CMD}; \ else \ ${SH} -c ${TEST_CMD}; \ fi post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/misc cd ${WRKSRC}/misc && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/misc ${MV} ${STAGEDIR}${PREFIX}/lib/mailagent/examples ${STAGEDIR}${EXAMPLESDIR}/agent .include diff --git a/mail/mailagent/files/patch-agent-filter-io.c b/mail/mailagent/files/patch-agent-filter-io.c index 77f213059c94..eec11ff579fa 100644 --- a/mail/mailagent/files/patch-agent-filter-io.c +++ b/mail/mailagent/files/patch-agent-filter-io.c @@ -1,21 +1,29 @@ ---- ./agent/filter/io.c.orig 2008-08-19 17:44:07.000000000 +0900 -+++ ./agent/filter/io.c 2014-08-14 01:59:33.537704696 +0900 -@@ -141,6 +141,9 @@ +--- agent/filter/io.c.orig 2020-04-09 14:16:46 UTC ++++ agent/filter/io.c +@@ -100,6 +100,7 @@ + #include + #include + #include ++#include + + #ifdef I_UNISTD + #include /* R_OK and friends */ +@@ -141,6 +142,9 @@ extern char *malloc(); /* Memory allocation */ #ifdef I_SYS_IOCTL #include #endif +#ifdef I_SYS_PARAM +#include +#endif /* * The following should be defined in . -@@ -739,7 +742,7 @@ +@@ -739,7 +743,7 @@ char *location; */ char **envp; /* Environment pointer */ -#ifdef UNION_WAIT +#if defined(UNION_WAIT) && (!defined(BSD) || BSD < 199306) union wait status; /* Waiting status */ #else int status; /* Status from command */ diff --git a/mail/mailagent/files/patch-agent-pl-termios_ph.c b/mail/mailagent/files/patch-agent-pl-termios_ph.c new file mode 100644 index 000000000000..8c53b57e1999 --- /dev/null +++ b/mail/mailagent/files/patch-agent-pl-termios_ph.c @@ -0,0 +1,36 @@ +--- agent/pl/termios/termios_ph.c.orig 2020-04-09 16:16:46.000000000 +0200 ++++ agent/pl/termios/termios_ph.c 2023-05-05 23:42:03.979804000 +0200 +@@ -33,7 +33,7 @@ + #define PADSTR "..pad.. " /* Pad string, for comment */ + + #include "config.h" +- ++#include + #include + + #ifdef I_STRING +@@ -85,8 +85,8 @@ + char pack[MAX_LEN]; + char fields[MAX_LEN]; + char buf[MAX_LEN]; +- int row_off = (int) &win->ws_row; /* Offset of ws_row */ +- int col_off = (int) &win->ws_col; /* Offset of ws_col */ ++ int row_off = offsetof(struct winsize, ws_row); ++ int col_off = offsetof(struct winsize, ws_col); + int row_len = sizeof(win->ws_row); /* Size of ws_row */ + int col_len = sizeof(win->ws_col); /* Size of ws_col */ + int last_off = 0; /* Last offset in pack format */ +@@ -142,10 +142,10 @@ + /* + * Spit out perl definitions. + */ +- printf("$TIOCGWINSZ = 0x%x;\t# The TIOCGWINSZ ioctl()\n", TIOCGWINSZ); ++ printf("$TIOCGWINSZ = 0x%lx;\t# The TIOCGWINSZ ioctl()\n", (long)TIOCGWINSZ); + printf("$packfmt = '%s';\t\t# %s\n", pack, comment); +- printf("$length = %d;\t\t\t# sizeof(struct winsize)\n", +- sizeof(struct winsize)); ++ printf("$length = %lu;\t\t\t# sizeof(struct winsize)\n", ++ (unsigned long)sizeof(struct winsize)); + printf("@fields = %s;\n", fields); + #else + printf("$TIOCGWINSZ = undef;\t# No termios\n"); diff --git a/mail/mailagent/files/patch-agent_filter_parser.c b/mail/mailagent/files/patch-agent_filter_parser.c new file mode 100644 index 000000000000..01a8b7bc076b --- /dev/null +++ b/mail/mailagent/files/patch-agent_filter_parser.c @@ -0,0 +1,27 @@ +--- agent/filter/parser.c.orig 2020-04-09 14:16:46 UTC ++++ agent/filter/parser.c +@@ -327,10 +327,7 @@ char *file; + } + + /* VARARGS3 */ +-private void check_fatal(flags, reason, arg1, arg2, arg3, arg4, arg5) +-int flags; +-char *reason; +-long arg1, arg2, arg3, arg4, arg5; ++private void check_fatal(int flags, char *reason, char *arg1) + { + /* Die with a fatal error if MAY_PANIC is specified in flags, otherwise + * simply log the error. +@@ -339,10 +336,10 @@ long arg1, arg2, arg3, arg4, arg5; + char buffer[MAX_STRING]; + + if (flags & MAY_PANIC) +- fatal(reason, arg1, arg2, arg3, arg4, arg5); ++ fatal(reason, arg1); + + sprintf(buffer, "ERROR %s", reason); +- add_log(1, buffer, arg1, arg2, arg3, arg4, arg5); ++ add_log(1, buffer, arg1); + } + + private int check_perm(file, flags)