Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 04:32:45 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r423565 - in head/astro/opencpn: . files
Message-ID:  <201610090432.u994Wj1w035231@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Oct  9 04:32:45 2016
New Revision: 423565
URL: https://svnweb.freebsd.org/changeset/ports/423565

Log:
  astro/opencpn: minor fixup
  
  - Unbreak plugins runtime [1]
  - Better enumerate serial devices
  - Reduce std namespace pollution even more
  
  Obtained from:	PkgSrc
  PR:		211199

Added:
  head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp   (contents, props changed)
Modified:
  head/astro/opencpn/Makefile   (contents, props changed)
  head/astro/opencpn/files/patch-no-std   (contents, props changed)
  head/astro/opencpn/files/patch-src_chart1.cpp   (contents, props changed)

Modified: head/astro/opencpn/Makefile
==============================================================================
--- head/astro/opencpn/Makefile	Sun Oct  9 03:18:00 2016	(r423564)
+++ head/astro/opencpn/Makefile	Sun Oct  9 04:32:45 2016	(r423565)
@@ -3,6 +3,7 @@
 PORTNAME=	opencpn
 PORTVERSION=	4.4.0
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	astro geography
 
 MAINTAINER=	freebsd@netfence.it
@@ -28,6 +29,7 @@ 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:

Modified: head/astro/opencpn/files/patch-no-std
==============================================================================
--- head/astro/opencpn/files/patch-no-std	Sun Oct  9 03:18:00 2016	(r423564)
+++ head/astro/opencpn/files/patch-no-std	Sun Oct  9 04:32:45 2016	(r423565)
@@ -47,19 +47,26 @@ inline _LIBCPP_INLINE_VISIBILITY const w
 
 --- include/printtable.h.orig	2016-06-25 12:26:20 UTC
 +++ include/printtable.h
-@@ -27,7 +27,11 @@
+@@ -27,8 +27,6 @@
   */
  #include <iostream>
  #include <vector>
 -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 @@
@@ -80,6 +87,16 @@ inline _LIBCPP_INLINE_VISIBILITY const w
  
  #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 @@

Added: head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp	Sun Oct  9 04:32:45 2016	(r423565)
@@ -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 && index<rsa->GetCount())
++        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)

Modified: head/astro/opencpn/files/patch-src_chart1.cpp
==============================================================================
--- head/astro/opencpn/files/patch-src_chart1.cpp	Sun Oct  9 03:18:00 2016	(r423564)
+++ head/astro/opencpn/files/patch-src_chart1.cpp	Sun Oct  9 04:32:45 2016	(r423565)
@@ -37,3 +37,21 @@
                  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



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