Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2016 06:01:49 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r415875 - in head/editors: openoffice-4/files openoffice-devel/files
Message-ID:  <201605260601.u4Q61naB087053@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Thu May 26 06:01:49 2016
New Revision: 415875
URL: https://svnweb.freebsd.org/changeset/ports/415875

Log:
  Fix build of openoffice-4 and openoffice-devel with libc++ 3.8.0.
  
  Openffice defines its own overloaded variant of round(), which is
  only different in return type from the 'real' round() from <math.h>,
  so it is ambiguous (in the C++ lookup sense).  Fix this by renaming
  the custom round() to round_(), and using a define to minimize
  needed changes in the code.
  
  PR:		209588
  Submitted by:	dim

Added:
  head/editors/openoffice-4/files/patch-vcl_source_glyphs_graphite__layout.cxx   (contents, props changed)
  head/editors/openoffice-devel/files/patch-vcl_source_glyphs_graphite__layout.cxx   (contents, props changed)

Added: head/editors/openoffice-4/files/patch-vcl_source_glyphs_graphite__layout.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/openoffice-4/files/patch-vcl_source_glyphs_graphite__layout.cxx	Thu May 26 06:01:49 2016	(r415875)
@@ -0,0 +1,14 @@
+--- vcl/source/glyphs/graphite_layout.cxx.orig	2014-02-25 08:33:06 UTC
++++ vcl/source/glyphs/graphite_layout.cxx
+@@ -107,9 +107,10 @@ namespace
+     typedef ext_std::pair<gr::GlyphIterator, gr::GlyphIterator>       glyph_range_t;
+     typedef ext_std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t;
+ 
+-    inline long round(const float n) {
++    inline long round_(const float n) {
+         return long(n + (n < 0 ? -0.5 : 0.5));
+     }
++#define round round_
+ 
+ 
+     template<typename T>

Added: head/editors/openoffice-devel/files/patch-vcl_source_glyphs_graphite__layout.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/openoffice-devel/files/patch-vcl_source_glyphs_graphite__layout.cxx	Thu May 26 06:01:49 2016	(r415875)
@@ -0,0 +1,14 @@
+--- vcl/source/glyphs/graphite_layout.cxx.orig	2014-02-25 08:33:06 UTC
++++ vcl/source/glyphs/graphite_layout.cxx
+@@ -107,9 +107,10 @@ namespace
+     typedef ext_std::pair<gr::GlyphIterator, gr::GlyphIterator>       glyph_range_t;
+     typedef ext_std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t;
+ 
+-    inline long round(const float n) {
++    inline long round_(const float n) {
+         return long(n + (n < 0 ? -0.5 : 0.5));
+     }
++#define round round_
+ 
+ 
+     template<typename T>



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