aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2017-05-26 11:46:13 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-05-27 07:29:11 +0700
commitd57be9e639b8484e12c34276dd11034b58455fdb (patch)
tree79161a5bb63cd80bf868691c53737b6e4f572552 /system
parente8714ececb98a98b973167295f8bda35814dc1e6 (diff)
system/gpsbabel: Updated for version 1.5.3.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'system')
-rw-r--r--system/gpsbabel/gpsbabel.SlackBuild87
-rw-r--r--system/gpsbabel/gpsbabel.info10
2 files changed, 72 insertions, 25 deletions
diff --git a/system/gpsbabel/gpsbabel.SlackBuild b/system/gpsbabel/gpsbabel.SlackBuild
index ad7afb80fd7f4..26475dd6e9a60 100644
--- a/system/gpsbabel/gpsbabel.SlackBuild
+++ b/system/gpsbabel/gpsbabel.SlackBuild
@@ -1,18 +1,38 @@
#!/bin/sh
# Slackware build script for gpsbabel
-# Written by Kyle Guinn <elyk03@gmail.com>
+
+# Copyright 2017 Kyle Guinn <elyk03@gmail.com>, 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=gpsbabel
-VERSION=${VERSION:-1.3.3}
+VERSION=${VERSION:-1.5.3}
+SRCVER=${PRGNAM}_$(echo ${VERSION} | tr . _)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
+ case "$(uname -m)" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
+ *) ARCH=$(uname -m) ;;
esac
fi
@@ -21,7 +41,12 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
+DOCS="AUTHORS COPYING README*"
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
@@ -40,34 +65,56 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
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 {} \;
+chmod -R u+w,go-w,a+rX-st .
+
+# Protect your privacy: Turn off usage reporting and checks for upgrades
+# by default. These can be enabled manually via the preferences window.
+# Upgrade checking is broken (for me, at least) so this silences an error dialog.
+sed -i \
+ -e '/reportStatistics_/s/true/false/' \
+ -e '/startupVersionCheck_/s/true/false/' \
+ -e '/ignoreVersionMismatch/s/false/true/' \
+ gui/babeldata.h
+
+# Make it more FHS-compliant by moving gmapbase.html and the translations
+# to /usr/share. Tell the GUI where to find them. Thanks to Arch.
+sed -i 's|QApplication::applicationDirPath() +|"/usr/share/gpsbabel"|' gui/map.cc
+sed -i 's|QApplication::applicationDirPath()|"/usr/share/gpsbabel"|' gui/mainwindow.cc
+
+# Build using the system zlib and libminizip from SBo (see --with-zlib=system).
+# Thanks to Gentoo.
+sed -i '/AC_CHECK_LIB(\[z\], \[gzopen\])/aAC_CHECK_LIB([minizip], [zipOpen64])' configure.in
+sed -i 's|"zlib/contrib/minizip/zip.h"|<minizip/zip.h>|' src/core/ziparchive.cc src/core/ziparchive.h
+autoreconf -vif
-CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
--with-zlib=system \
- --without-doc \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
make
-make install DESTDIR=$PKG
+make gui
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+install -D -m0755 -s gpsbabel $PKG/usr/bin/gpsbabel
+install -D -m0755 -s gui/objects/gpsbabelfe-bin $PKG/usr/bin/gpsbabelfe
+install -D -m0644 gui/gmapbase.html $PKG/usr/share/gpsbabel/gmapbase.html
+install -d -m0755 $PKG/usr/share/gpsbabel/translations/
+install -D -m0644 gui/*.qm $PKG/usr/share/gpsbabel/translations/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING README* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/system/gpsbabel/gpsbabel.info b/system/gpsbabel/gpsbabel.info
index a0688e290ae76..6131410009dd9 100644
--- a/system/gpsbabel/gpsbabel.info
+++ b/system/gpsbabel/gpsbabel.info
@@ -1,10 +1,10 @@
PRGNAM="gpsbabel"
-VERSION="1.3.3"
-HOMEPAGE="http://www.gpsbabel.org/"
-DOWNLOAD="http://downloads.sourceforge.net/gpsbabel/gpsbabel-1.3.3.tar.gz"
-MD5SUM="0ba7f4c623518e6bfe8da12d0691fb96"
+VERSION="1.5.3"
+HOMEPAGE="https://www.gpsbabel.org/"
+DOWNLOAD="https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_1_5_3/gpsbabel-gpsbabel_1_5_3.tar.gz"
+MD5SUM="dd09e1617b0be2de03f860b7d7e4c537"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="libminizip"
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"