Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Aug 2018 14:09:34 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478041 - in head/x11-toolkits/gtkmathview: . files
Message-ID:  <201808251409.w7PE9YiK031342@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Aug 25 14:09:34 2018
New Revision: 478041
URL: https://svnweb.freebsd.org/changeset/ports/478041

Log:
  x11-toolkits/gtkmathview: Fix build with Clang 6
  
  View.cc:294:10: error: no viable conversion from returned value of type 'bool' to function return type 'SmartPtr<Element>'
    return false;
           ^~~~~
  
  http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/errors/gtkmathview-0.8.0_9.log
  
  cmex10.cc:27:3: error: constant expression evaluates to 4205933842 which cannot be
        narrowed to type 'int' [-Wc++11-narrowing]
    0xfab17512,
    ^~~~~~~~~~
  
  SVG_RenderingContext.cc:67:25: error: invalid suffix on literal; C++11 requires a
        space between literal and identifier [-Wreserved-user-defined-literal]
    metadata("Created by "PACKAGE" version "VERSION);
                          ^

Added:
  head/x11-toolkits/gtkmathview/files/patch-src_backend_svg_SVG__RenderingContext.cc   (contents, props changed)
  head/x11-toolkits/gtkmathview/files/patch-src_engine_common_View.cc   (contents, props changed)
Modified:
  head/x11-toolkits/gtkmathview/Makefile

Modified: head/x11-toolkits/gtkmathview/Makefile
==============================================================================
--- head/x11-toolkits/gtkmathview/Makefile	Sat Aug 25 13:54:30 2018	(r478040)
+++ head/x11-toolkits/gtkmathview/Makefile	Sat Aug 25 14:09:34 2018	(r478041)
@@ -19,13 +19,15 @@ LIB_DEPENDS=	libpopt.so:devel/popt \
 		libgmetadom_gdome_cpp_smart.so:textproc/gmetadom
 
 GNU_CONFIGURE=	yes
-USES=		gmake libtool pathfix pkgconfig
+USES=		compiler gmake libtool pathfix pkgconfig
 USE_GNOME=	gtk20 libxml2 pangox-compat
 INSTALL_TARGET=	install-strip
 USE_LDCONFIG=	yes
 
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
+CXXFLAGS+=	${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
+CXXFLAGS_clang=	-Wno-c++11-narrowing
 
 post-patch:
 	@${REINPLACE_CMD} '/-lstdc++/d' ${WRKSRC}/src/Makefile.in \

Added: head/x11-toolkits/gtkmathview/files/patch-src_backend_svg_SVG__RenderingContext.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtkmathview/files/patch-src_backend_svg_SVG__RenderingContext.cc	Sat Aug 25 14:09:34 2018	(r478041)
@@ -0,0 +1,16 @@
+SVG_RenderingContext.cc:67:25: error: invalid suffix on literal; C++11 requires a
+      space between literal and identifier [-Wreserved-user-defined-literal]
+  metadata("Created by "PACKAGE" version "VERSION);
+                        ^
+
+--- src/backend/svg/SVG_RenderingContext.cc.orig	2018-08-25 14:04:53 UTC
++++ src/backend/svg/SVG_RenderingContext.cc
+@@ -64,7 +64,7 @@ void
+ SVG_RenderingContext::documentStart(const BoundingBox& bbox)
+ {
+   beginDocument(bbox);
+-  metadata("Created by "PACKAGE" version "VERSION);
++  metadata("Created by " PACKAGE " version " VERSION);
+ }
+ 
+ void

Added: head/x11-toolkits/gtkmathview/files/patch-src_engine_common_View.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/gtkmathview/files/patch-src_engine_common_View.cc	Sat Aug 25 14:09:34 2018	(r478041)
@@ -0,0 +1,15 @@
+View.cc:294:10: error: no viable conversion from returned value of type 'bool' to function return type 'SmartPtr<Element>'
+  return false;
+         ^~~~~
+
+--- src/engine/common/View.cc.orig	2018-08-25 13:57:22 UTC
++++ src/engine/common/View.cc
+@@ -291,7 +291,7 @@ View::getCharAt(const scaled& x, const scaled& y, Char
+ 	  }
+     }
+ 
+-  return false;
++  return 0;
+ }
+ 
+ bool



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808251409.w7PE9YiK031342>