diff --git a/mail/faces/Makefile b/mail/faces/Makefile index 6d6969d01a0c..3f69c2a0aeb6 100644 --- a/mail/faces/Makefile +++ b/mail/faces/Makefile @@ -1,90 +1,90 @@ PORTNAME= faces PORTVERSION= 1.7.7 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= mail MASTER_SITES= SF MAINTAINER= ashish@FreeBSD.org COMMENT= Visual mail, user, and print face server WWW= https://faces.sourceforge.net/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING OPTIONS_DEFINE= DOCS NLS AUDIO OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= NAS RPLAY SOX AUDIO_DESC= Audio support RPLAY_DESC= rplay audio support SOX_DESC= Sox audio support NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls OPTIONS_SUB= yes AUDIO_CONFIGURE_ENABLE= audio NAS_CONFIGURE_ON= --with-audio-cmd=${LOCALBASE}/bin/auplay NAS_RUN_DEPENDS= auplay:audio/nas SOX_CONFIGURE_ON= --with-audio-cmd=${LOCALBASE}/bin/play SOX_RUN_DEPENDS= play:audio/sox RPLAY_CONFIGURE_ON= --with-audio-cmd=${LOCALBASE}/bin/rplay RPLAY_RUN_DEPENDS= rplay:audio/rplay USE_LDCONFIG= yes GNU_CONFIGURE= yes PORTDOCS= README .include # I have no better idea up to now # Install the working Makefile for compface from the old faces port # This was much less complex an builds the shared libs, too post-patch: @${REINPLACE_CMD} -e "s%/usr/local/faces%${DATADIR}%g ; \ s%/var/spool/mail%/var/mail%g" ${WRKSRC}/faces/faces.man @${LN} -sf ${WRKSRC}/faces/faces.man ${WRKSRC}/faces/faces.1 .if ${PORT_OPTIONS:MNAS} @${REINPLACE_CMD} -e "s%rplay%auplay%" ${WRKSRC}/faces/Faces.ad .elif ${PORT_OPTIONS:MSOX} @${REINPLACE_CMD} -e "s%rplay%play%" ${WRKSRC}/faces/Faces.ad .elif ${PORT_OPTIONS:MRPLAY} # nada .else @${REINPLACE_CMD} -e "s%^faces.audioSupport.*%faces.audioSupport: false%" ${WRKSRC}/faces/Faces.ad .endif do-build: cd ${WRKSRC}/compface && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \ ${FILESDIR}/Makefile.compface ${MAKE_ARGS} ${ALL_TARGET} .if ${PORT_OPTIONS:MX11} cd ${WRKSRC}/faces && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \ ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/compface/compface ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/compface/uncompface ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/compface/compface.h ${STAGEDIR}${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/compface/libcompface.a ${STAGEDIR}${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/compface/libcompface.so.1 ${STAGEDIR}${PREFIX}/lib ${LN} -sf libcompface.so.1 ${STAGEDIR}${PREFIX}/lib/libcompface.so ${INSTALL_MAN} ${WRKSRC}/compface/compface.1 ${STAGEDIR}${PREFIX}/share/man/man1 ${INSTALL_MAN} ${WRKSRC}/compface/compface.3 ${STAGEDIR}${PREFIX}/share/man/man3 ${INSTALL_SCRIPT} ${FILESDIR}/ikon2xbm ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${FILESDIR}/xbm2ikon ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${FILESDIR}/xbmcut48 ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${FILESDIR}/xbmsize48 ${STAGEDIR}${PREFIX}/bin .if ${PORT_OPTIONS:MX11} ${INSTALL_PROGRAM} ${WRKSRC}/faces/faces ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/faces/faces.1 ${STAGEDIR}${PREFIX}/share/man/man1 ${INSTALL_DATA} ${WRKSRC}/faces/Faces.ad ${STAGEDIR}${LOCALBASE}/lib/X11/app-defaults/Faces .endif @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include diff --git a/mail/faces/files/patch-compface_cmain.c b/mail/faces/files/patch-compface_cmain.c index c3f144a65ad0..12ddc1636d27 100644 --- a/mail/faces/files/patch-compface_cmain.c +++ b/mail/faces/files/patch-compface_cmain.c @@ -1,197 +1,198 @@ --- compface/cmain.c.orig +++ compface/cmain.c -@@ -13,77 +13,64 @@ +@@ -13,77 +13,63 @@ * to me, then an attempt will be made to fix them. */ -#include -#include ++#include #include ++#include #include "compface.h" -#define STRCAT (void) strcat -#define STRCPY (void) strcpy -#define WRITE (void) write - -/* The buffer is longer than needed to handle sparse input formats */ - +/* the buffer is longer than needed to handle sparse input formats */ #define FACEBUFLEN 2048 char fbuf[FACEBUFLEN]; /* IO file descriptors and their names */ - int infile = 0; char *inname = ""; int outfile = 1; char *outname = ""; -char *cmdname; /* Basename of executable */ +/* basename of executable */ +char *cmdname; -/* Error handling definitions follow */ +/* error handling definitions follow */ - extern int errno, sys_nerr; - extern char *sys_errlist[]; - +-extern int errno, sys_nerr; +-extern char *sys_errlist[]; +extern void exit P((int)) ; -+ + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -#define INITERR(s) { \ - STRCPY(fbuf, cmdname); \ - STRCAT(fbuf, ": "); \ - STRCAT(fbuf, (s));\ - } -#define ADDERR(s) STRCAT(fbuf, (s)); -#define ERROR { \ - STRCAT(fbuf, "\n"); \ - WRITE(2, fbuf, strlen(fbuf)); \ - exit(1); \ - } -#define INITWARN(s) { \ - STRCPY(fbuf, cmdname); \ - STRCAT(fbuf, ": (warning) "); \ - STRCAT(fbuf, (s)); \ - } -#define ADDWARN(s) STRCAT(fbuf, (s)); -#define WARN { \ - STRCAT(fbuf, "\n"); \ - WRITE(2, fbuf, strlen(fbuf)); \ - } +#define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ + (void)strcat(fbuf, (s));} +#define ADDERR(s) (void)strcat(fbuf, (s)); +#define ERROR {(void)strcat(fbuf, "\n");\ + (void)write(2, fbuf, strlen(fbuf)); exit(1);} +#define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ + (void)strcat(fbuf, ": (warning) ");\ + (void)strcat(fbuf, (s));} +#define ADDWARN(s) (void)strcat(fbuf, (s)); +#define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} int -main(int argc, char *argv[]) +main(argc, argv) +int argc; +char *argv[]; { cmdname = *argv; - while (**argv) { - if (*((*argv)++) == '/') { - cmdname = *argv; /* Find the command's basename */ - } - } + while (**argv) + if (*((*argv)++) == '/') + cmdname = *argv; /* find the command's basename */ - if (argc > 3) { + if (argc > 3) + { INITERR("usage: ") ADDERR(cmdname) ADDERR(" [infile [outfile]]") ERROR } - if ((argc > 1) && strcmp(*++argv, "-")) { + if ((argc > 1) && strcmp(*++argv, "-")) + { inname = *argv; - if ((infile = open(inname, O_RDONLY)) == -1) { + if ((infile = open(inname, O_RDONLY)) == -1) + { INITERR(inname) ADDERR(": ") ADDERR(ERR) -@@ -91,10 +78,11 @@ +@@ -91,10 +77,11 @@ } } - if (argc > 2) { + if (argc > 2) + { outname = *++argv; - if ((outfile = open(outname, O_WRONLY | O_CREAT | - O_TRUNC, 0644)) == -1) { + if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) + { INITERR(outname) ADDERR(": ") ADDERR(ERR) -@@ -103,7 +91,8 @@ +@@ -103,7 +90,8 @@ } (void) ReadBuf(); - switch (compface(fbuf)) { + switch (compface(fbuf)) + { case -2 : INITERR("internal error") ERROR case -1 : INITERR(inname) -@@ -123,13 +112,15 @@ +@@ -123,13 +111,15 @@ int WriteBuf() { - char *s, *t; - int len; + register char *s, *t; + register int len; s = fbuf; t = s + strlen(s); - while (s < t) { - if ((len = write(outfile, s, t - s)) == -1) { + while (s < t) + { + if ((len = write(outfile, s, t - s)) == -1) + { INITERR(outname) ADDERR(": ") ADDERR(ERR) -@@ -137,27 +128,30 @@ +@@ -137,27 +127,30 @@ } s += len; } - return(0); + return 0; } int ReadBuf() { - int count, len; - char *t; + register int count, len; + register char *t; count = 0; t = fbuf; - while ((len = read(infile, t, FACEBUFLEN - count))) { - if (len == -1) { + while (len = read(infile, t, FACEBUFLEN - count)) + { + if (len == -1) + { INITERR(inname) ADDERR(": ") ADDERR(ERR) ERROR } t += len; - if ((count += len) >= FACEBUFLEN) { + if ((count += len) >= FACEBUFLEN) + { INITWARN(inname) ADDWARN(" exceeds internal buffer size. Data may be lost") WARN -@@ -165,5 +159,5 @@ +@@ -165,5 +158,5 @@ } } *t = '\0'; - return(count); + return count; } diff --git a/mail/faces/files/patch-compface_uncmain.c b/mail/faces/files/patch-compface_uncmain.c index c71cab16fad7..fc5fa9a39953 100644 --- a/mail/faces/files/patch-compface_uncmain.c +++ b/mail/faces/files/patch-compface_uncmain.c @@ -1,199 +1,200 @@ --- compface/uncmain.c.orig +++ compface/uncmain.c -@@ -13,16 +13,12 @@ +@@ -13,16 +13,14 @@ * to me, then an attempt will be made to fix them. */ -#include -#include ++#include #include ++#include #include "compface.h" -#define STRCAT (void) strcat -#define STRCPY (void) strcpy -#define WRITE (void) write +extern int xbitmap; -/* The buffer is longer than needed to handle sparse input formats */ +/* the buffer is longer than needed to handle sparse input formats */ #define FACEBUFLEN 2048 char fbuf[FACEBUFLEN]; -@@ -32,56 +28,58 @@ +@@ -32,56 +30,55 @@ int outfile = 1; char *outname = ""; -char *cmdname; /* Basename of executable */ +/* basename of executable */ +char *cmdname; -/* Error handling definitions follow */ +/* error handling definitions follow */ - extern int errno, sys_nerr; - extern char *sys_errlist[]; - +-extern int errno, sys_nerr; +-extern char *sys_errlist[]; +extern void exit P((int)) ; -+ + #define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "") -#define INITERR(s) { \ - STRCPY(fbuf, cmdname); \ - STRCAT(fbuf, ": "); \ - STRCAT(fbuf, (s));\ - } -#define ADDERR(s) STRCAT(fbuf, (s)); -#define ERROR { \ - STRCAT(fbuf, "\n"); \ - WRITE(2, fbuf, strlen(fbuf)); \ - exit(1); \ - } -#define INITWARN(s) { \ - STRCPY(fbuf, cmdname); \ - STRCAT(fbuf, ": (warning) "); \ - STRCAT(fbuf, (s)); \ - } -#define ADDWARN(s) STRCAT(fbuf, (s)); -#define WARN { \ - STRCAT(fbuf, "\n"); \ - WRITE(2, fbuf, strlen(fbuf)); \ - } +#define INITERR(s) {(void)strcpy(fbuf, cmdname); (void)strcat(fbuf, ": ");\ + (void)strcat(fbuf, (s));} +#define ADDERR(s) (void)strcat(fbuf, (s)); +#define ERROR {(void)strcat(fbuf, "\n");\ + (void)write(2, fbuf, strlen(fbuf)); exit(1);} +#define INITWARN(s) {(void)strcpy(fbuf, cmdname);\ + (void)strcat(fbuf, ": (warning) ");\ + (void)strcat(fbuf, (s));} +#define ADDWARN(s) (void)strcat(fbuf, (s)); +#define WARN {(void)strcat(fbuf, "\n"); (void)write(2, fbuf, strlen(fbuf));} int -main(int argc, char *argv[]) +main(argc, argv) +int argc; +char *argv[]; { cmdname = *argv; - while (**argv) { - if (*((*argv)++) == '/') { + while (**argv) + if (*((*argv)++) == '/') cmdname = *argv; /* find the command's basename */ - } + + if (argc > 1 && !strcmp(argv[1], "-X")) + { + xbitmap++; + argc--; + argv++; } - if (argc > 3) { + if (argc > 3) + { INITERR("usage: ") ADDERR(cmdname) ADDERR(" [infile [outfile]]") ERROR } - if ((argc > 1) && strcmp(*++argv, "-")) { + if ((argc > 1) && strcmp(*++argv, "-")) + { inname = *argv; - if ((infile = open(inname, O_RDONLY)) == -1) { + if ((infile = open(inname, O_RDONLY)) == -1) + { INITERR(inname) ADDERR(": ") ADDERR(ERR) -@@ -89,10 +87,11 @@ +@@ -89,10 +86,11 @@ } } - if (argc > 2) { + if (argc > 2) + { outname = *++argv; - if ((outfile = open(outname, O_WRONLY | O_CREAT | - O_TRUNC, 0644)) == -1) { + if ((outfile = open(outname, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) + { INITERR(outname) ADDERR(": ") ADDERR(ERR) -@@ -101,7 +100,8 @@ +@@ -101,7 +99,8 @@ } (void) ReadBuf(); - switch (uncompface(fbuf)) { + switch (uncompface(fbuf)) + { case -2 : INITERR("internal error") ERROR case -1 : INITERR(inname) -@@ -121,13 +121,15 @@ +@@ -121,13 +120,15 @@ int WriteBuf() { - char *s, *t; - int len; + register char *s, *t; + register int len; s = fbuf; t = s + strlen(s); - while (s < t) { - if ((len = write(outfile, s, t - s)) == -1) { + while (s < t) + { + if ((len = write(outfile, s, t - s)) == -1) + { INITERR(outname) ADDERR(": ") ADDERR(ERR) -@@ -135,27 +137,30 @@ +@@ -135,27 +136,30 @@ } s += len; } - return(0); + return 0; } int ReadBuf() { - int count, len; - char *t; + register int count, len; + register char *t; count = 0; t = fbuf; - while ((len = read(infile, t, FACEBUFLEN - count))) { - if (len == -1) { + while (len = read(infile, t, FACEBUFLEN - count)) + { + if (len == -1) + { INITERR(inname) ADDERR(": ") ADDERR(ERR) ERROR } t += len; - if ((count += len) >= FACEBUFLEN) { + if ((count += len) >= FACEBUFLEN) + { INITWARN(inname) ADDWARN(" exceeds internal buffer size. Data may be lost") WARN -@@ -163,5 +168,5 @@ +@@ -163,5 +167,5 @@ } } *t = '\0'; - return(count); + return count; } diff --git a/mail/faces/files/patch-intl_dcgettext.c b/mail/faces/files/patch-intl_dcgettext.c new file mode 100644 index 000000000000..67111a089265 --- /dev/null +++ b/mail/faces/files/patch-intl_dcgettext.c @@ -0,0 +1,12 @@ +--- intl/dcgettext.c.orig 2024-09-30 18:50:01.925202000 +0100 ++++ intl/dcgettext.c 2024-09-30 18:51:19.264270000 +0100 +@@ -39,9 +39,6 @@ + #endif + + #include +-#ifndef errno +-extern int errno; +-#endif + #ifndef __set_errno + # define __set_errno(val) errno = (val) + #endif