diff --git a/mail/xmail/Makefile b/mail/xmail/Makefile index 2b2d48a81e30..092e307b2878 100644 --- a/mail/xmail/Makefile +++ b/mail/xmail/Makefile @@ -1,23 +1,23 @@ PORTNAME= xmail PORTVERSION= 1.6 PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= XCONTRIB/applications DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= cy@FreeBSD.org COMMENT= X-based interface to the Berkeley mail program LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYRIGHT USES= imake xorg USE_XORG= ice sm x11 xaw xbitmaps xext xmu xpm xt -CFLAGS+= -Wno-incompatible-function-pointer-types +CFLAGS+= -Wno-incompatible-function-pointer-types -lutil post-patch: # Fix the build with -fno-common (for Clang 11 and GCC 10) @${REINPLACE_CMD} -e '/In_Bogus_Mail_File;/d' ${WRKSRC}/xmail.c .include diff --git a/mail/xmail/files/patch-Imakefile b/mail/xmail/files/patch-Imakefile index fd65a954a33a..fb417e91b9bd 100644 --- a/mail/xmail/files/patch-Imakefile +++ b/mail/xmail/files/patch-Imakefile @@ -1,109 +1,109 @@ ---- Imakefile.orig Mon Jan 30 22:41:47 1995 -+++ Imakefile Wed Oct 15 09:52:37 2003 +--- Imakefile.orig 1995-01-30 13:41:47.000000000 -0800 ++++ Imakefile 2023-07-18 07:06:05.053673000 -0700 @@ -1,63 +1,62 @@ -/* */# -/* */# @(#)Imakefile - for xmail version 1 patchlevel 5 -/* */# -/* */# Uncomment USE_DIRENT if readdir() uses instead of -/* */# +# +# @(#)Imakefile - for xmail version 1 patchlevel 5 +# +# Uncomment USE_DIRENT if readdir() uses instead of +# USE_DIRENT = -DUSE_DIRENT -/* */# -/* */# Uncomment X_FACE and COMPFACE if you have the compface library installed -/* */# and you want xmail to automatically display the X-Face: header, if found -/* */# in a message. -/* */# +# +# Uncomment X_FACE and COMPFACE if you have the compface library installed +# and you want xmail to automatically display the X-Face: header, if found +# in a message. +# #ifdef USE_X_FACE X_FACE = -DX_FACE COMPFACE = -L./compface -lcompface #endif -/* */# -/* */# Uncomment XPM if you have the Xpm version 3 library and want color icons -/* */# +# +# Uncomment XPM if you have the Xpm version 3 library and want color icons +# XPM = -DXPM LIBXPM = -lXpm -/* */# -/* */# Uncomment LPT if you require att environment support for pseudo ports. -/* */# -/* */# LPT = -lpt -/* */# -/* */# Uncomment REGEXP if your system supplies the regexp.h include file. -/* */# Otherwise, xmail will use the regex procedures re_comp and re_exec. -/* */# -/* */# REGEXP = -DUSE_REGEXP -/* */# -/* */# Define MAILBOX_DIRECTORY if your mail spool is located in other than the -/* */# default /usr/spool/mail. (If not specified, the default will be used.) -/* */# -/* */# MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/usr/spool/mail\" -/* */# -/* */# Define DEFAULT_VISUAL if your copy of vi lies in some place other than -/* */# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) -/* */# +# +# Uncomment LPT if you require att environment support for pseudo ports. +# +# LPT = -lpt +# +# Uncomment REGEXP if your system supplies the regexp.h include file. +# Otherwise, xmail will use the regex procedures re_comp and re_exec. +# +# REGEXP = -DUSE_REGEXP +# +# Define MAILBOX_DIRECTORY if your mail spool is located in other than the +# default /usr/spool/mail. (If not specified, the default will be used.) +# + MAILBOX_DIR = -DMAILBOX_DIRECTORY=\"/var/mail\" +# +# Define DEFAULT_VISUAL if your copy of vi lies in some place other than +# /usr/ucb. (If not specified, /usr/ucb/vi will be the default editor.) +# DEF_VISUAL = -DDEFAULT_VISUAL=\"/usr/bin/vi\" -/* */# -/* */# Define DEFAULT_MAILER if your mail program is not the standard -/* */# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. +# +# Define DEFAULT_MAILER if your mail program is not the standard +# /usr/ucb/Mail. CAUTION - Operation is NOT guaranteed with other mailers. -/* */# DEF_MAILER = -DDEFAULT_MAILER=\"/usr/ucb/Mail\" + DEF_MAILER = -DDEFAULT_MAILER=\"/usr/bin/Mail\" -/* */# -/* */# Define SIGACTION if your system utilizes the sigaction() call rather -/* */# than the sigvec() call (true on most SYSV and POSIX compilant systems) -/* */# You may also need to add the following BSD define (true on SGI systems) -/* */# -/* */# SIGDEF = -D_BSD_SIGNALS -/* */# +# +# Define SIGACTION if your system utilizes the sigaction() call rather +# than the sigvec() call (true on most SYSV and POSIX compilant systems) +# You may also need to add the following BSD define (true on SGI systems) +# +# SIGDEF = -D_BSD_SIGNALS +# SIGACT = -DSIGACTION -/* */# XMAIL_DEFINES = $(MAILBOX_DIR) $(DEF_VISUAL) $(DEF_MAILER) $(SIGACT) $(SIGDEF) DEFINES = $(USE_DIRENT) $(X_FACE) $(XPM) $(REGEXP) $(XMAIL_DEFINES) DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) -LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -+LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat ++LOCAL_LIBRARIES = $(LIBXPM) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(COMPFACE) $(LPT) -lcompat -lutil SRCS = Mailwatch.c HelpText.c actions.c callMail.c callbacks.c \ confirm.c directory.c environs.c handler.c mail.c parser.c \ diff --git a/mail/xmail/files/patch-callMail.c b/mail/xmail/files/patch-callMail.c index 53fcd326af4e..685cdde53584 100644 --- a/mail/xmail/files/patch-callMail.c +++ b/mail/xmail/files/patch-callMail.c @@ -1,55 +1,93 @@ ---- callMail.c.orig Thu Jan 26 21:52:01 1995 -+++ callMail.c Wed Feb 4 23:30:07 1998 -@@ -38,11 +38,10 @@ +--- callMail.c.orig 1995-01-26 21:52:01.000000000 -0800 ++++ callMail.c 2023-07-18 07:01:24.570712000 -0700 +@@ -34,15 +34,21 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#include ++#include ++#include ++#endif ++ + #if defined(AIXV3) || defined(_IBMR2) #include #endif -#if !(defined(SYSV) || defined(linux)) || defined(clipper) +#if !(defined(SYSV) || defined(linux) || defined(__FreeBSD__)) || defined(clipper) #include #else -#include -#include +#include #include #if defined(att) #include -@@ -81,7 +80,7 @@ +@@ -81,7 +87,7 @@ #ifdef hpux #define PTYCHAR2 "fedcba9876543210" #else /* !hpux */ -#define PTYCHAR2 "0123456789abcdef" +#define PTYCHAR2 "0123456789abcdefghijklmnopqrstuvwxyz" #endif /* !hpux */ #endif /* !PTYCHAR2 */ -@@ -207,8 +206,8 @@ +@@ -91,6 +97,7 @@ + char pseudo_tty[20]; + + ++#ifndef __FreeBSD__ + /* + ** @(#) openMaster - searches for and opens a pty master. If it finds one, + ** it returns the value of the file descriptor. If not, +@@ -197,6 +204,7 @@ + #endif + return(-1); /* look for more master/slave pairs */ + } /* openSlave */ ++#endif /* __FreeBSD__ */ + + + /* +@@ -207,30 +215,34 @@ callMail(argv) char *argv[]; { -#if defined(linux) || (defined(SYSV) && !defined(clipper)) - struct termio tio; +#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) + struct termios tio; #else struct sgttyb Sgtty; #endif -@@ -223,14 +222,14 @@ + int slave; /* file descriptor to slave pty */ + + ++#ifdef __FreeBSD__ ++ openpty(&mail_fd, &slave, NULL, NULL, NULL); ++#else + for (;;) { /* find a pair, or master fails */ + mail_fd = openMaster(); + if ((slave = openSlave(mail_fd)) != -1) + break; + } ++#endif /* ** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS) */ -#if defined(linux) || (defined(SYSV) && !defined(clipper)) - (void) ioctl(slave, TCGETA, &tio); - tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|TABDLY); +#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper)) + tcgetattr(slave, &tio); + tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|OXTABS); tio.c_iflag &= ~IXOFF; tio.c_iflag |= ICRNL; tio.c_lflag &= ~(ISIG|ECHO); tio.c_lflag |= ICANON; - (void) ioctl(slave, TCSETA, &tio); + tcsetattr(slave, TCSANOW, &tio); #else (void) ioctl(slave, TIOCGETP, &Sgtty); Sgtty.sg_flags &= ~(ECHO|CRMOD|XTABS);