Skip to content

Commit

Permalink
*/*: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Oct 9, 2016
1 parent b016da3 commit 6ee9131
Show file tree
Hide file tree
Showing 277 changed files with 2,313 additions and 860 deletions.
2 changes: 1 addition & 1 deletion archivers/rpm4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= rpm
PORTVERSION= 4.12.0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= archivers
MASTER_SITES= http://rpm.org/releases/rpm-${PORTVERSION:R:R}.x/
PKGNAMESUFFIX= 4
Expand Down
1 change: 1 addition & 0 deletions astro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
SUBDIR += mkgmap-splitter
SUBDIR += mymoon
SUBDIR += nightfall
SUBDIR += opencpn
SUBDIR += openuniverse
SUBDIR += osmium
SUBDIR += osmosis
Expand Down
41 changes: 41 additions & 0 deletions astro/opencpn/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# $FreeBSD$

PORTNAME= opencpn
PORTVERSION= 4.4.0
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= astro geography

MAINTAINER= [email protected]
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 <bsd.port.mk>
3 changes: 3 additions & 0 deletions astro/opencpn/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1468844404
SHA256 (OpenCPN-OpenCPN-v4.4.0_GH0.tar.gz) = 577ae0fa44d31840e268b22c50b78130695fdfc796420514c93b238d5bde39b9
SIZE (OpenCPN-OpenCPN-v4.4.0_GH0.tar.gz) = 40840928
11 changes: 11 additions & 0 deletions astro/opencpn/files/patch-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2016-06-25 12:26:20 UTC
+++ CMakeLists.txt
@@ -1769,7 +1769,7 @@ ENDIF(UNIX)
# Certain older Cmake FindGTK2 modules ( e.g. cmake-2.8.0-2) do not yield all of the required link libraries
# So, add them manually. These declarations may be redundant in some architectures, but do no harm.
IF(UNIX)
-TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
+TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} execinfo )
ENDIF(UNIX)

IF(QT_LINUX)
109 changes: 109 additions & 0 deletions astro/opencpn/files/patch-no-std
Original file line number Diff line number Diff line change
@@ -0,0 +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,8 +27,6 @@
*/
#include <iostream>
#include <vector>
-using namespace std;
-

#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::vector;
+
/**
* \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 <iostream>
-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 <sstream>
#include <vector>
#include <algorithm>
-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 <iostream>
-using namespace std;

#include "wx/wxprec.h"

35 changes: 35 additions & 0 deletions astro/opencpn/files/patch-plugins_grib__pi_src_GribUIDialog.cpp
Original file line number Diff line number Diff line change
@@ -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)
57 changes: 57 additions & 0 deletions astro/opencpn/files/patch-src_chart1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +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 <termios.h>
#include <sys/ioctl.h>
+#ifdef __linux__
#include <linux/serial.h>
+#else
+#include <termios.h>
+#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
14 changes: 14 additions & 0 deletions astro/opencpn/files/patch-src_crashprint.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- src/crashprint.cpp.orig 2016-06-25 12:26:20 UTC
+++ src/crashprint.cpp
@@ -31,11 +31,9 @@
#endif

//! standard header
-#if defined(__linux__)
#include <execinfo.h> // Needed for backtrace
#include <cxxabi.h> // Needed for __cxa_demangle
#include <unistd.h>
-#endif

// wxWidgets headers
#include <wx/string.h> // strings support
6 changes: 6 additions & 0 deletions astro/opencpn/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OpenCPN is a free software project to create a concise chart plotter and
navigation software, for use underway or as a planning tool. OpenCPN is
developed by a team of active sailors using real world conditions for
program testing and refinement.

WWW: http://opencpn.org/
Loading

0 comments on commit 6ee9131

Please sign in to comment.