Hi ports, (This is for post-unlock.)
spacehulk breaks during the build with ports-gcc-8: smtp.cpp:291:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] On powerpc and arm, char is unsigned by default, so it breaks. There is a bit of mystery on why it works with gcc-4.9, it seems that gcc-8 is better at finding narrowing errors. That diff fixes the issue and has been tested on amd64 and indeed powerpc. While here, i've cleaned up the spacing in the Makefile. Charlène. Index: Makefile =================================================================== RCS file: /cvs/ports/games/spacehulk/Makefile,v retrieving revision 1.20 diff -u -p -r1.20 Makefile --- Makefile 2 Mar 2019 20:00:27 -0000 1.20 +++ Makefile 10 Apr 2019 13:28:07 -0000 @@ -4,7 +4,7 @@ COMMENT= total conversion of the Space H DISTNAME= spacehulk-1.5-beta1 PKGNAME= spacehulk-1.5beta1 -REVISION = 10 +REVISION= 11 CATEGORIES= games x11 HOMEPAGE= http://r.vinot.free.fr/spacehulk/ @@ -18,18 +18,18 @@ WANTLIB += c drm expat fontconfig freety WANTLIB += png16 xcb xcb-dri2 xcb-dri3 xcb-glx xcb-present xcb-sync WANTLIB += xcb-xfixes xshmfence z -COMPILER = base-clang ports-gcc base-gcc +COMPILER= base-clang ports-gcc base-gcc -MASTER_SITES= ${HOMEPAGE} +MASTER_SITES= ${HOMEPAGE} -MODULES= x11/qt3 +MODULES= x11/qt3 -CONFIGURE_STYLE=gnu -CONFIGURE_ARGS= --with-qt-includes=${MODQT_INCDIR} \ - --with-qt-libraries=${MODQT_LIBDIR} -CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \ - CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --with-qt-includes=${MODQT_INCDIR} \ + --with-qt-libraries=${MODQT_LIBDIR} +CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \ + CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" -USE_GMAKE= Yes +USE_GMAKE= Yes .include <bsd.port.mk> Index: patches/patch-src_smtp_cpp =================================================================== RCS file: patches/patch-src_smtp_cpp diff -N patches/patch-src_smtp_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_smtp_cpp 10 Apr 2019 13:28:07 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +powerpc and arm have unsigned char by default, fix: +error: narrowing conversion of '-1' from 'int' to 'char' inside { } + +Index: src/smtp.cpp +--- src/smtp.cpp.orig ++++ src/smtp.cpp +@@ -279,7 +279,7 @@ void Smtp::receivedAuth(QString &responseLine) + static const char base64char[65] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +-static const char base64val[128] = { ++static const signed char base64val[128] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,