aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiancarlo Dessì <slack@giand.it>2023-04-20 20:25:24 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-22 11:38:29 +0700
commit5f19b4539831b762c4045e4ebdc16498f596b0d7 (patch)
treefb48d2f7ac07ef45abc77b251f746c2b3df506a2
parent60e3067dde42bd3b93a4fd4185d61930e9f62266 (diff)
gis/therion: Added (Cave surveying software)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--gis/therion/README71
-rw-r--r--gis/therion/doinst.sh29
-rw-r--r--gis/therion/slack-desc19
-rw-r--r--gis/therion/therion.SlackBuild167
-rw-r--r--gis/therion/therion.info10
5 files changed, 296 insertions, 0 deletions
diff --git a/gis/therion/README b/gis/therion/README
new file mode 100644
index 0000000000000..505a80ddc08a1
--- /dev/null
+++ b/gis/therion/README
@@ -0,0 +1,71 @@
+Therion is a complete platform which processes survey data and
+generates maps or 3D models of caves. This suite may be useful for
+professional or amateur cavers and researchers in geology or
+speleology fields.
+
+The package includes the following components:
+- therion: the basic executable program that works as a command-line
+ compiler and processes input files, which are - including 2D maps -
+ in text format, to create files with 2D maps or 3D model. 2D maps
+ can be generated in PDF or SVG formats or other formats handled by
+ GIS platforms (DXF, ESRI, KML) or Aven (Survex format). 3D models
+ can be generated in the native format (handled by the component
+ Loch) or other formats (Compass, 3DMF, VRML, Survex, ecc.) handled
+ by appropriate viewers.
+- xtherion: the executable program that launches the GUI (Graphical
+ User Interface). Xtherion works as text editor, map editor, and
+ compiler (instead of therion). This component is not essential:
+ output files can be generated by therion preparing the input files
+ with external programs as text or maps editors.
+- Loch: a 3D model viewer that supports high-resolution rendering to
+ file and stereo view using 3D-glasses. This component is not
+ essential: output 3D models can be displayed with other external
+ viewers.
+- thbook.pdf: the Therion Book, it contains the documentation to use
+ Therion, generated with pdfTEX during the build process. It will be
+ installed in /usr/doc/therion-[VERSION]. This component is not
+ essential: a copy of the book (in basic size format) is also
+ available in the project homepage.
+
+The build of the optional components is enabled by default. You can
+exclude one or more of them by passing to the script the respective
+environment variables:
+
+- LOCH=no This disables the build of the native 3D viewer Loch. In
+ this case wxWidgets and VTK are not required.
+- GUI=no This disables the build of Xtherion.
+- BOOK=no This disables the build of thbook.pdf.
+
+If you leave enabled the build of Loch, the compilation works also
+if you have wxGTK3 (without the dependency wxWidgets) installed in
+your system. Other libraries based on wxWidgets (like wxPython3 or
+wxPython4 for example) could be detected and used but they are not
+tested.
+
+The build requires the library {fmt} as dependency and the source
+uses by default an internal {fmt}. This library is available as
+slackbuild in Slackbuilds.org (for Slackware 15.0) and a prebuild
+package in the official release (for Slackware current). If the
+library is installed in your system you would use it. In this case
+you can set the build for use of the external library passing an
+environment variable to the script as following:
+
+ FMT=yes ./therion.SlackBuild
+
+WARNINGS
+Note that the platform works only with some standards, interpreters or
+programs (like METAPOST, TEX, tcl/tk, ImageMagick, ecc.) that are
+available in a full installation of Slackware, and some extensions of
+these (like LCDF Typetools, Bwidget, and tkImg) that are available in
+Slackbuilds.org. Without these dependencies Therion fails during the
+package build (almost) or in runtime for some features (e.g. tkImg,
+that is not detected by the build process).
+
+After the installation, a full and extended integrated behavior,
+optimized with the custom configuration, requires to set or uncomment
+appropriate values in the initialization files in /etc/therion.
+
+Sample data can be downloaded from the project homepage. They can be
+used to practice about Therion.
+
+See the thbook.pdf for more information.
diff --git a/gis/therion/doinst.sh b/gis/therion/doinst.sh
new file mode 100644
index 0000000000000..00ecebd85c75a
--- /dev/null
+++ b/gis/therion/doinst.sh
@@ -0,0 +1,29 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/therion/therion.ini.new
+config etc/therion/xtherion.ini.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/therion/slack-desc b/gis/therion/slack-desc
new file mode 100644
index 0000000000000..59129ed4b3d1f
--- /dev/null
+++ b/gis/therion/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------------------------------------------------------|
+therion: therion (Cave surveying software)
+therion:
+therion: Therion is a complete package which processes survey data and
+therion: generates maps or 3D models of caves.
+therion:
+therion:
+therion:
+therion:
+therion: https://therion.speleo.sk/
+therion:
+therion:
diff --git a/gis/therion/therion.SlackBuild b/gis/therion/therion.SlackBuild
new file mode 100644
index 0000000000000..14716f6187961
--- /dev/null
+++ b/gis/therion/therion.SlackBuild
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+# Slackware build script for therion
+
+# Copyright 2023 Giancarlo Dessi, Cagliari, IT
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=therion
+VERSION=${VERSION:-6.1.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+# Features enabled by default
+BUILDLOCH="" ; [ "${LOCH:-yes}" = "no" ] && BUILDLOCH=" -DBUILD_LOCH=OFF"
+BUILDBOOK=" -DTHBOOK_FORMAT=3" ; [ "${BOOK:-yes}" = "no" ] && BUILDBOOK=" -DBUILD_THBOOK=OFF"
+BUILDX=""; [ "${GUI:-yes}" = "no" ] && BUILDX=" -DBUILD_XTHERION=OFF"
+
+# Set internal (default) or system library {fmt}
+EXT_FMT=""; [ "${FMT:-no}" = "yes" ] && EXT_FMT=" -DUSE_BUNDLED_FMT=OFF"
+
+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 $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$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 {} \;
+
+mkdir -p build
+cd build
+ cmake -Wno-dev \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc/therion \
+ $EXT_FMT \
+ $BUILDLOCH \
+ $BUILDBOOK \
+ $BUILDX \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+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 -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES COPYING README CONTRIBUTING.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# make installs documentation generated by the build into two directories in /usr/share/doc
+# we move this documentation in /usr/doc/therion-x.y.z
+if [ "$BOOK" != "no" ] ; then
+ mv $PKG/usr/share/doc/$PRGNAM/thbook.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+ rm -rf $PKG/usr/share/doc/$PRGNAM
+ if [ "$LOCH" == "no" ] ; then
+ rm -rf $PKG/usr/share
+ fi
+fi
+if [ "$LOCH" != "no" ] ; then
+ mv $PKG/usr/share/doc/therion-viewer $PKG/usr/doc/$PRGNAM-$VERSION
+ rm -rf $PKG/usr/share/doc
+fi
+
+#Make and install a copy of the application icon in PNG format
+mkdir -p $PKG/usr/share/icons/hicolor/32x32/apps
+magick $TMP/$PRGNAM-$VERSION/therion.ico $PKG/usr/share/icons/hicolor/32x32/apps/therion.png
+
+#Create a desktop entry
+mkdir -p $PKG/usr/share/applications
+cat << EOF > $PKG/usr/share/applications/therion.desktop
+[Desktop Entry]
+Type=Application
+Name=Therion
+GenericName=Cave survey software
+GenericName[de]=Höhlenstudienprogramm
+GenericName[es]=Programa de estudio de las cuevas
+GenericName[fr]=Programme d'étude des grottes
+GenericName[it]=Programma di studio delle grotte
+GenericName[pt]=Programa de estudo de caverna
+Comment=Process data from speleological surveys and generate maps and 3D models of caves
+Comment[de]=Verarbeiten Sie speläologische Daten und erstellen Sie Höhlenkarten und 3D-Modelle
+Comment[es]=Procese datos de estudios espeleológicos y genere mapas y modelos 3D de cuevas
+Comment[fr]=Traiter données des relevés spéléologiques et générer cartes et modèles 3D de grottes
+Comment[it]=Elabora dati di rilievi speleologici e genera mappe e modelli 3D delle grotte
+Comment[pt]=Processar dados de levantamentos espeleológicos e gerar mapas e modelos 3D de cavernas
+Exec=xtherion
+Icon=/usr/share/icons/hicolor/32x32/apps/therion.png
+Terminal=false
+Categories=Education;Science;Geology;
+StartupNotify=true
+MimeType=text/x-th;text/x-th2;
+
+EOF
+
+# remove *.ini files, leave only *.ini.new
+rm -f $PKG/etc/therion/*.ini
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/therion/therion.info b/gis/therion/therion.info
new file mode 100644
index 0000000000000..6b749ec4ab21b
--- /dev/null
+++ b/gis/therion/therion.info
@@ -0,0 +1,10 @@
+PRGNAM="therion"
+VERSION="6.1.6"
+HOMEPAGE="https://therion.speleo.sk/"
+DOWNLOAD="https://github.com/therion/therion/archive/v6.1.6/therion-6.1.6.tar.gz"
+MD5SUM="b5a9809efd5c2c71c81ceca27c0e0c52"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="bwidget lcdf-typetools proj tkimg VTK wxWidgets"
+MAINTAINER="Giancarlo Dessì"
+EMAIL="slack@giand.it"