From 792c4ddf5ae1774152e88fbf871e3e60874ea67a Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 30 Apr 2015 21:48:16 +0000 Subject: math/fityk: unbreak build on 8.x/9.x (gcc 4.8) Add -std=c++11 to fix /usr/local/include/wx-3.0/wx/strvararg.h:25:27: error: type_traits: No such file or directory which itself exposes guess.cpp:20:7: error: unknown type name 'array' const array Guess::linear_traits = ^ sidebar.cpp:900:52: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] + s2wx(format1("%.10"REALT_LENGTH_MOD"g", a))); ^ Reported by: pkg-fallout Approved by: portmgr blanket MFH: 2015Q2 (only USES due to lack of r383466) --- math/fityk/Makefile | 6 ++++-- math/fityk/files/patch-src__guess.cpp | 12 ++++++++++++ math/fityk/files/patch-src__wxgui__sidebar.cpp | 11 +++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 math/fityk/files/patch-src__guess.cpp create mode 100644 math/fityk/files/patch-src__wxgui__sidebar.cpp (limited to 'math/fityk') diff --git a/math/fityk/Makefile b/math/fityk/Makefile index 451b81c605cf..2eb288fe283e 100644 --- a/math/fityk/Makefile +++ b/math/fityk/Makefile @@ -3,7 +3,7 @@ PORTNAME= fityk PORTVERSION= 0.9.8 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= math MASTER_SITES= GHC SF/xylib:xylib DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:DEFAULT \ @@ -19,11 +19,13 @@ BUILD_DEPENDS= ${LOCALBASE}/include/boost/spirit/include/classic_core.hpp:${PORT gnuplot:${PORTSDIR}/math/gnuplot RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot -USES= desktop-file-utils gmake libtool shared-mime-info tar:bzip2 +USES= compiler:c++11-lib desktop-file-utils gmake libtool \ + shared-mime-info tar:bzip2 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} LDFLAGS+= -lbz2 -lz USE_GITHUB= yes GH_ACCOUNT= wojdyr +USE_CXXSTD= c++11 USE_GNOME= gtk20 USE_WX= 3.0 WX_CONF_ARGS= absolute diff --git a/math/fityk/files/patch-src__guess.cpp b/math/fityk/files/patch-src__guess.cpp new file mode 100644 index 000000000000..b71ae44c0bba --- /dev/null +++ b/math/fityk/files/patch-src__guess.cpp @@ -0,0 +1,12 @@ +--- src/guess.cpp.orig 2011-06-04 00:10:02 UTC ++++ src/guess.cpp +@@ -15,7 +15,8 @@ + #include "settings.h" + + using namespace std; +-using boost::array; ++// Macro to avoid ambiguity with std::array (C++11) ++#define array boost::array + + const array Guess::linear_traits = + {{ "slope", "intercept", "avgy" }}; diff --git a/math/fityk/files/patch-src__wxgui__sidebar.cpp b/math/fityk/files/patch-src__wxgui__sidebar.cpp new file mode 100644 index 000000000000..d123d102cd62 --- /dev/null +++ b/math/fityk/files/patch-src__wxgui__sidebar.cpp @@ -0,0 +1,11 @@ +--- src/wxgui/sidebar.cpp.orig 2015-04-30 21:04:15 UTC ++++ src/wxgui/sidebar.cpp +@@ -897,7 +897,7 @@ void SideBar::update_func_inf() + realt a; + if (func->get_center(&a)) + inf->AppendText(wxT("Center: ") +- + s2wx(format1("%.10"REALT_LENGTH_MOD"g", a))); ++ + s2wx(format1("%.10" REALT_LENGTH_MOD "g", a))); + if (func->get_area(&a)) + inf->AppendText(wxT("\nArea: ") + s2wx(S(a))); + if (func->get_height(&a)) -- cgit v1.2.3