This synfig at run-time, unbreaking (at least) synfigstudio build.

I'm not skilled enough to find the root cause quickly, but this at least
allows bulk builds to continue. According to espie@, building with clang
doesn't result in such problems.

Okay? Or should it better to drop the DEBUG-related chunk? The reason
for it is that configure script replaces -O* in CXXFLAGS with value
coming from --enable-optimization; if there was none, it "autodetects".

--
  WBR,
    Vadim Zhukov


Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/synfig/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    23 Jul 2017 10:49:37 -0000      1.14
+++ Makefile    24 Jul 2017 14:39:24 -0000
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.14 2017/07/23 10:49:37 zhuk Exp $
 
 COMMENT =              2D animation software
-REVISION =             4
+REVISION =             5
 
 V=                     1.0.1
 DISTNAME =             synfig-$V
@@ -45,11 +45,18 @@ LIB_DEPENDS =               archivers/xz \
                        multimedia/mlt \
                        textproc/libxml++
 
-CONFIGURE_ENV =                CPPFLAGS="-I${LOCALBASE}/include" \
-                       CXXFLAGS="-std=c++11" \
-                       LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ENV =                CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+                       CXXFLAGS="${CXXFLAGS} -std=c++11" \
+                       LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
 CONFIGURE_STYLE =      gnu
-CONFIGURE_ARGS =       --without-included-ltdl
+CONFIGURE_ARGS =       --without-included-ltdl \
+                       --enable-optimization=1
+
+.if defined(DEBUG)
+. if ${DEBUG:M-O*}
+CONFIGURE_ARGS +=      --enable-optimization=${DEBUG:M-O*:C/^-O//}
+. endif
+.endif
 
 FAKE_FLAGS =           sysconfdir=${PREFIX}/share/examples/synfig
 

Reply via email to