On Wed, Apr 11 2018, Matthew Martin <[email protected]> wrote: > On Wed, Apr 11, 2018 at 01:48:29PM +0200, Jeremie Courreges-Anglas wrote: >> On Wed, Apr 11 2018, Giovanni Bechis <[email protected]> wrote: >> > On 04/11/18 05:16, Matthew Martin wrote: >> >> On Tue, Apr 10, 2018 at 04:44:56PM +0200, Giovanni Bechis wrote: >> >>> test.log run on 6.3 attached, does it differs from yours ? >> >>> Cheers >> >>> Giovanni >> >> >> >> Not meaningfully. Thanks for the log. >> >> >> >> - Matthew Martin >> >> >> > Ok for me if it still works then. >> > I cannot commit nor switch to clang6 before next week. >> >> I would gladly commit it, but as-is the diff would break non-clang >> platforms. Maybe an ifdef check would be enough. > > How about this then? Just tell clang to compile as c++03.
Regarding the Makefile part: - CXXFLAGS would be clobbered, which isn't good; we only want to add -std=... to CXXFLAGS - the PROPERTIES test is wrong IMO, the check should be done against the compiler actually used. But since there are lots of such checks already in the tree, let's at least be consistently wrong :) Regarding the configure.in patch: - the configure should *prepend* to CXXFLAGS, not append; the user's choices should be respected - -O2 should not be hardcoded, let's just remove it. Even if the ports tree didn't pass -O2, autotools would add it by default. Updated patch below, Index: Makefile =================================================================== RCS file: /cvs/ports/security/steghide/Makefile,v retrieving revision 1.14 diff -u -p -r1.14 Makefile --- Makefile 21 Nov 2017 00:13:03 -0000 1.14 +++ Makefile 12 Apr 2018 11:49:23 -0000 @@ -3,7 +3,7 @@ COMMENT = software able to hide data in various kind of files DISTNAME = steghide-0.5.1 -REVISION = 4 +REVISION = 5 CATEGORIES = security HOMEPAGE = http://steghide.sf.net/ @@ -20,9 +20,14 @@ LIB_DEPENDS = devel/gettext \ security/mhash \ graphics/jpeg WANTLIB = c iconv intl jpeg m mhash mcrypt ${COMPILER_LIBCXX} z -CONFIGURE_STYLE = gnu +CONFIGURE_STYLE = autoconf +AUTOCONF_VERSION = 2.57 CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib -liconv -lintl" +.include <bsd.port.arch.mk> +.if ${PROPERTIES:Mclang} +CXXFLAGS += -std=c++03 +.endif .include <bsd.port.mk> Index: patches/patch-configure_in =================================================================== RCS file: patches/patch-configure_in diff -N patches/patch-configure_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure_in 12 Apr 2018 11:48:15 -0000 @@ -0,0 +1,31 @@ +$OpenBSD$ + +Index: configure.in +--- configure.in.orig ++++ configure.in +@@ -15,6 +15,9 @@ AC_CHECK_FUNCS(strchr) + AM_GNU_GETTEXT + AM_CONDITIONAL(USE_INTLDIR, test "$nls_cv_use_gnu_gettext" = yes) + ++dnl compiler warnings ++CXXFLAGS="-Wall $CXXFLAGS" ++ + dnl check if debugging support is requested + AC_MSG_CHECKING([wether to enable debugging]) + AC_ARG_ENABLE(debug,[ --enable-debug enable debugging], +@@ -22,14 +25,12 @@ AC_ARG_ENABLE(debug,[ --enable-debug enable + then + AC_MSG_RESULT([yes]) + AC_DEFINE(DEBUG,1,[enable code used only for debugging]) +- CXXFLAGS="-O2 -Wall -g" ++ CXXFLAGS="-g $CXXFLAGS" + else + AC_MSG_RESULT([no]) +- CXXFLAGS="-O2 -Wall" + fi + , + AC_MSG_RESULT([no]) +- CXXFLAGS="-O2 -Wall" + ) + + dnl check if randomness should be disabled -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
