Unbreak with clang6, and respect CXXFLAGS

Based on a diff from Matthew Martin.
This commit is contained in:
jca 2018-04-13 11:13:31 +00:00
parent 559c139184
commit c2cf13c270
2 changed files with 39 additions and 3 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.14 2017/11/21 00:13:03 naddy Exp $
# $OpenBSD: Makefile,v 1.15 2018/04/13 11:13:31 jca Exp $
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>

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-configure_in,v 1.1 2018/04/13 11:13:31 jca Exp $
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