diff options
author | M.Dinslage <daedra1980@gmail.com> | 2019-04-06 05:47:02 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-04-06 06:50:15 +0700 |
commit | 4473c98f20b17650f8430c0179f8a8e46b7a289a (patch) | |
tree | 3d4e64bfd769c6d3b2b8f4c6c876bb02f344b57d | |
parent | f9cdef357bb2e32cc2f4b1238bf53fed62c721d8 (diff) | |
download | slackbuilds-4473c98f20b17650f8430c0179f8a8e46b7a289a.tar.gz |
gis/opencpn: Updated for version 5.0.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | gis/opencpn/README | 18 | ||||
-rw-r--r-- | gis/opencpn/opencpn.SlackBuild | 34 | ||||
-rw-r--r-- | gis/opencpn/opencpn.info | 10 | ||||
-rw-r--r-- | gis/opencpn/patches/cmake_build_fix.patch | 79 | ||||
-rw-r--r-- | gis/opencpn/patches/honor_mandir.patch | 20 | ||||
-rw-r--r-- | gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch (renamed from gis/opencpn/opencpn-4.4.0-multilib-strict.patch) | 1 |
6 files changed, 147 insertions, 15 deletions
diff --git a/gis/opencpn/README b/gis/opencpn/README index 1c6dfc8736..13429d3b66 100644 --- a/gis/opencpn/README +++ b/gis/opencpn/README @@ -3,9 +3,15 @@ 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. -wxGTK3 is a required dependency, however you can use wxGTK or -wxPython instead if you prefer. If decide to use wxGTK you will -have to recompile wxGTK with the --enable-graphics_ctx option -because it is not enabled in the default slackbuild and is -required by opencpn. The --enable-graphics_ctx option is enabled -by default in the wxGTK3 and wxPython slackbuilds. +If you are upgrading or installing new, OpenCPN 5.x now requires +that wxGTK3 be built with webkitgtk support. So you will have to +install webkitgtk available here at SBo, then build and install +wxGTK3. + +OpenCPN only looks for plugins in the "lib" directories. So on +x86_64 we have to pass an environment variable to use plugins. +The menu launcher will automatically set this for you, however +if you choose to launch OpenCPN from the command line you must +launch it with this command to get plugin support on x86_64. + +OPENCPN_PLUGIN_DIRS="/usr/lib64/opencpn" opencpn diff --git a/gis/opencpn/opencpn.SlackBuild b/gis/opencpn/opencpn.SlackBuild index a9225645b8..f0d12e610b 100644 --- a/gis/opencpn/opencpn.SlackBuild +++ b/gis/opencpn/opencpn.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for opencpn -# Copyright 2016 Matt Dinslage, Springfield, MO +# Copyright 2019 Matt Dinslage, Springfield, MO # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=opencpn -VERSION=${VERSION:-4.8.8} +VERSION=${VERSION:-5.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -70,8 +70,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -#honor LIBDIRSUFFIX -patch -p1 < $CWD/opencpn-4.4.0-multilib-strict.patch +# Apply patches to fix following issues... +# Honor MANDIR +# Honor LIBSUFFIXDIR +# Fix building with newer cmake versions +for patch in $CWD/patches/* ; do + patch -p1 < $patch +done + +# opencpn does not have specific checks for Slackware so it +# defautls to a i386 arch. Change this for x86_64 +if [ "$ARCH" = "x86_64" ]; then + sed -i '0,/i386/s//x86_64/' CMakeLists.txt +fi mkdir -p build cd build @@ -91,12 +102,27 @@ cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a INSTALL README data/doc/help_en_US.html data/license.txt $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION rm -rf $PKG/usr/share/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Add an icon to /usr/share/pixmaps so menu launcher has icon +mkdir -p $PKG/usr/share/pixmaps +convert $PKG/usr/share/icons/hicolor/scalable/apps/opencpn.svg -resize 256x256 \ + $PKG/usr/share/pixmaps/opencpn.png + +# OpenCPN only looks for plugins in the "lib" directories. We +# have to set an evnironment variable in order for OpenCPN to +# find plugins in "lib64" +if [ "$ARCH" = "x86_64" ]; then + sed -i 's,Exec=opencpn,Exec=env OPENCPN_PLUGIN_DIRS="/usr/lib64/opencpn" opencpn,g' $PKG/usr/share/applications/opencpn.desktop +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/gis/opencpn/opencpn.info b/gis/opencpn/opencpn.info index 3fce33c1dd..b90d60ab9f 100644 --- a/gis/opencpn/opencpn.info +++ b/gis/opencpn/opencpn.info @@ -1,10 +1,10 @@ PRGNAM="opencpn" -VERSION="4.8.8" -HOMEPAGE="https://opencpn.org/ocpn/" -DOWNLOAD="https://github.com/OpenCPN/OpenCPN/archive/v4.8.8/OpenCPN-4.8.8.tar.gz" -MD5SUM="5392999e278b63a61f5dec78d2539280" +VERSION="5.0.0" +HOMEPAGE="https://opencpn.org/" +DOWNLOAD="https://github.com/OpenCPN/OpenCPN/archive/v5.0.0/OpenCPN-5.0.0.tar.gz" +MD5SUM="a6e79c2c6f64037be1894b48b9a1014a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="gpsd tinyxml libmspack portaudio wxGTK3" +REQUIRES="gpsd tinyxml libmspack portaudio webkitgtk wxGTK3" MAINTAINER="M.Dinslage" EMAIL="daedra1980@gmail.com" diff --git a/gis/opencpn/patches/cmake_build_fix.patch b/gis/opencpn/patches/cmake_build_fix.patch new file mode 100644 index 0000000000..aca98fe9f0 --- /dev/null +++ b/gis/opencpn/patches/cmake_build_fix.patch @@ -0,0 +1,79 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcec1191a..8df2a9e21 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -408,9 +408,9 @@ IF((_wx_selected_config MATCHES "qt-armv7")) + ENDIF() + + IF((_wx_selected_config MATCHES "qt-armv7")) +- SET(wxWidgets_USE_LIBS base core xml html adv aui) ++ SET(wxWidgets_FIND_COMPONENTS base core xml html adv aui) + ELSE() +- SET(wxWidgets_USE_LIBS net xml html adv aui core base webview) ++ SET(wxWidgets_FIND_COMPONENTS net xml html adv aui core base webview) + ENDIF() + + OPTION (USE_GL "Enable OpenGL support" ON) +@@ -436,7 +436,7 @@ IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) AND CMAKE_SYSTEM_NAME MATCHES ".*Li + SET(OPENGLES_FOUND "YES") + SET(OPENGL_FOUND "YES") + +- SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl ) ++ SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl ) + add_subdirectory(src/glshim) + + SET(OPENGL_LIBRARIES "GL_static" "EGL" "X11" "drm" ) +@@ -455,7 +455,7 @@ IF(QT_ANDROID) + SET(OPENGLES_FOUND "YES") + SET(OPENGL_FOUND "YES") + +- SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl ) ++ SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl ) + add_subdirectory(src/glshim) + ENDIF(QT_ANDROID) + +@@ -468,7 +468,7 @@ IF ((NOT OPENGLES_FOUND) AND (NOT QT_ANDROID)) + ENDIF(USE_GL) + + IF(OPENGL_FOUND) +- SET(wxWidgets_USE_LIBS gl ${wxWidgets_USE_LIBS} ) ++ SET(wxWidgets_FIND_COMPONENTS gl ${wxWidgets_FIND_COMPONENTS} ) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + + MESSAGE (STATUS "Found OpenGL...." ) +@@ -529,14 +529,14 @@ IF(NOT QT_ANDROID) + ENDIF(MSVC) + + IF(WIN32 OR APPLE OR QT_ANDROID) +- FIND_PACKAGE(wxWidgets) ++ FIND_PACKAGE(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS}) + if (wxWidgets_FOUND) + message(STATUS "Found wxWidgets webview add-on") + add_definitions(-DOCPN_USE_WEBVIEW) + else () +- list(REMOVE_ITEM wxWidgets_USE_LIBS webview) ++ list(REMOVE_ITEM wxWidgets_FIND_COMPONENTS webview) + message(STATUS "Could not find wxWidgets webview add-on") +- FIND_PACKAGE(wxWidgets REQUIRED) ++ FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS ${wxWidgets_FIND_COMPONENTS}) + endif () + IF(MSYS) + # this is to convert msys to windows paths, and handle the missing /usr +@@ -1053,14 +1053,14 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID) + set(wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --toolkit=gtk3) + MESSAGE(STATUS "Building against GTK3...") + ENDIF(GTK2_FOUND) +- FIND_PACKAGE(wxWidgets) ++ FIND_PACKAGE(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS}) + if (wxWidgets_FOUND) + message(STATUS "Found wxWidgets webview add-on") + add_definitions(-DOCPN_USE_WEBVIEW) + else () +- list(REMOVE_ITEM wxWidgets_USE_LIBS webview) ++ list(REMOVE_ITEM wxWidgets_FIND_COMPONENTS webview) + message(STATUS "Could not find wxWidgets webview add-on") +- FIND_PACKAGE(wxWidgets REQUIRED) ++ FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS ${wxWidgets_FIND_COMPONENTS}) + endif () + MESSAGE (STATUS "Found wxWidgets..." ) + MESSAGE (STATUS " wxWidgets Include: ${wxWidgets_INCLUDE_DIRS}") diff --git a/gis/opencpn/patches/honor_mandir.patch b/gis/opencpn/patches/honor_mandir.patch new file mode 100644 index 0000000000..8a92dd86c8 --- /dev/null +++ b/gis/opencpn/patches/honor_mandir.patch @@ -0,0 +1,20 @@ +diff -up OpenCPN-5.0.0/CMakeLists.txt.orig OpenCPN-5.0.0/CMakeLists.txt +--- OpenCPN-5.0.0/CMakeLists.txt.orig 2019-04-03 13:49:21.423885285 -0500 ++++ OpenCPN-5.0.0/CMakeLists.txt 2019-04-03 13:51:19.789880135 -0500 +@@ -91,6 +91,7 @@ SET(CMAKE_MODULE_PATH + ${CMAKE_SOURCE_DIR}/cmake + ) + ++SET(MAN_PATH "man/man1") + + set (CMAKE_CXX_STANDARD 11) + message(STATUS "Setting C++11 standard via cmake standard mechanism") +@@ -2422,7 +2423,7 @@ IF(NOT APPLE) + INSTALL(FILES src/bitmaps/other_svg_src/opencpn.svg DESTINATION ${PREFIX_DATA}/icons/hicolor/scalable/apps PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + INSTALL(FILES data/opencpn.desktop DESTINATION ${PREFIX_DATA}/applications PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) + INSTALL(FILES data/opencpn.appdata.xml DESTINATION ${PREFIX_DATA}/appdata PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) +- INSTALL(FILES opencpn.1 DESTINATION ${PREFIX_DATA}/man/man1 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) ++ INSTALL(FILES opencpn.1 DESTINATION ${MAN_PATH} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) + ENDIF(UNIX) + + ENDIF(NOT APPLE) diff --git a/gis/opencpn/opencpn-4.4.0-multilib-strict.patch b/gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch index f832e01a7e..877e7beb8c 100644 --- a/gis/opencpn/opencpn-4.4.0-multilib-strict.patch +++ b/gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch @@ -11,3 +11,4 @@ diff -up OpenCPN-4.4.0/CMakeLists.txt.orig OpenCPN-4.4.0/CMakeLists.txt IF(APPLE) IF (CMAKE_SIZEOF_VOID_P MATCHES "8") # IF (CMAKE_OSX_64) + |