summaryrefslogtreecommitdiffstats
path: root/academic
diff options
context:
space:
mode:
author Giancarlo Dessi <slack@giand.it>2024-02-10 08:25:28 +0900
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-02-10 16:17:21 +0700
commit537beedb64e27a4fbec0460ab4b93f3eb52f5326 (patch)
tree15bfb7cfc0e391844b248ffcdf492718fbf26140 /academic
parent33bbad2623874920d5bf414b3484f704e9b40fa0 (diff)
downloadslackbuilds-537beedb64e27a4fbec0460ab4b93f3eb52f5326.tar.gz
slackbuilds-537beedb64e27a4fbec0460ab4b93f3eb52f5326.tar.xz
academic/gplates: Added (plate tectonics program).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/gplates/README45
-rw-r--r--academic/gplates/README.SBo32
-rw-r--r--academic/gplates/boost-placeholders.patch35
-rw-r--r--academic/gplates/doinst.sh13
-rw-r--r--academic/gplates/gplates.SlackBuild156
-rw-r--r--academic/gplates/gplates.desktop21
-rw-r--r--academic/gplates/gplates.info10
-rw-r--r--academic/gplates/slack-desc19
8 files changed, 331 insertions, 0 deletions
diff --git a/academic/gplates/README b/academic/gplates/README
new file mode 100644
index 0000000000..8ba9347278
--- /dev/null
+++ b/academic/gplates/README
@@ -0,0 +1,45 @@
+GPlates is free and open source desktop software for the interactive
+visualisation of plate tectonics for research, educational,
+professional, and other purposes. It is developed by an international
+team of researchers and software developers who refer to internal
+divisions of the University of Sidney and Caltech (California
+Institute of Technology).
+
+GPlates offers a novel combination of interactive plate tectonic
+reconstructions, geographic information system (GIS) functionality and
+raster data visualisation. GPlates enables both the visualisation and
+the manipulation of plate tectonic reconstructions and associated data
+through geological time.
+GPlates can be used to handle and visualise data in a variety of
+geometries and formats, including raster data, to link plate kinematics
+to geodynamic models, to serve as an interactive client in a
+grid-computing network, to facilitate the production of high-quality
+paleo-geographic maps.
+
+GPlates requires in runtime pre-packed datasets provided by the project
+or other datasets. By default, this slackbuild does not install any
+dataset, since the download of project's data source is allowed only by
+using a web browser. Standard procedure compliant with curl or wget is
+not allowed.
+
+If you want to install the data source using this slackbuild follow the
+download instructions reported in README.SBo file and save the archive
+gplates_2.3.0_geodata.zip in the same directory of the slackbuild
+script. The slackbuild autodetect this archive and if found will
+include the datasets in the installation package. Datasets will be
+installed in the directory /usr/share/gplates/GeoData
+
+Alternative datasets are not handled by this slackbuild. If you want
+to use other datasets you have to add them in local or shared
+directories and apply them using the tools of the application GUI.
+
+CGAL library is a required dependency, but the build can also use the
+alternative header-only library CGAL5 if installed in your system.
+
+Published works powered with GPlates should include the following
+citation:
+
+Müller, R. D., Cannon, J., Qin, X., Watson, R. J., Gurnis, M.,
+Williams, S., et al. 2018. GPlates: Building a virtual Earth through
+deep time. Geochemistry, Geophysics, Geosystems, 19.
+doi:10.1029/2018GC007584.
diff --git a/academic/gplates/README.SBo b/academic/gplates/README.SBo
new file mode 100644
index 0000000000..eb20e6214f
--- /dev/null
+++ b/academic/gplates/README.SBo
@@ -0,0 +1,32 @@
+Although this is not strictly required for build GPlates, since
+alternative datasets can be used, you would install the data source
+provided by EarthByte, the official maintainer of GPlates project at
+the same time of the build of GPlates package.
+Unfortunately, this dataset is not released in the github repository
+of GPlates and can be downloaded only using a Web browser, not with
+other applications like curl or wget.
+
+If you want install this dataset (strongly recommended) please follow
+these instructions:
+
+1. Connect to the webpage:
+ https://www.earthbyte.org/download-gplates-2-3/
+
+2. In the section "Download file links" select the option from the
+ Download selection list:
+ gplates_2.3.0_geodata.zip
+
+ (Warning: do not select the application source, because the
+ tarball will not handled by the slackbuild script. Use the tarball
+ downloaded from the github repository of GPlates)
+
+3. Fill the form notifying:
+ - your name (OPTIONAL: leave empty for anonymous download)
+ - your email address (OPTIONAL: leave empty for anonymous download)
+ - select your purposes (REQUIRED)
+
+4. Click the button "Get download link(s)"
+
+After the above steps, you will get at the bottom of the page the
+hardlink to download the geodata archive. This must be saved in the
+same directory of the slackbuild script.
diff --git a/academic/gplates/boost-placeholders.patch b/academic/gplates/boost-placeholders.patch
new file mode 100644
index 0000000000..aefc26e64f
--- /dev/null
+++ b/academic/gplates/boost-placeholders.patch
@@ -0,0 +1,35 @@
+--- gplates_2.3.0_src/src/gui/TopologyTools.cc 2021-07-05 07:28:32.000000000 +0200
++++ gplates_2.3.0_src-fixed/src/gui/TopologyTools.cc 2022-04-10 16:00:01.000000000 +0200
+@@ -39,4 +39,6 @@
+ #include <boost/none.hpp>
+ #include <boost/numeric/conversion/cast.hpp>
++#include <boost/bind/placeholders.hpp>
++using namespace boost::placeholders;
+
+ #include <QtDebug>
+--- gplates_2.3.0_src/src/qt-widgets/ViewportWindow.cc 2021-08-05 07:40:35.000000000 +0200
++++ gplates_2.3.0_src-fixed/src/qt-widgets/ViewportWindow.cc 2022-04-10 16:10:01.000000000 +0200
+@@ -37,4 +37,6 @@
+ #include <boost/foreach.hpp>
+ #include <boost/bind/bind.hpp>
++#include <boost/bind/placeholders.hpp>
++using namespace boost::placeholders;
+
+ #include <QActionGroup>
+--- gplates_2.3.0_src/src/presentation/ReconstructionGeometryRenderer.cc 2021-08-05 07:40:35.000000000 +0200
++++ gplates_2.3.0_src-fixed/src/presentation/ReconstructionGeometryRenderer.cc 2022-04-10 16:20:01.000000000 +0200
+@@ -30,4 +30,6 @@
+ #include <boost/bind/bind.hpp>
+ #include <boost/foreach.hpp>
++#include <boost/bind/placeholders.hpp>
++using namespace boost::placeholders;
+
+ #include "ReconstructionGeometryRenderer.h"
+--- gplates_2.3.0_src/src/presentation/VisualLayerRegistry.cc 2021-08-05 07:40:35.000000000 +0200
++++ gplates_2.3.0_src-fixed/src/presentation/VisualLayerRegistry.cc 2022-04-10 16:30:01.000000000 +0200
+@@ -27,4 +27,6 @@
+ #include <boost/bind/bind.hpp>
+ #include <boost/foreach.hpp>
++#include <boost/bind/placeholders.hpp>
++using namespace boost::placeholders;
+ #include <QPixmap>
diff --git a/academic/gplates/doinst.sh b/academic/gplates/doinst.sh
new file mode 100644
index 0000000000..aea0f894eb
--- /dev/null
+++ b/academic/gplates/doinst.sh
@@ -0,0 +1,13 @@
+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/academic/gplates/gplates.SlackBuild b/academic/gplates/gplates.SlackBuild
new file mode 100644
index 0000000000..e237b951ad
--- /dev/null
+++ b/academic/gplates/gplates.SlackBuild
@@ -0,0 +1,156 @@
+#!/bin/bash
+
+# Slackware build script for gplates
+
+# Copyright 2022-2024 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=gplates
+SRCNAM=GPlates-GPlates
+VERSION=${VERSION:-2.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+GEODATADIR=GeoData
+GEODATAVERSION=$VERSION.0
+
+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
+
+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
+rm -rf $GEODATADIR
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+
+# Detect if GeoData archive if present
+if [ -f $CWD/gplates_${GEODATAVERSION}_geodata.zip ]; then
+ echo "*********************************************************"
+ echo "* GeoData source found! This slackbuild will include in *"
+ echo "* the install package the official datasets released by *"
+ echo "* the EarthByte project. *"
+ echo "* *"
+ echo "* Remember that you can also use other compatible *"
+ echo "* datasets. *"
+ echo "*********************************************************"
+
+ withGeoData=" -DGPLATES_INSTALL_GEO_DATA=true \
+ -DGPLATES_INSTALL_GEO_DATA_DIR=$TMP/$GEODATADIR "
+ unzip $CWD/gplates_${GEODATAVERSION}_geodata.zip -d $TMP
+
+
+else
+ echo "*********************************************************"
+ echo "* WARNING! GeoData source released by EarthByte project *"
+ echo "* not found. This slackbuild will not include datasets *"
+ echo "* in the install package but only the application. *"
+ echo "* *"
+ echo "* Remember that GPlates requires compatible datasets *"
+ echo "* that you have to use in runtime. *"
+ echo "*********************************************************"
+
+ withGeoData=" -DGPLATES_INSTALL_GEO_DATA=false "
+fi
+
+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 {} \;
+
+# This fix errors given by gcc 11 or earlier compilers
+patch -p1 < $CWD/boost-placeholders.patch
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ $withGeoData \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+mv $PKG/usr/share/man $PKG/usr/man
+
+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
+
+# Include application icon and desktop entry
+mkdir -p $PKG/usr/share/icons/hicolor/160x160/apps
+cp -a src/qt-resources/GPlates-icon-160x160-opaque.png \
+ $PKG/usr/share/icons/hicolor/160x160/apps/gplates.png
+
+mkdir -p $PKG/usr/share/applications
+cp -a $CWD/gplates.desktop $PKG/usr/share/applications
+chown root:root $PKG/usr/share/applications/gplates.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS CHANGELOG COPYING CREDITS 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
+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/academic/gplates/gplates.desktop b/academic/gplates/gplates.desktop
new file mode 100644
index 0000000000..249b8af64b
--- /dev/null
+++ b/academic/gplates/gplates.desktop
@@ -0,0 +1,21 @@
+[Desktop Entry]
+Type=Application
+Name=GPlates
+GenericName=Plate tectonics program
+GenericName[de]=Programm der Plattentektonik
+GenericName[es]=Programa de placas tectónicas
+GenericName[fr]=Programme des plaques tectoniques
+GenericName[it]=Programma sulle placche tettoniche
+GenericName[pt]=Programa de placas tectônicas
+Comment=Interactive visualisation of plate tectonics
+Comment[de]=Interaktive Visualisierung von tektonischen Platten
+Comment[es]=Visualización interactiva de placas tectónicas
+Comment[fr]=Visualisation interactive des plaques tectoniques
+Comment[it]=Visualizzazione interattiva delle placche tettoniche
+Comment[pt]=Visualização interativa de placas tectônicas
+Exec=gplates %f
+Icon=/usr/share/icons/hicolor/160x160/apps/gplates.png
+Terminal=false
+Categories=Qt;Education;Science;Geology;
+StartupNotify=true
+MimeType=application/x-gproj;text/gpml;text/grot;
diff --git a/academic/gplates/gplates.info b/academic/gplates/gplates.info
new file mode 100644
index 0000000000..c465138289
--- /dev/null
+++ b/academic/gplates/gplates.info
@@ -0,0 +1,10 @@
+PRGNAM="gplates"
+VERSION="2.3"
+HOMEPAGE="https://www.gplates.org"
+DOWNLOAD="https://github.com/GPlates/GPlates/archive/GPlates-2.3/GPlates-GPlates-2.3.tar.gz"
+MD5SUM="f6d3db99c7388615019f05a87d838e1f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="CGAL gdal python3-numpy qwt"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/academic/gplates/slack-desc b/academic/gplates/slack-desc
new file mode 100644
index 0000000000..ec6094b579
--- /dev/null
+++ b/academic/gplates/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------------------------------------------------------|
+gplates: gplates (interactive visualisation of plate tectonics)
+gplates:
+gplates: GPlates is a desktop application for the interactive visualisation of
+gplates: plate tectonics. It offers combination of interactive plate tectonic
+gplates: reconstructions, geographic information system (GIS) functionality
+gplates: and raster data visualisation.
+gplates:
+gplates:
+gplates: Home page: https://www.gplates.org
+gplates:
+gplates: