summaryrefslogtreecommitdiffstats
path: root/gis/opencpn/opencpn.SlackBuild
diff options
context:
space:
mode:
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
commit4473c98f20b17650f8430c0179f8a8e46b7a289a (patch)
tree3d4e64bfd769c6d3b2b8f4c6c876bb02f344b57d /gis/opencpn/opencpn.SlackBuild
parentf9cdef357bb2e32cc2f4b1238bf53fed62c721d8 (diff)
downloadslackbuilds-4473c98f20b17650f8430c0179f8a8e46b7a289a.tar.gz
slackbuilds-4473c98f20b17650f8430c0179f8a8e46b7a289a.tar.xz
gis/opencpn: Updated for version 5.0.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis/opencpn/opencpn.SlackBuild')
-rw-r--r--gis/opencpn/opencpn.SlackBuild34
1 files changed, 30 insertions, 4 deletions
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