Index: head/astro/opencpn/Makefile =================================================================== --- head/astro/opencpn/Makefile (revision 423564) +++ head/astro/opencpn/Makefile (revision 423565) @@ -1,39 +1,41 @@ # $FreeBSD$ PORTNAME= opencpn PORTVERSION= 4.4.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= astro geography MAINTAINER= freebsd@netfence.it COMMENT= Concise ChartPlotter/Navigator LICENSE= GPLv2+ LIB_DEPENDS= libportaudio.so:audio/portaudio \ libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 \ libtinyxml.so:textproc/tinyxml USE_GITHUB= yes GH_ACCOUNT= ${GH_PROJECT} GH_PROJECT= OpenCPN USES= cmake compiler:c++11-lib execinfo gettext-tools localbase USE_CXXSTD= c++11 USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk20 USE_WX= 3.0+ USE_XORG= x11 INSTALLS_ICONS= yes CMAKE_ARGS= -DBUNDLE_DOCS=ON -DBUNDLE_GSHHS=CRUDE -DBUNDLE_TCDATA=ON +LDFLAGS+= -Wl,-E # plugins LDFLAGS+= -Wl,--as-needed # ICE, SM, Xext post-patch: @${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},' \ ${WRKSRC}/src/mygdal/cpl_csv.cpp \ ${WRKSRC}/src/mygdal/cpl_findfile.cpp \ ${WRKSRC}/data/doc/help_en_US.html .include Index: head/astro/opencpn/files/patch-no-std =================================================================== --- head/astro/opencpn/files/patch-no-std (revision 423564) +++ head/astro/opencpn/files/patch-no-std (revision 423565) @@ -1,92 +1,109 @@ OpenCPN-4.4.0/src/chart1.cpp: In member function 'virtual int MyApp::OnExit()': OpenCPN-4.4.0/src/chart1.cpp:2174:13: error: call of overloaded 'isnan(double&)' is ambiguous if( wxIsNaN(gCog) ) cog.Printf( _T("COG ----- ") ); ^ OpenCPN-4.4.0/src/chart1.cpp:2174:13: note: candidates are: In file included from /usr/local/include/wx-3.0/wx/math.h:18:0, from /usr/local/include/wx-3.0/wx/gdicmn.h:23, from /usr/local/include/wx-3.0/wx/event.h:20, from /usr/local/include/wx-3.0/wx/wx.h:24, from OpenCPN-4.4.0/src/chart1.cpp:28: /usr/include/math.h:234:6: note: int isnan(double) int (isnan)(double) __pure2; ^ In file included from /usr/local/include/wx-3.0/wx/math.h:58:0, from /usr/local/include/wx-3.0/wx/gdicmn.h:23, from /usr/local/include/wx-3.0/wx/event.h:20, from /usr/local/include/wx-3.0/wx/wx.h:24, from OpenCPN-4.4.0/src/chart1.cpp:28: /usr/local/lib/gcc48/include/c++/cmath:626:3: note: constexpr bool std::isnan(long double) isnan(long double __x) ^ /usr/local/lib/gcc48/include/c++/cmath:622:3: note: constexpr bool std::isnan(double) isnan(double __x) ^ /usr/local/lib/gcc48/include/c++/cmath:618:3: note: constexpr bool std::isnan(float) isnan(float __x) ^ In file included from OpenCPN-4.4.0/src/routeprintout.cpp:32: In file included from /usr/local/include/wx-3.0/wx/wx.h:15: In file included from /usr/local/include/wx-3.0/wx/object.h:19: In file included from /usr/local/include/wx-3.0/wx/memory.h:15: In file included from /usr/local/include/wx-3.0/wx/string.h:4305: In file included from /usr/local/include/wx-3.0/wx/crt.h:19: /usr/local/include/wx-3.0/wx/wxcrt.h:577:14: error: call to 'wcsstr' is ambiguous { return wxCRT_StrstrW(haystack, needle); } ^~~~~~~~~~~~~ /usr/local/include/wx-3.0/wx/wxcrtbase.h:155:26: note: expanded from macro 'wxCRT_StrstrW' #define wxCRT_StrstrW wcsstr ^~~~~~ /usr/include/wchar.h:152:10: note: candidate function wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict) ^ /usr/include/c++/v1/cwchar:189:49: note: candidate function inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return ::wcsstr(__s1, __s2);} ^ --- include/printtable.h.orig 2016-06-25 12:26:20 UTC +++ include/printtable.h -@@ -27,7 +27,11 @@ +@@ -27,8 +27,6 @@ */ #include #include -using namespace std; -+using std::endl; +- + + #ifndef __PRINTTABLE_H__ + #define __PRINTTABLE_H__ +@@ -44,6 +42,10 @@ using namespace std; + #include "ocpn_types.h" + #include "navutil.h" + +using std::ostream; +using std::string; -+using std::stringstream; +using std::vector; - - - #ifndef __PRINTTABLE_H__ ++ + /** + * \brief + * Enumeration is used to notice the state of the table. --- include/routeprintout.h.orig 2016-06-25 12:26:20 UTC +++ include/routeprintout.h @@ -24,7 +24,6 @@ **************************************************************************/ #include -using namespace std; // FIXME: 'using namespace' must not be used in header files #ifndef __ROUTEPRINTOUT_H__ --- src/printtable.cpp.orig 2016-06-25 12:26:20 UTC +++ src/printtable.cpp @@ -28,7 +28,6 @@ #include #include #include -using namespace std; #include "wx/wxprec.h" +@@ -74,6 +73,9 @@ using namespace std; + + #include "printtable.h" + ++using std::endl; ++using std::stringstream; ++ + void PrintCell::Init( const wxString& _content, wxDC* _dc, int _width, int _cellpadding, bool _bold_font ) + { + bold_font = _bold_font; --- src/routeprintout.cpp.orig 2016-06-25 12:26:20 UTC +++ src/routeprintout.cpp @@ -24,7 +24,6 @@ **************************************************************************/ #include -using namespace std; #include "wx/wxprec.h" Index: head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp =================================================================== --- head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp (nonexistent) +++ head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp (revision 423565) @@ -0,0 +1,35 @@ +$NetBSD: patch-plugins_grib_pi_src_GribUIDialog.cpp,v 1.1 2016/06/16 15:52:56 bouyer Exp $ + +from https://github.com/OpenCPN/OpenCPN/pull/662 +fix grib plugin timeline request from crashing when no grib file is loaded + +--- plugins/grib_pi/src/GribUIDialog.cpp.orig 2016-06-25 12:26:20 UTC ++++ plugins/grib_pi/src/GribUIDialog.cpp +@@ -1251,11 +1251,14 @@ wxDateTime GRIBUICtrlBar::TimelineTime() + int tl = (m_TimeLineHours == 0) ? 0 : m_sTimeline->GetValue(); + int stepmin = m_OverlaySettings.GetMinFromIndex(m_OverlaySettings.m_SlicesPerUpdate); + return MinTime() + wxTimeSpan( tl * stepmin / 60, (tl * stepmin) % 60 ); +- } else { +- ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr(); +- int index = m_cRecordForecast->GetCurrentSelection() < 1 ? 0 : m_cRecordForecast->GetCurrentSelection(); +- return rsa->Item(index).m_Reference_Time; + } ++ ++ ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr(); ++ int index = m_cRecordForecast->GetCurrentSelection() < 1 ? 0 : m_cRecordForecast->GetCurrentSelection(); ++ if(rsa && indexGetCount()) ++ return rsa->Item(index).m_Reference_Time; ++ ++ return wxDateTime::Now(); + } + + wxDateTime GRIBUICtrlBar::MinTime() +@@ -1265,7 +1268,7 @@ wxDateTime GRIBUICtrlBar::MinTime() + GribRecordSet &first = rsa->Item(0); + return first.m_Reference_Time; + } +- return wxDateTime(0.0); ++ return wxDateTime::Now(); + } + + GribTimelineRecordSet* GRIBUICtrlBar::GetTimeLineRecordSet(wxDateTime time) Property changes on: head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/opencpn/files/patch-src_chart1.cpp =================================================================== --- head/astro/opencpn/files/patch-src_chart1.cpp (revision 423564) +++ head/astro/opencpn/files/patch-src_chart1.cpp (revision 423565) @@ -1,39 +1,57 @@ --- src/chart1.cpp.orig 2016-06-25 12:26:20 UTC +++ src/chart1.cpp @@ -10308,7 +10308,11 @@ extern "C" int wait(int *); #include #include +#ifdef __linux__ #include +#else +#include +#endif #endif @@ -10374,16 +10378,24 @@ int paternFilter (const struct dirent * int isTTYreal(const char *dev) { +#ifdef __linux__ struct serial_struct serinfo; +#else + struct termios termAttr; +#endif int ret = 0; int fd = open(dev, O_RDWR | O_NONBLOCK | O_NOCTTY); // device name is pointing to a real device if(fd >= 0) { +#ifdef __linux__ if (ioctl(fd, TIOCGSERIAL, &serinfo)==0) { // If device type is no PORT_UNKNOWN we accept the port if (serinfo.type != PORT_UNKNOWN) +#else + if (tcgetattr(fd, &termAttr) == 0) { +#endif ret = 1; } close (fd); +@@ -10409,10 +10421,17 @@ wxArrayString *EnumerateSerialPorts( voi + + //Initialize the pattern table + if( devPatern[0] == NULL ) { ++#ifdef __linux__ + paternAdd ( "ttyUSB" ); + paternAdd ( "ttyACM" ); + paternAdd ( "ttyGPS" ); + paternAdd ( "refcom" ); ++#else ++ paternAdd ( "ttyU" ); ++ paternAdd ( "ttyu" ); ++ paternAdd ( "ttyd" ); ++ paternAdd ( "gps" ); ++#endif + } + + // Looking for user privilege openable devices in /dev