summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Ozan Türkyılmaz2022-09-27 03:11:02 +0200
committer Willy Sudiarto Raharjo2022-10-01 04:01:12 +0200
commitb9728cae1061c5fa4d41c4fe0da09d77a5993d91 (patch)
tree70e44425b8cf4ae7259d653b15cf177fc902f43d
parent60253986b6f6b4cbcef0dcd9381601d52da2f358 (diff)
downloadslackbuilds-b9728cae1061c5fa4d41c4fe0da09d77a5993d91.tar.gz
libraries/geocode-glib2: Added (convenience library for geocoding)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/geocode-glib2/README13
-rw-r--r--libraries/geocode-glib2/doinst.sh6
-rw-r--r--libraries/geocode-glib2/geocode-glib2.SlackBuild142
-rw-r--r--libraries/geocode-glib2/geocode-glib2.info10
-rw-r--r--libraries/geocode-glib2/slack-desc19
5 files changed, 190 insertions, 0 deletions
diff --git a/libraries/geocode-glib2/README b/libraries/geocode-glib2/README
new file mode 100644
index 0000000000..b821201716
--- /dev/null
+++ b/libraries/geocode-glib2/README
@@ -0,0 +1,13 @@
+geocode-glib2 is a convenience library for the geocoding (finding
+longitude, and latitude from an address) and reverse geocoding
+(finding an address from coordinates). It uses Nominatim service to
+achieve that. It also caches (reverse-)geocoding requests for faster
+results and to avoid unnecessary server load.
+
+This script will build library that uses soup3 API. It can reside with
+geocode-glib in the same system.
+
+Below variables can be used to configure the build:
+ GTKDOC=yes : Builds gtkdocs
+ INTROSPECTION=no : Disables the introspection generation
+ TESTS=yes : Build & install test programs
diff --git a/libraries/geocode-glib2/doinst.sh b/libraries/geocode-glib2/doinst.sh
new file mode 100644
index 0000000000..6c7c1b11b5
--- /dev/null
+++ b/libraries/geocode-glib2/doinst.sh
@@ -0,0 +1,6 @@
+
+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/libraries/geocode-glib2/geocode-glib2.SlackBuild b/libraries/geocode-glib2/geocode-glib2.SlackBuild
new file mode 100644
index 0000000000..ece911855b
--- /dev/null
+++ b/libraries/geocode-glib2/geocode-glib2.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Slackware build script for geocode-glib
+
+# Copyright 2022 Ozan Türkyılmaz
+# 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=geocode-glib2
+VERSION=${VERSION:-3.26.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+GTKDOC=${GTKDOC:-no}
+INTROSPECTION=${INTROSPECTION:-yes}
+TESTS=${TESTS:-no}
+
+if [ "$GTKDOC" = "yes" ]; then
+ GTKDOCP="true"
+else
+ GTKDOCP="false"
+fi
+
+if [ "$INTROSPECTION" = "yes" ]; then
+ INTROSPECTIONP="true"
+else
+ INTROSPECTIONP="false"
+fi
+
+if [ "$TESTS" = "yes" ]; then
+ TESTSP="true"
+else
+ TESTSP="false"
+fi
+
+# Same code base provides two libraries: one uses soup2 and other uses soup3.
+# They both have different so names and pkg-config files.
+PRGNAM1=geocode-glib
+
+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 $PRGNAM1-$VERSION
+tar xvf $CWD/$PRGNAM1-$VERSION.tar.xz
+cd $PRGNAM1-$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 build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true \
+ -Denable-introspection="$INTROSPECTIONP" \
+ -Denable-gtk-doc="$GTKDOCP" \
+ -Denable-installed-tests="$TESTSP" \
+ -Dsoup2=false
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING.LIB ChangeLog NEWS README TODO \
+ $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/libraries/geocode-glib2/geocode-glib2.info b/libraries/geocode-glib2/geocode-glib2.info
new file mode 100644
index 0000000000..e789fa3ac1
--- /dev/null
+++ b/libraries/geocode-glib2/geocode-glib2.info
@@ -0,0 +1,10 @@
+PRGNAM="geocode-glib2"
+VERSION="3.26.3"
+HOMEPAGE="https://git.gnome.org/browse/geocode-glib"
+DOWNLOAD="https://download.gnome.org/sources/geocode-glib/3.26/geocode-glib-3.26.3.tar.xz"
+MD5SUM="748921b2cfa8450ac6857c5da370e129"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libsoup3"
+MAINTAINER="Ozan Türkyılmaz"
+EMAIL="ozan.turkyilmaz@gmail.com"
diff --git a/libraries/geocode-glib2/slack-desc b/libraries/geocode-glib2/slack-desc
new file mode 100644
index 0000000000..10b95552a0
--- /dev/null
+++ b/libraries/geocode-glib2/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+geocode-glib2: geocode-glib2 (convenience library for the geocoding)
+geocode-glib2:
+geocode-glib2: geocode-glib2 is a convenience library for the geocoding (finding
+geocode-glib2: longitude, and latitude from an address) and reverse geocoding
+geocode-glib2: (finding an address from coordinates). It uses Nominatim service to
+geocode-glib2: achieve that. It also caches (reverse-)geocoding requests for faster
+geocode-glib2: results and to avoid unnecessary server load.
+geocode-glib2:
+geocode-glib2: geocode-glib2 uses soup3 API.
+geocode-glib2:
+geocode-glib2: https://git.gnome.org/browse/geocode-glib