From 174b887beed2639d4d2db22bd1e642198685cc07 Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Sun, 25 Feb 2024 08:14:49 +0700 Subject: [PATCH] libsoup3: Added. Signed-off-by: Willy Sudiarto Raharjo --- deps/libsoup3/README | 6 ++ deps/libsoup3/libsoup3.SlackBuild | 112 ++++++++++++++++++++++++++++++ deps/libsoup3/slack-desc | 12 ++++ mate-build-deps.sh | 1 + 4 files changed, 131 insertions(+) create mode 100644 deps/libsoup3/README create mode 100644 deps/libsoup3/libsoup3.SlackBuild create mode 100644 deps/libsoup3/slack-desc diff --git a/deps/libsoup3/README b/deps/libsoup3/README new file mode 100644 index 0000000..dbdd712 --- /dev/null +++ b/deps/libsoup3/README @@ -0,0 +1,6 @@ +Soup is an HTTP client/server library implementation in C. It uses +GObjects and the glib main loop to integrate well with GTK+ +applications, and has a synchronous API suitable for use in threaded +applications. + +NOTE: This package can co-exist with libsoup package in Slackware. diff --git a/deps/libsoup3/libsoup3.SlackBuild b/deps/libsoup3/libsoup3.SlackBuild new file mode 100644 index 0000000..9f3f3fb --- /dev/null +++ b/deps/libsoup3/libsoup3.SlackBuild @@ -0,0 +1,112 @@ +#!/bin/bash + +# Slackware build script for libsoup3 + +# Copyright 2022-2023 Willy Sudiarto Raharjo +# 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. + +# 20220422 bkw: Modified by SlackBuilds.org: fix PRINT_PACKAGE_NAME. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=libsoup3 +SRCNAM=libsoup +VERSION=${VERSION:-3.4.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_msb} +PKGTYPE=${PKGTYPE:-txz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +wget -c https://gitlab.gnome.org/GNOME/libsoup/-/archive/3.4.4/libsoup-3.4.4.tar.bz2 + +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 +tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 +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 {} \+ + +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 \ + -Dtests=FALSE \ + -Dsysprof="disabled" \ + -Dstrip=true \ + -Ddocs="disabled" \ + --sysconfdir=/etc + ninja + DESTDIR=$PKG ninja install +cd .. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING NEWS README docs examples $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/deps/libsoup3/slack-desc b/deps/libsoup3/slack-desc new file mode 100644 index 0000000..6d0d78a --- /dev/null +++ b/deps/libsoup3/slack-desc @@ -0,0 +1,12 @@ + |-----handy-ruler------------------------------------------------------| +libsoup3: libsoup3 (an HTTP client/server library) +libsoup3: +libsoup3: Soup is an HTTP client/server library implementation in C. It uses +libsoup3: GObjects and the glib main loop to integrate well with GTK+ +libsoup3: applications, and has a synchronous API suitable for use in threaded +libsoup3: applications. +libsoup3: +libsoup3: +libsoup3: +libsoup3: +libsoup3: diff --git a/mate-build-deps.sh b/mate-build-deps.sh index 2da33c8..162c004 100755 --- a/mate-build-deps.sh +++ b/mate-build-deps.sh @@ -53,6 +53,7 @@ for dir in \ deps/libpeas \ deps/libgksu \ deps/gksu \ + deps/libsoup3 \ deps/gssdp \ deps/gupnp \ deps/libgxps \