git: 4637facd259a - main - comms/hylafax: fix binary stripping, deprecate

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Fri, 05 Aug 2022 10:17:18 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4637facd259ac04afa336a80246c14343f1366af

commit 4637facd259ac04afa336a80246c14343f1366af
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-08-05 10:15:23 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-08-05 10:17:09 +0000

    comms/hylafax: fix binary stripping, deprecate
    
    The existing port/install.sh[.in] script attempts to strip
    scripts, which does not work well on all FreeBSD's versions of strip(1).
    
    Patch it out and manually strip the binaries instead.
    
    These 25 warnings seem relevant and warrant investigation (not done):
         1  Class2Params.c++:790:22: warning: operator '?:' has lower precedence than '&'; '&' will be evaluated first [-Wbitwise-conditional-parentheses]
         2  .././util/faxstate.c:142:52: warning: field precision should have type 'int', but argument has type 'unsigned long' [-Wformat]
         3  Class1.c++:394:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
         4  Class1.c++:403:22: warning: array subscript is of type 'char' [-Wchar-subscripts]
         5  Class1.c++:418:28: warning: array subscript is of type 'char' [-Wchar-subscripts]
         6  Class1Send.c++:565:5: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
         7  Class1Send.c++:1428:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
         8  Class1Send.c++:1428:28: warning: result of comparison of constant 35 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare]
         9  Class1Send.c++:1949:6: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        10  Class1Send.c++:1956:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        11  MemoryDecoder.c++:499:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        12  MemoryDecoder.c++:523:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        13  ModemConfig.c++:479:17: warning: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Wconstant-conversion]
        14  PCFFont.c++:187:6: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        15  PCFFont.c++:192:6: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        16  PCFFont.c++:217:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        17  PCFFont.c++:237:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        18  PCFFont.c++:241:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        19  faxQueueApp.c++:3128:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        20  faxQueueApp.c++:3251:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        21  faxQCleanApp.c++:310:27: warning: format specifies type 'unsigned int' but the argument has type 'nlink_t' (aka 'unsigned long') [-Wformat]
        22  tagtest.c++:556:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        23  cqtest.c++:582:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        24  choptest.c++:146:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
        25  PAM.c++:79:21: warning: variable 'pamret' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
    
    Now over to diizzy@ for the tiff update patching.
    
    While here, deprecate this since it appears dead and there is a
    maintained fork on sourceforge.net called HylaFAX+. There have been
    prior submissions of updates in Bugzilla, but the submitter no longer
    pursued the update since he no longer uses HylaFAX+.
---
 comms/hylafax/Makefile | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index 1e15f01b646e..a7825eb2a827 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	hylafax
 PORTVERSION=	6.0.7
+PORTREVISION=	1
 CATEGORIES=	comms
 MASTER_SITES=	ftp://ftp.hylafax.org/source/
 
@@ -20,6 +21,9 @@ USE_RC_SUBR=	hylafax
 MAKE_JOBS_UNSAFE=	yes
 HAS_CONFIGURE=		yes
 
+DEPRECATED=	dead upstream, someone port hylafax+ from sourceforge.net instead
+EXPIRATION_DATE=2022-09-30
+
 CONFIGURE_ARGS=	--with-INSTALL="" \
 		--with-LIBTIFF="-L${LOCALBASE}/lib -ltiff -ljpeg" \
 		--with-ZLIB=no --with-LIBZ=-lz \
@@ -29,7 +33,7 @@ CONFIGURE_ARGS=	--with-INSTALL="" \
 		--with-DIR_HTML="${DOCSDIR}" \
 		--with-GETTY=SysV
 CFLAGS+=	-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -Wall -L${LOCALBASE}/lib
-CONFIGURE_ENV=	ENVOPTS="${CFLAGS}"
+CONFIGURE_ENV=	ENVOPTS="${CFLAGS}" STRIP=/usr/bin/true
 MAKE_ENV+=	ROOT=${STAGEDIR}
 MAKE_ARGS+=	OPTIMIZER="" -DOPTIMIZER
 
@@ -98,6 +102,17 @@ pre-install:
 		${STAGEDIR}${HYLAFAX_SPOOL}/info \
 		${STAGEDIR}${HYLAFAX_SPOOL}/log
 
+post-install:
+.for i in bin/faxalter bin/faxcover bin/faxmail bin/faxrm bin/faxstat bin/sendfax \
+bin/sendpage sbin/choptest sbin/cqtest sbin/dialtest sbin/faxabort \
+sbin/faxadduser sbin/faxanswer sbin/faxconfig sbin/faxdeluser \
+sbin/faxgetty sbin/faxinfo sbin/faxlock sbin/faxmodem sbin/faxmsg \
+sbin/faxq sbin/faxqclean sbin/faxquit sbin/faxsend sbin/faxstate \
+sbin/faxwatch sbin/hfaxd sbin/lockname sbin/ondelay sbin/pagesend \
+sbin/tagtest sbin/textfmt sbin/tiffcheck sbin/tsitest sbin/typetest
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${i}
+.endfor
+
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/