1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

astro/opencpn: Update to 5.2.4

- New Plugin Management System
- Support for signalK input data streams
- New Head-Up Navigation Mode
- Docking the Dashboard with dual canvases
- Realtime prediction of AIS target location

Changelog: https://opencpn.org/OpenCPN/about/ver520.html

PR:		252168
Submitted by:	Andrea Venturoli <ml@netfence.it> (maintainer)
Approved by:	arrowd (mentor)
Differential Revision:	https://reviews.freebsd.org/D27798
This commit is contained in:
Rainer Hurling 2021-01-05 20:05:00 +00:00
parent a8f07a41e4
commit a402038101
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=560424
9 changed files with 1131 additions and 1044 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= opencpn
PORTVERSION= 5.2.0
PORTVERSION= 5.2.4
DISTVERSIONPREFIX= v
CATEGORIES= astro geography
@ -13,47 +13,50 @@ LICENSE_FILE= ${WRKSRC}/COPYING.gplv2
LIB_DEPENDS= libportaudio.so:audio/portaudio \
libcurl.so:ftp/curl \
libexif.so:graphics/libexif \
libexpat.so:textproc/expat2 \
libsndfile.so:audio/libsndfile \
libtinyxml.so:textproc/tinyxml \
liblz4.so:archivers/liblz4
USES= cmake compiler:c++11-lang gettext-tools gl gnome \
localbase pkgconfig sqlite xorg
libarchive localbase pkgconfig sqlite xorg
USE_CXXSTD= c++11
USE_GITHUB= yes
GH_ACCOUNT= ${GH_PROJECT}
GH_PROJECT= OpenCPN
USE_GL= gl
USE_GL= gl glu
USE_GNOME= cairo gdkpixbuf2 gtk30 pango
INSTALLS_ICONS= yes
USE_LDCONFIG= ${PREFIX}/lib/opencpn
USE_WX= 3.0+
WX_CONF_ARGS= absolute
WX_PREMK= yes
USE_XORG= ice sm x11 xext
CMAKE_ARGS= -DOCPN_BUNDLE_GSHHS=CRUDE
CMAKE_ON= OCPN_BUNDLE_TCDATA OCPN_FORCE_GTK3
CMAKE_ON= OCPN_BUNDLE_TCDATA OCPN_FORCE_GTK3 # OCPN_USE_CRASHREPORT
CMAKE_OFF= OCPN_USE_NEWSERIAL
OPTIONS_DEFINE= DOCS
OPTIONS_DEFINE= DOCS
OPTIONS_SUB= yes
DOCS_CMAKE_ON= -DOCPN_BUNDLE_DOCS:STRING="ON"
DOCS_CMAKE_OFF= -DOCPN_BUNDLE_DOCS:STRING="OFF"
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64
CMAKE_ARGS+= -DHAVE_MSSE=OFF -DHAVE_MSSE2=OFF -DHAVE_MSSE3=OFF -DHAVE_MAVX2=OFF -DHAVE_MFPU_NEON=OFF
.endif
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},' \
${WRKSRC}/libs/gdal/src/cpl_csv.cpp \
${WRKSRC}/libs/gdal/src/cpl_findfile.cpp \
${WRKSRC}/data/doc/help_en_US.html
@${REINPLACE_CMD} \
-e 's,wx-config,${WX_CONFIG},' \
-e 's,$${PREFIX_PKGDATA}/doc,${DOCSDIR},g' \
${WRKSRC}/CMakeLists.txt
.if ${ARCH} != amd64 && ${ARCH} != i386
@${REINPLACE_CMD} -e '/-msse/d' -e '/-mssse3/d' \
-e '/-mavx2/d' ${WRKSRC}/CMakeLists.txt
.endif
post-install-DOCS-on:
${CP} -R ${WRKSRC}/Docs/OSENC ${STAGEDIR}${DOCSDIR}/OSENC.docx
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1599147212
SHA256 (OpenCPN-OpenCPN-v5.2.0_GH0.tar.gz) = f6ec38989bc38f5a7f63234c5e0230adeb73f5626b4e3d3dfa680f0c240badc7
SIZE (OpenCPN-OpenCPN-v5.2.0_GH0.tar.gz) = 78313969
TIMESTAMP = 1605894801
SHA256 (OpenCPN-OpenCPN-v5.2.4_GH0.tar.gz) = 8b25a6bb8d52abac0f8c004a1c8297ce3fba0798dedd973b87344d18273db660
SIZE (OpenCPN-OpenCPN-v5.2.4_GH0.tar.gz) = 81226481

View File

@ -1,8 +1,8 @@
--- CMakeLists.txt.orig 2020-07-15 18:02:29 UTC
--- CMakeLists.txt.orig 2020-10-22 23:20:06 UTC
+++ CMakeLists.txt
@@ -2221,7 +2221,7 @@ if (NOT APPLE)
FILES ${CMAKE_BINARY_DIR}/opencpn.appdata.xml
@@ -2230,7 +2230,7 @@ if (NOT APPLE)
DESTINATION ${PREFIX_DATA}/metainfo
RENAME opencpn.appdata.xml
)
- install(FILES opencpn.1 DESTINATION ${PREFIX_DATA}/man/man1)
+ install(FILES opencpn.1 DESTINATION ${PREFIX_DATA}/../man/man1)

View File

@ -1,8 +1,8 @@
--- cmake/TargetSetup.cmake.orig 2020-07-15 18:02:29 UTC
--- cmake/TargetSetup.cmake.orig 2020-10-22 23:20:06 UTC
+++ cmake/TargetSetup.cmake
@@ -26,14 +26,10 @@ elseif (APPLE)
execute_process(COMMAND "sw_vers" "-productVersion"
OUTPUT_VARIABLE PKG_TARGET_VERSION)
@@ -39,14 +39,14 @@ elseif(_wx_selected_config MATCHES "androideabi-qt")
endif(ANDROID_ARCH MATCHES "arm64")
elseif (UNIX)
- find_program(LSB_RELEASE NAMES lsb_release)
- if (NOT LSB_RELEASE)
@ -10,11 +10,15 @@
- "Cannot find the lsb_release program, please install.")
- endif ()
- execute_process(COMMAND ${LSB_RELEASE} "-is"
+ find_program(LSB_RELEASE NAMES uname)
+ execute_process(COMMAND ${LSB_RELEASE} "-s"
+# find_program(LSB_RELEASE NAMES lsb_release)
+# if (NOT LSB_RELEASE)
+# message(FATAL_ERROR
+# "Cannot find the lsb_release program, please install.")
+# endif ()
+ execute_process(COMMAND uname "-i"
OUTPUT_VARIABLE PKG_TARGET)
- execute_process(COMMAND ${LSB_RELEASE} "-rs"
+ execute_process(COMMAND ${LSB_RELEASE} "-r"
+ execute_process(COMMAND uname "-r"
OUTPUT_VARIABLE PKG_TARGET_VERSION)
else ()
set(PKG_TARGET "unknown")

View File

@ -0,0 +1,11 @@
--- libs/wxcurl/include/wx/curl/thread.h.orig 2020-10-22 23:20:06 UTC
+++ libs/wxcurl/include/wx/curl/thread.h
@@ -43,7 +43,7 @@ enum wxCurlThreadError
};
//! The stack size for wxCurl threads.
-#define wxCURL_THREAD_STACK_SIZE 2048
+#define wxCURL_THREAD_STACK_SIZE 1024
// ----------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
--- src/PluginPaths.cpp.orig 2020-10-22 23:20:06 UTC
+++ src/PluginPaths.cpp
@@ -214,7 +214,7 @@ PluginPaths::PluginPaths()
else if (g_Platform->isFlatpacked()) {
initFlatpackPaths();
}
- else if (osSystemId & wxOS_UNIX_LINUX) {
+ else if (osSystemId & wxOS_UNIX_LINUX || osSystemId & wxOS_UNIX_FREEBSD) {
#ifdef __OCPN__ANDROID__
initAndroidPaths();
#else

View File

@ -1,6 +1,6 @@
--- src/chart1.cpp.orig 2020-07-15 18:02:29 UTC
+++ src/chart1.cpp
@@ -8226,7 +8226,7 @@ void MyFrame::MouseEvent( wxMouseEvent& event )
@@ -8244,7 +8244,7 @@ void MyFrame::MouseEvent( wxMouseEvent& event )
#endif
#ifdef __WXGTK__
@ -9,7 +9,13 @@
#endif
#if defined(__linux__)
@@ -10370,6 +10370,8 @@ extern "C" int wait(int *); // POS
@@ -10382,10 +10382,14 @@
#if defined(__UNIX__) && !defined(__OCPN__ANDROID__) && !defined(__WXOSX__)
extern "C" int wait(int *); // POSIX wait() for process
+#include <sys/param.h>
#include <termios.h>
+#include <fcntl.h>
#include <sys/ioctl.h>
#ifdef __linux__
#include <linux/serial.h>
@ -18,48 +24,88 @@
#endif
#endif
@@ -10445,17 +10447,25 @@ int isTTYreal(const char *dev)
@@ -10452,7 +10456,8 @@
int isTTYreal(const char *dev)
{
-#ifdef __NetBSD__
+#ifdef __FreeBSD__
+ wxLogMessage( _T("FreeBSD") );
if (strncmp("/dev/tty0", dev, 9) == 0)
return 1;
if (strncmp("/dev/ttyU", dev, 9) == 0)
@@ -10460,24 +10465,32 @@
if (strcmp("/dev/gps", dev) == 0)
return 1;
return 0;
#else /* !NetBSD */
+#ifdef __linux__
struct serial_struct serinfo;
-#else /* !NetBSD */
+#else
+ struct termios termattr;
+#endif
+#ifdef __FreeBSD__
+ struct termios termAttr;
+#else
struct serial_struct serinfo;
+#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__
+#ifdef __FreeBSD__
+ if (tcgetattr(fd, &termAttr) == 0) {
+#else
if (ioctl(fd, TIOCGSERIAL, &serinfo)==0) {
// If device type is no PORT_UNKNOWN we accept the port
if (serinfo.type != PORT_UNKNOWN)
- ret = 1;
+#else
+ if (tcgetattr(fd, &termattr) == 0) {
+#endif
+ ret = 1;
ret = 1;
}
close (fd);
}
@@ -10505,10 +10515,17 @@ wxArrayString *EnumerateSerialPorts( void )
return ret;
-#endif /* !NetBSD */
+#endif
}
@@ -10521,10 +10534,17 @@
//Initialize the pattern table
if( devPatern[0] == NULL ) {
+#ifdef __linux__
paternAdd ( "ttyUSB" );
paternAdd ( "ttyACM" );
paternAdd ( "ttyGPS" );
paternAdd ( "refcom" );
+#else
+#ifdef __FreeBSD__
+ paternAdd ( "ttyU" );
+ paternAdd ( "ttyu" );
+ paternAdd ( "ttyd" );
+ paternAdd ( "gps" );
+#else
paternAdd ( "ttyUSB" );
paternAdd ( "ttyACM" );
paternAdd ( "ttyGPS" );
paternAdd ( "refcom" );
+#endif
}
// Looking for user privilege openable devices in /dev
@@ -11019,6 +11039,12 @@
if(!result1.size())
wxExecute(_T("stat -c %G /dev/ttyACM0"), result1);
+ if(!result1.size())
+ wxExecute(_T("stat -f %g /dev/ttyu0"), result1);
+
+ if(!result1.size())
+ wxExecute(_T("stat -f %g /dev/ttyU0"), result1);
+
wxString msg1 = _("OpenCPN requires access to serial ports to use serial NMEA data.\n");
if(!result1.size()) {
wxString msg = msg1 + _("No Serial Ports can be found on this system.\n\
@@ -11032,7 +11058,7 @@
wxString user = wxGetUserId(), group = result1[0];
wxArrayString result2;
- wxExecute(_T("groups ") + user, result2);
+ wxExecute(_T("id -G ") + user, result2);
if(result2.size()) {
wxString user_groups = result2[0];

View File

@ -0,0 +1,11 @@
--- src/glChartCanvas.cpp.orig 2020-10-22 23:20:06 UTC
+++ src/glChartCanvas.cpp
@@ -57,7 +57,7 @@ class OCPNStopWatch (private)
#if defined(__OCPN__ANDROID__)
#include "androidUTIL.h"
-#elif defined(__WXQT__)
+#else
#include <GL/glx.h>
#endif

File diff suppressed because it is too large Load Diff