aboutsummaryrefslogtreecommitdiff
path: root/gis/opencpn-plugin-oesenc
diff options
context:
space:
mode:
authorM.Dinslage <daedra1980@gmail.com>2018-07-24 11:01:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-28 08:51:47 +0700
commit82fd3deb56a1d067052086b18f5b14fe75f21747 (patch)
tree5b1f610db06b3aa9c7631daee2db4fcf6a9efb5b /gis/opencpn-plugin-oesenc
parentfce2db0928e129130f23d762dce7dcd476212c0f (diff)
gis/opencpn-plugin-oesenc: Added (oeSENC Charts Plugin).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'gis/opencpn-plugin-oesenc')
-rw-r--r--gis/opencpn-plugin-oesenc/CMakeLists.txt418
-rw-r--r--gis/opencpn-plugin-oesenc/README4
-rw-r--r--gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild102
-rw-r--r--gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info10
-rw-r--r--gis/opencpn-plugin-oesenc/slack-desc19
5 files changed, 553 insertions, 0 deletions
diff --git a/gis/opencpn-plugin-oesenc/CMakeLists.txt b/gis/opencpn-plugin-oesenc/CMakeLists.txt
new file mode 100644
index 0000000000000..8d02c822ebc21
--- /dev/null
+++ b/gis/opencpn-plugin-oesenc/CMakeLists.txt
@@ -0,0 +1,418 @@
+##---------------------------------------------------------------------------
+## Author: bdbcat aka. dsr (Dave Register)
+## Copyright:
+## License: wxWidgets License
+##---------------------------------------------------------------------------
+
+
+# define minimum cmake version
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
+# This should be 2.8.0 to have FindGTK2 module
+IF (COMMAND cmake_policy)
+ CMAKE_POLICY(SET CMP0003 OLD)
+ CMAKE_POLICY(SET CMP0005 OLD)
+ CMAKE_POLICY(SET CMP0011 OLD)
+ENDIF (COMMAND cmake_policy)
+
+PROJECT(oesenc_pi)
+
+SET(PACKAGE_NAME oesenc_pi)
+SET(VERBOSE_NAME oesenc)
+SET(PLUGIN_SOURCE_DIR .)
+MESSAGE (STATUS "*** Building ${PACKAGE_NAME} ***")
+
+SET(VERSION_MAJOR "1")
+SET(VERSION_MINOR "2")
+SET(VERSION_PATCH "0")
+SET(PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
+
+#SET(CMAKE_BUILD_TYPE Release)
+
+IF( NOT CMAKE_BUILD_TYPE )
+ SET( CMAKE_BUILD_TYPE Release CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+ FORCE )
+ENDIF( NOT CMAKE_BUILD_TYPE )
+
+MESSAGE (STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+
+SET(CMAKE_VERBOSE_MAKEFILE ON)
+
+IF (PREFIX)
+ SET(CMAKE_INSTALL_PREFIX ${PREFIX})
+ENDIF (PREFIX)
+
+SET(PREFIX_BIN bin)
+SET(PREFIX_INCLUDE include)
+SET(PREFIX_DATA share)
+SET(PREFIX_PKGDATA ${PREFIX_DATA}/${PACKAGE_NAME})
+
+IF (NOT WIN32)
+ # default
+ SET (ARCH "i386")
+ IF (UNIX AND NOT APPLE)
+ IF (PREFIX)
+ SET(CMAKE_INSTALL_PREFIX ${PREFIX})
+ ELSE (PREFIX )
+ SET(CMAKE_INSTALL_PREFIX "/usr")
+ ENDIF (PREFIX)
+
+ MESSAGE (STATUS "*** Will install to ${CMAKE_INSTALL_PREFIX} ***")
+
+ IF (EXISTS /etc/debian_version)
+ SET (PACKAGE_FORMAT "DEB")
+ SET (PACKAGE_DEPS "libc6, libwxgtk3.0-0, libglu1-mesa (>= 7.0.0) curl")
+ SET (LIB_INSTALL_DIR "lib")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "amd64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "i386")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ENDIF (EXISTS /etc/debian_version)
+ IF (EXISTS /etc/redhat-release)
+ SET (PACKAGE_FORMAT "RPM")
+ SET (PACKAGE_DEPS "opencpn")
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "x86_64")
+ SET (LIB_INSTALL_DIR "lib64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "i386")
+ SET (LIB_INSTALL_DIR "lib")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ENDIF (EXISTS /etc/redhat-release)
+ IF (EXISTS /etc/slackware-version)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "x86_64")
+ SET (LIB_INSTALL_DIR "lib64")
+ ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (ARCH "i386")
+ SET (LIB_INSTALL_DIR "lib")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ENDIF (EXISTS /etc/slackware-version)
+ ENDIF (UNIX AND NOT APPLE)
+endif(NOT WIN32)
+
+IF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+ SET (ARCH "armhf")
+ ADD_DEFINITIONS( -DARMHF )
+ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
+
+MESSAGE (STATUS "*** Build Architecture is ${ARCH}")
+MESSAGE (STATUS "*** LIB_INSTALL_DIR is ${LIB_INSTALL_DIR}")
+
+
+# To build for android, use this cmake invocation..
+#$cmake -DUSE_GARMINHOST=OFF -D_wx_selected_config=androideabi-qt
+#-DCMAKE_TOOLCHAIN_FILE=../buildandroid/build_android.cmake
+#-DwxQt_Build=build_android_55_intl -DwxQt_Base=/home/dsr/Projects/wxqt/wxWidgets
+#-DQt_Base=/home/dsr/Projects/qt5bare -DQt_Build=build_release/qtbase ..
+
+IF(DEFINED _wx_selected_config)
+
+# May be overridden
+IF(NOT DEFINED Qt_Build)
+ SET(Qt_Build "android_armv7")
+ENDIF(NOT DEFINED Qt_Build)
+
+MESSAGE (STATUS "selected config ${_wx_selected_config}")
+
+IF(_wx_selected_config MATCHES "androideabi-qt")
+ MESSAGE (STATUS "Building for wxQt-Android")
+ MESSAGE (STATUS "Qt_Base/Build: " ${Qt_Base} "/" ${Qt_Build})
+ MESSAGE (STATUS "wxQt_Base/Build: " ${wxQt_Base} "/" ${wxQt_Build})
+ SET(QT_ANDROID "ON")
+ SET(QT_LINUX "OFF")
+ SET(QT "ON")
+ENDIF(_wx_selected_config MATCHES "androideabi-qt")
+
+ENDIF(DEFINED _wx_selected_config)
+
+
+INCLUDE("cmake/PluginConfigure.cmake")
+
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/wxJSON)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/cpl)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/dsa)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+
+
+IF(NOT WIN32)
+ ADD_DEFINITIONS( "-Wall -g -fexceptions -O2 -Wno-unused -fno-strict-aliasing")
+
+ IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+ ADD_DEFINITIONS( " -O0")
+ ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
+
+ IF(NOT APPLE)
+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
+ ADD_DEFINITIONS( "-rdynamic" )
+ ELSE(NOT APPLE)
+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
+ ADD_DEFINITIONS( "-Wno-overloaded-virtual" )
+ ENDIF(NOT APPLE)
+
+ENDIF(NOT WIN32)
+
+
+# Add some definitions to satisfy MS
+IF(WIN32)
+ ADD_DEFINITIONS(-D__MSVC__)
+ ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
+ENDIF(WIN32)
+
+# Let cmake find additional modules private
+LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
+
+
+ADD_DEFINITIONS(-DTIXML_USE_STL)
+
+
+# For convenience we define the sources as a variable. You can add
+# header files and cpp/c files and CMake will sort them out
+
+
+
+SET(SRC_OESENC
+ src/oesenc_pi.h
+ src/oesenc_pi.cpp
+ src/eSENCChart.cpp
+ src/eSENCChart.h
+ src/Osenc.cpp
+ src/Osenc.h
+ src/mygeom.h
+ src/mygeom63.cpp
+ src/TexFont.cpp
+ src/TexFont.h
+ src/s52plib.cpp
+ src/s57RegistrarMgr.cpp
+ src/chartsymbols.cpp
+ src/s52cnsy.cpp
+ src/viewport.cpp
+ src/s52utils.cpp
+ src/bbox.cpp
+ src/OCPNRegion.cpp
+ src/LLRegion.cpp
+ src/cutil.cpp
+ src/tinyxml.cpp
+ src/tinyxmlerror.cpp
+ src/tinyxmlparser.cpp
+ src/razdsparser.cpp
+ )
+
+SET(SRC_CPL
+ src/cpl/cpl_config.h
+ src/cpl/cpl_conv.h
+ src/cpl/cpl_csv.h
+ src/cpl/cpl_error.h
+ src/cpl/cpl_port.h
+ src/cpl/cpl_string.h
+ src/cpl/cpl_vsi.h
+ src/cpl/cpl_conv.cpp
+ src/cpl/cpl_csv.cpp
+ src/cpl/cpl_error.cpp
+ src/cpl/cpl_findfile.cpp
+ src/cpl/cpl_path.cpp
+ src/cpl/cpl_string.cpp
+ src/cpl/cpl_vsisimple.cpp
+ )
+
+SET(SRC_ISO8211
+ src/myiso8211/ddffielddefn.cpp
+ src/myiso8211/ddfmodule.cpp
+ src/myiso8211/ddfrecord.cpp
+ src/myiso8211/ddfsubfielddefn.cpp
+ src/myiso8211/ddffield.cpp
+ src/myiso8211/ddfutils.cpp
+ )
+
+SET(SRC_DSA
+ src/dsa/dsa_utils.cpp
+ src/dsa/mp_math.c
+ src/dsa/sha1.c
+ )
+
+SET(SRC_S57ENC
+ src/mygdal/s57classregistrar.cpp
+)
+
+SET(SRC_JSON
+ src/wxJSON/json_defs.h
+ src/wxJSON/jsonreader.h
+ src/wxJSON/jsonval.h
+ src/wxJSON/jsonwriter.h
+ src/wxJSON/jsonreader.cpp
+ src/wxJSON/jsonval.cpp
+ src/wxJSON/jsonwriter.cpp
+ )
+
+IF(NOT QT_ANDROID)
+ SET(SRC_OSHOP
+ src/ochartShop.cpp
+ src/ochartShop.h
+ )
+ENDIF(NOT QT_ANDROID)
+
+OPTION(OCPN_USE_CURL "Use Curl libraries" ON)
+ADD_DEFINITIONS(-D__OCPN_USE_CURL__)
+
+IF(WIN32)
+ OPTION(OCPN_USE_EXTERN_CURL "Use external libcurl" OFF)
+ELSE(WIN32)
+ SET(OCPN_USE_EXTERN_CURL ON)
+ENDIF(WIN32)
+
+IF(NOT QT_ANDROID)
+
+ IF(OCPN_USE_EXTERN_CURL)
+ FIND_PACKAGE(CURL REQUIRED)
+ IF(CURL_FOUND)
+ MESSAGE (STATUS "Using SYSTEM curl library...${CURL_LIBRARIES}...${CURL_INCLUDE_DIR}")
+ ENDIF(CURL_FOUND)
+ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
+ ELSE(OCPN_USE_EXTERN_CURL)
+ INCLUDE("Curl.cmake")
+ MESSAGE (STATUS "Using local curl library...")
+ ENDIF(OCPN_USE_EXTERN_CURL)
+
+
+ IF(WIN32)
+ SET(SRC_WXCURL
+ src/wxcurl/base.cpp
+ src/wxcurl/dav.cpp
+ src/wxcurl/davtool.cpp
+ src/wxcurl/dialog.cpp
+ src/wxcurl/ftp.cpp
+ src/wxcurl/ftpparse.cpp
+ src/wxcurl/ftptool.cpp
+ src/wxcurl/http.cpp
+ src/wxcurl/panel.cpp
+ src/wxcurl/telnet.cpp
+ src/wxcurl/thread.cpp
+ src/wxcurl/utils.cpp
+ )
+ ENDIF(WIN32)
+
+# ADD_LIBRARY(WXCURL ${SRC_WXCURL})
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/wxcurl)
+# SET(EXTRA_LIBS ${EXTRA_LIBS} WXCURL)
+# SET(EXTRA_LIBS ${EXTRA_LIBS} ${CURL_LIBRARIES})
+
+ MESSAGE (STATUS "wxCurl configured...")
+
+ENDIF(NOT QT_ANDROID)
+
+IF(UNIX AND NOT APPLE)
+ INCLUDE("cmake/FindTinyXML.cmake")
+ FIND_PACKAGE(TinyXML QUIET)
+ENDIF(UNIX AND NOT APPLE)
+
+IF(TINYXML_FOUND)
+ message (STATUS "oeSENCr_pi building with system tinyxml")
+ INCLUDE_DIRECTORIES(${TINYXML_INCLUDE_DIR})
+ELSE(TINYXML_FOUND)
+ message (STATUS "oeSENC_pi building with embedded tinyxml")
+ INCLUDE_DIRECTORIES(src/tinyxml/)
+ENDIF(TINYXML_FOUND)
+ADD_DEFINITIONS(-DTIXML_USE_STL)
+
+
+ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_OESENC} ${SRC_CPL} ${SRC_ISO8211} ${SRC_DSA} ${SRC_S57ENC} ${SRC_JSON} ${SRC_OSHOP} ${SRC_WXCURL} ${SRC_LTINYXML})
+
+IF (QT_ANDROID )
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${OCPN_Core_LIBRARIES} )
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} "-lgnustl_shared")
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} "-lz" )
+ENDIF(QT_ANDROID)
+
+IF(WIN32)
+ SET(OPENCPN_IMPORT_LIB "C:/Projects/opencpn/build/${CMAKE_CFG_INTDIR}/opencpn.lib")
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${OPENCPN_IMPORT_LIB} )
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${CURL_LIBRARIES})
+
+ENDIF(WIN32)
+
+IF(NOT APPLE)
+TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${wxWidgets_LIBRARIES} )
+ENDIF(NOT APPLE)
+
+
+
+# Install any special data files or binary helpers here....
+# The PlugIn library itself and any "data" directory (with contents) gets installed in generic PluginInstall.cmake later
+
+IF(UNIX AND NOT APPLE)
+SET(PARENT opencpn)
+SET(PREFIX_PLUGINS ${LIB_INSTALL_DIR}/${PARENT})
+SET(PREFIX_PARENTBIN bin)
+SET(PREFIX_PARENTDATA ${PREFIX_DATA}/${PARENT})
+
+
+IF (ARCH MATCHES "amd64" OR ARCH MATCHES "x86_64")
+INSTALL(FILES "buildlinux64/oeserverd/oeserverd"
+ PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ DESTINATION ${PREFIX_PARENTBIN})
+ELSE (ARCH MATCHES "amd64" OR ARCH MATCHES "x86_64")
+
+ IF (ARCH MATCHES "arm*" )
+ INSTALL(FILES "buildlinuxarm/oeserverd/oeserverd"
+ PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ DESTINATION ${PREFIX_PARENTBIN})
+ ELSE (ARCH MATCHES "arm*" )
+ INSTALL(FILES "buildlinux/oeserverd/oeserverd"
+ PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ DESTINATION ${PREFIX_PARENTBIN})
+ ENDIF (ARCH MATCHES "arm*" )
+
+ENDIF (ARCH MATCHES "amd64" OR ARCH MATCHES "x86_64")
+
+
+INSTALL(FILES "src/rrc_eula_ChartSetsForOpenCPN-v16-12.txt"
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+ DESTINATION ${PREFIX_PARENTDATA}/plugins/${PACKAGE_NAME} )
+
+ENDIF(UNIX AND NOT APPLE)
+
+IF(WIN32)
+ INSTALL(FILES "buildwin/oeserverd/oeserverd.exe"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE
+ DESTINATION "plugins\\\\${PACKAGE_NAME}")
+
+ INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME DESTINATION "plugins")
+ SET(INSTALL_DIRECTORY "plugins\\\\${PACKAGE_NAME}")
+
+ INSTALL(FILES "src/rrc_eula_ChartSetsForOpenCPN-v16-12.txt"
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+ DESTINATION ${INSTALL_DIRECTORY} )
+
+ENDIF(WIN32)
+
+IF(APPLE)
+SET(CMAKE_INSTALL_PREFIX "/tmp")
+
+INSTALL(FILES "buildosx/oeserverd/oeserverd"
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE
+ DESTINATION "oesenc_pi/oesenc_pi")
+
+INSTALL(FILES "src/rrc_eula_ChartSetsForOpenCPN.txt"
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+ DESTINATION "oesenc_pi/oesenc_pi" )
+
+ # We also need to copy the helper utility to the binary build directory so that the PACKAGES scripts will find it.
+configure_file(${PROJECT_SOURCE_DIR}/buildosx/oeserverd/oeserverd
+ ${CMAKE_CURRENT_BINARY_DIR}/oeserverd COPYONLY)
+
+configure_file(${PROJECT_SOURCE_DIR}/src/rrc_eula_ChartSetsForOpenCPN.txt
+ ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+
+
+ENDIF(APPLE)
+
+
+
+SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "dsr")
+
+INCLUDE("cmake/PluginLocalization.cmake")
+INCLUDE("cmake/PluginInstall.cmake")
+INCLUDE("cmake/PluginPackage.cmake")
diff --git a/gis/opencpn-plugin-oesenc/README b/gis/opencpn-plugin-oesenc/README
new file mode 100644
index 0000000000000..46d5c17f4003e
--- /dev/null
+++ b/gis/opencpn-plugin-oesenc/README
@@ -0,0 +1,4 @@
+oeSENC Plugin for OpenCPN provides support for encrypted OCPN Vector
+Charts. These are licensed and sourced from chart providers like
+Hydrographic Offices. These non-free charts must be installed
+with appropriate encryption certificates in place.
diff --git a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild
new file mode 100644
index 0000000000000..60bfef587b949
--- /dev/null
+++ b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# Slackware build script for opencpn-plugin-oesenc
+
+# Copyright 2018 Matt Dinslage (daedra1980@gmail.com), Springfield, MO, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=opencpn-plugin-oesenc
+VERSION=${VERSION:-2.1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCNAM=oesenc_pi
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i -e 's/^ SET (LIB_INSTALL_DIR "lib")/ SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")/' \
+ cmake/PluginInstall.cmake
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DCMAKE_BUILD_TYPE=Release ..
+
+ make VERBOSE=1
+ make install VERBOSE=1 DESTDIR=$PKG
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Notes README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info
new file mode 100644
index 0000000000000..169316277ba5e
--- /dev/null
+++ b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info
@@ -0,0 +1,10 @@
+PRGNAM="opencpn-plugin-oesenc"
+VERSION="2.1.0"
+HOMEPAGE="https://opencpn.org/OpenCPN/plugins/oesenc.html"
+DOWNLOAD="https://www.dropbox.com/s/uyq7up8ee61xl19/oesenc_pi-2.1.0.tar.gz"
+MD5SUM="8aeb8c117bfa57cfa6086b4d23f843c1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="opencpn"
+MAINTAINER="M.Dinslage"
+EMAIL="daedra1980@gmail.com"
diff --git a/gis/opencpn-plugin-oesenc/slack-desc b/gis/opencpn-plugin-oesenc/slack-desc
new file mode 100644
index 0000000000000..6274d61ead90b
--- /dev/null
+++ b/gis/opencpn-plugin-oesenc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+opencpn-plugin-oesenc: opencpn-plugin-oesenc (oeSENC Charts Plugin)
+opencpn-plugin-oesenc:
+opencpn-plugin-oesenc: oeSENC Plugin for OpenCPN provides support for encrypted OCPN Vector
+opencpn-plugin-oesenc: Charts. These are licensed and sourced from chart providers like
+opencpn-plugin-oesenc: Hydrographic Offices. These non-free charts must be installed
+opencpn-plugin-oesenc: with appropriate encryption certificates in place.
+opencpn-plugin-oesenc:
+opencpn-plugin-oesenc:
+opencpn-plugin-oesenc:
+opencpn-plugin-oesenc:
+opencpn-plugin-oesenc: