diff options
author | Philip Lacroix <slackph at posteo dot de> | 2023-01-29 13:04:31 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-02-04 07:19:50 +0700 |
commit | b190e81fc907f13352fdf75931e63ae9468bddc0 (patch) | |
tree | bbc9206efc243394aaf6b12de5ee50c4857caee6 /libraries | |
parent | 56098d57b9454974d2b87e8403304e8b4342b4e9 (diff) |
libraries/GeographicLib: Added (convert geographic coordinates)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/GeographicLib/GeographicLib.SlackBuild | 116 | ||||
-rw-r--r-- | libraries/GeographicLib/GeographicLib.info | 16 | ||||
-rw-r--r-- | libraries/GeographicLib/README | 25 | ||||
-rw-r--r-- | libraries/GeographicLib/slack-desc | 19 |
4 files changed, 176 insertions, 0 deletions
diff --git a/libraries/GeographicLib/GeographicLib.SlackBuild b/libraries/GeographicLib/GeographicLib.SlackBuild new file mode 100644 index 0000000000000..4a75037905f01 --- /dev/null +++ b/libraries/GeographicLib/GeographicLib.SlackBuild @@ -0,0 +1,116 @@ +#!/bin/bash + +# Slackware build script for GeographicLib + +# Copyright 2023 Philip Lacroix <slackph at posteo dot de> +# 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=GeographicLib +VERSION=${VERSION:-2.1.2} +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 + +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 xvzf $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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +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/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 + +# Install recommended datasets (geoid, gravity, magnetic). +# For other datasets, please see this SlackBuild's README. +PRGSHR=$PKG/usr/share/$PRGNAM +mkdir $PRGSHR +tar xvjf $CWD/egm96-5.tar.bz2 -C $PRGSHR +tar xvjf $CWD/egm96.tar.bz2 -C $PRGSHR +tar xvjf $CWD/wmm2020.tar.bz2 -C $PRGSHR +chown -R root:root $PRGSHR + +mkdir -p $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 diff --git a/libraries/GeographicLib/GeographicLib.info b/libraries/GeographicLib/GeographicLib.info new file mode 100644 index 0000000000000..3ab22f57650ec --- /dev/null +++ b/libraries/GeographicLib/GeographicLib.info @@ -0,0 +1,16 @@ +PRGNAM="GeographicLib" +VERSION="2.1.2" +HOMEPAGE="https://sourceforge.net/projects/geographiclib" +DOWNLOAD="https://sourceforge.net/projects/geographiclib/files/distrib-C++/GeographicLib-2.1.2.tar.gz \ + https://sourceforge.net/projects/geographiclib/files/geoids-distrib/egm96-5.tar.bz2 \ + https://sourceforge.net/projects/geographiclib/files/gravity-distrib/egm96.tar.bz2 \ + https://sourceforge.net/projects/geographiclib/files/magnetic-distrib/wmm2020.tar.bz2" +MD5SUM="8b0010429ebda99e624b51dfa06bbbed \ + 6ae1c02c0506a686c9ad33be42cad0ae \ + dcc1ab8e3433bd0add901b2f3e5caa76 \ + 7a1d6e3044a1be0512f3ec99b310c4e9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Philip Lacroix" +EMAIL="slackph at posteo dot de" diff --git a/libraries/GeographicLib/README b/libraries/GeographicLib/README new file mode 100644 index 0000000000000..987fb362f7baa --- /dev/null +++ b/libraries/GeographicLib/README @@ -0,0 +1,25 @@ +GeographicLib is a small C++ library for: geodesic and rhumb line +calculations; conversions between geographic, UTM, UPS, MGRS, +geocentric, and local cartesian coordinates; gravity (e.g., EGM2008) +and geomagnetic field (e.g., WMM2020) calculations. + +The emphasis is on returning accurate results with errors close to +round-off (about 5–15 nanometers). Accurate algorithms for Geodesics +on an ellipsoid of revolution and Transverse Mercator projection have +been developed for this library. The functionality of the library can +be accessed from user code or from the Utility programs provided. + +This library is not a general purpose projection library nor does it +perform datum conversions; use PROJ instead. + + +NOTE - This SlackBuild installs the following data sets: egm96-5 +(geoid), egm96 (gravity) and wmm2020 (magnetic), provided that they +have been downloaded and placed in the SlackBuild's directory, along +with the source tarball. Several other data sets are available on the +project's website, or can be downloaded and installed automatically +by using the following scripts, after installation of the package: + + /usr/sbin/geographiclib-get-geoids + /usr/sbin/geographiclib-get-gravity + /usr/sbin/geographiclib-get-magnetic diff --git a/libraries/GeographicLib/slack-desc b/libraries/GeographicLib/slack-desc new file mode 100644 index 0000000000000..521184b96554e --- /dev/null +++ b/libraries/GeographicLib/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------------------------------------------------------| +GeographicLib: GeographicLib (library for converting geographic coordinate systems) +GeographicLib: +GeographicLib: GeographicLib is a small C++ library for: geodesic and rhumb line +GeographicLib: calculations; conversions between geographic, UTM, UPS, MGRS, +GeographicLib: geocentric, and local cartesian coordinates; gravity (e.g., EGM2008) +GeographicLib: and geomagnetic field (e.g., WMM2020) calculations. +GeographicLib: +GeographicLib: Homepage: https://sourceforge.net/projects/geographiclib +GeographicLib: +GeographicLib: +GeographicLib: |