Hi ports,
Hylafax doesn't build with ports-gcc-8:
> FaxRecvInfo.c++:115:20: error: ISO C++ forbids comparison between
> pointer and integer [-fpermissive]
Using C++03 like we're doing currently with base-clang doesn't help. It
appears that Debian has fixes [0] for gcc>=7, i used them.
The diff i propose here:
- moves HOMEPAGE to https (including in the README)
- allows building with C++14 and thus the removal of clang-specific
flags (it still works with gcc-4.9 and its default C++98)
- makes portcheck(1) happy: add a RCS tag to a patch that had none,
change lines with more than 80 chars and remove trailing whitespaces.
It builds and installs fine on macppc/ports-gcc-{8,4.9} and amd64.
Any comment?
Charlène.
[0]
https://sources.debian.org/patches/hylafax/3:6.0.6-8.1/828_gcc7.patch/
Index: Makefile
===================================================================
RCS file: /cvs/ports/comms/hylafax/Makefile,v
retrieving revision 1.84
diff -u -p -u -p -r1.84 Makefile
--- Makefile 24 Oct 2018 14:27:59 -0000 1.84
+++ Makefile 20 Apr 2019 17:37:32 -0000
@@ -2,10 +2,10 @@
COMMENT= send/receive faxes and share modems
DISTNAME= hylafax-6.0.6
-REVISION = 13
+REVISION= 14
CATEGORIES= comms
-HOMEPAGE= http://www.HylaFAX.org/
+HOMEPAGE= https://www.HylaFAX.org/
MASTER_SITES= http://ftp.hylafax.org/source/ \
ftp://ftp.hylafax.org/source/ \
@@ -21,7 +21,7 @@ FLAVOR?=
WANTLIB= c iconv intl jbig m ${COMPILER_LIBCXX} tiff util z
-COMPILER = base-clang ports-gcc base-gcc
+COMPILER= base-clang ports-gcc base-gcc
BUILD_DEPENDS= print/ghostscript/gnu
RUN_DEPENDS= print/ghostscript/gnu \
@@ -51,11 +51,6 @@ CONFIGURE_ENV+= CCOMPILER="${CC}" CXXCO
CONFIGURE_ARGS+= --with-PAGESIZE=A4
.endif
-.include <bsd.port.arch.mk>
-.if ${PROPERTIES:Mclang}
-CXXFLAGS += -std=c++03
-.endif
-
FAKE_FLAGS= ROOT=${WRKINST} SPOOL=${PREFIX}/libdata/hylafax
NO_TEST= Yes
@@ -64,6 +59,7 @@ pre-configure:
${SUBST_CMD} ${WRKSRC}/configure
post-install:
- echo "FontMap: ${LOCALBASE}/share/fonts/ghostscript"
>${PREFIX}/libdata/hylafax/etc/hyla.conf
+ echo "FontMap: ${LOCALBASE}/share/fonts/ghostscript" \
+ >${PREFIX}/libdata/hylafax/etc/hyla.conf
.include <bsd.port.mk>
Index: patches/patch-faxd_ModemConfig_c++
===================================================================
RCS file: patches/patch-faxd_ModemConfig_c++
diff -N patches/patch-faxd_ModemConfig_c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-faxd_ModemConfig_c++ 20 Apr 2019 17:37:32 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Allow building with C++14
+
+Index: faxd/ModemConfig.c++
+--- faxd/ModemConfig.c++.orig
++++ faxd/ModemConfig.c++
+@@ -817,4 +817,4 @@ ModemConfig::setConfigItem(const char* tag, const char
+ }
+ #undef N
+
+-fxIMPLEMENT_ObjArray(IDConfArray, id_config);
++fxIMPLEMENT_ObjArray(IDConfArray, id_config)
Index: patches/patch-faxd_ModemConfig_c++.orig
===================================================================
RCS file: patches/patch-faxd_ModemConfig_c++.orig
diff -N patches/patch-faxd_ModemConfig_c++.orig
Index: patches/patch-faxd_UUCPLock_c++
===================================================================
RCS file: /cvs/ports/comms/hylafax/patches/patch-faxd_UUCPLock_c++,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-faxd_UUCPLock_c++
--- patches/patch-faxd_UUCPLock_c++ 27 Jan 2003 13:42:48 -0000 1.2
+++ patches/patch-faxd_UUCPLock_c++ 20 Apr 2019 17:37:32 -0000
@@ -1,3 +1,5 @@
+$OpenBSD$
+
--- faxd/UUCPLock.c++.orig Thu Sep 21 05:24:54 2000
+++ faxd/UUCPLock.c++ Wed Jul 31 12:40:10 2002
@@ -37,6 +37,7 @@ extern "C" {
Index: patches/patch-libhylafax_FaxRecvInfo_c++
===================================================================
RCS file: patches/patch-libhylafax_FaxRecvInfo_c++
diff -N patches/patch-libhylafax_FaxRecvInfo_c++
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libhylafax_FaxRecvInfo_c++ 20 Apr 2019 17:37:32 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Allow building with C++14
+
+Index: libhylafax/FaxRecvInfo.c++
+--- libhylafax/FaxRecvInfo.c++.orig
++++ libhylafax/FaxRecvInfo.c++
+@@ -112,7 +112,7 @@ FaxRecvInfo::decode(const char* cp)
+ if (cp == NULL || cp[1] != ',' || cp[2] != '"')
+ return (false);
+ u_int i = 0;
+- while (cp+2 != '\0') {
++ while (*(cp+2) != '\0') {
+ callid[i] = cp+3; // +1 for "/+1 for ,/+1 for "
+ if (*cp == '\"') break;
+ callid[i].resize(callid[i].next(0,'"'));
Index: pkg/README
===================================================================
RCS file: /cvs/ports/comms/hylafax/pkg/README,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 README
--- pkg/README 4 Sep 2018 12:46:09 -0000 1.7
+++ pkg/README 20 Apr 2019 17:37:32 -0000
@@ -9,9 +9,9 @@ Post-installation steps
Hylafax needs some manual configuration before it is usable.
Make sure that you have configured HylaFAX before running faxq:
- server: ${TRUEPREFIX}/sbin/faxsetup
- modems:${TRUEPREFIX}/sbin/faxaddmodem
- incoming calls: /etc/ttys
+ server: ${TRUEPREFIX}/sbin/faxsetup
+ modems:${TRUEPREFIX}/sbin/faxaddmodem
+ incoming calls: /etc/ttys
When you are asked to specify the name of tty device, use a tty device
existing on your architecture instead of "ttyd1".
@@ -25,4 +25,4 @@ and send a SIGHUP to init(8).
References
==========
-Additional documentation at http://www.hylafax.org/.
+Additional documentation at https://www.hylafax.org/.