diff options
author | Logan Rathbone <poprocks@gmail.com> | 2022-06-17 22:05:02 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-06-18 09:10:00 +0700 |
commit | 2d3d181c100db71509e922711c0966af85de4d67 (patch) | |
tree | 469906a58d1d86c4b9d01240dbde9a3eb7ccb7e6 /libraries/libadwaita | |
parent | 961485d04cbcfe5ee1e70220026a2ec056bdf74a (diff) | |
download | slackbuilds-2d3d181c100db71509e922711c0966af85de4d67.tar.gz |
libraries/libadwaita: Added (GTK4 lib. implementing the GNOME HIG)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libadwaita')
-rw-r--r-- | libraries/libadwaita/README | 29 | ||||
-rw-r--r-- | libraries/libadwaita/doinst.sh | 9 | ||||
-rw-r--r-- | libraries/libadwaita/libadwaita-1.0.5-support-gtk-4.4.patch | 12 | ||||
-rw-r--r-- | libraries/libadwaita/libadwaita-1.0.5-suppress-line-break-warnings.patch | 12 | ||||
-rw-r--r-- | libraries/libadwaita/libadwaita.SlackBuild | 117 | ||||
-rw-r--r-- | libraries/libadwaita/libadwaita.info | 10 | ||||
-rw-r--r-- | libraries/libadwaita/slack-desc | 19 |
7 files changed, 208 insertions, 0 deletions
diff --git a/libraries/libadwaita/README b/libraries/libadwaita/README new file mode 100644 index 0000000000..4ea2fa7ae1 --- /dev/null +++ b/libraries/libadwaita/README @@ -0,0 +1,29 @@ +Libadwaita is a GTK4 library implementing the GNOME HIG, complementing +GTK. Libadwaita is the successor of libhandy, but for GTK4. + +Among other things, libadwaita provides a set of widgets built on top of +GTK4 as well as the "Adwaita" theme, a coloring API, and a mechanism to +make apps linked against it fit in with a system-wide dark mode +preference. + +NOTE: +This version of libadwaita for Slackware 15.0 has been patched to +support GTK 4.4. libadwaita upstream advertises its minimum version as +4.5, although it does not use any C API that is not provided by version +4.4. However, according to the libadwaita git logs, it libadwaita relies +on some fixes from GTK 4.5+ to work 100% correctly. I have found +libadwaita to work perfectly reasonably with GTK 4.4. Adding one patch +to suppress a CSS runtime warning, the only issue I have run into is +that some fonts may render as larger than the developers have intended, +and window widths and heights are slightly larger as well. + +If you wish to use libadwaita as fully intended by the developers, you +can build a local copy of GTK 4 >= 4.5 on your system. + +Build options: + +BUILDTYPE => customize build type by setting to a value recognized by +meson; eg, BUILDTYPE=debug (defaults to 'release'). + +GTK_DOC => set to 'true' to build API documentation; requires +`gi-docgen` (defaults to 'false'). diff --git a/libraries/libadwaita/doinst.sh b/libraries/libadwaita/doinst.sh new file mode 100644 index 0000000000..76de420f48 --- /dev/null +++ b/libraries/libadwaita/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk4-update-icon-cache ]; then + /usr/bin/gtk4-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/libraries/libadwaita/libadwaita-1.0.5-support-gtk-4.4.patch b/libraries/libadwaita/libadwaita-1.0.5-support-gtk-4.4.patch new file mode 100644 index 0000000000..e85ed58ca0 --- /dev/null +++ b/libraries/libadwaita/libadwaita-1.0.5-support-gtk-4.4.patch @@ -0,0 +1,12 @@ +diff -Naur libadwaita-1.0.5/src/meson.build libadwaita-1.0.5.new/src/meson.build +--- libadwaita-1.0.5/src/meson.build 2022-06-01 06:48:47.000000000 -0400 ++++ libadwaita-1.0.5.new/src/meson.build 2022-06-13 22:37:56.670269324 -0400 +@@ -222,7 +222,7 @@ + ] + + glib_min_version = '>= 2.66' +-gtk_min_version = '>= 4.5.0' ++gtk_min_version = '>= 4.4.0' + + gio_dep = dependency('gio-2.0', version: glib_min_version) + gtk_dep = dependency('gtk4', version: gtk_min_version) diff --git a/libraries/libadwaita/libadwaita-1.0.5-suppress-line-break-warnings.patch b/libraries/libadwaita/libadwaita-1.0.5-suppress-line-break-warnings.patch new file mode 100644 index 0000000000..c68e9cfb53 --- /dev/null +++ b/libraries/libadwaita/libadwaita-1.0.5-suppress-line-break-warnings.patch @@ -0,0 +1,12 @@ +diff --git a/src/stylesheet/widgets/_trees.scss b/src/stylesheet/widgets/_trees.scss +index 8b137968..a067bd4a 100644 +--- a/src/stylesheet/widgets/_trees.scss ++++ b/src/stylesheet/widgets/_trees.scss +@@ -73,7 +73,6 @@ treeview.view { + padding-bottom: 3px; + border-radius: 0; + box-shadow: none; +- line-height: 100%; + + > box { + color: gtkalpha(currentColor, if($contrast == 'high', .6, .4)); diff --git a/libraries/libadwaita/libadwaita.SlackBuild b/libraries/libadwaita/libadwaita.SlackBuild new file mode 100644 index 0000000000..3356b40f38 --- /dev/null +++ b/libraries/libadwaita/libadwaita.SlackBuild @@ -0,0 +1,117 @@ +#!/bin/bash + +# Slackware build script for libadwaita + +# Copyright © 2022 Logan Rathbone, Province of Ontario, Canada +# 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=libadwaita +VERSION=${VERSION:-1.0.5} +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 xvf $CWD/$PRGNAM-$VERSION.tar.gz + +cd $PRGNAM-$VERSION + +patch -p1 < $CWD/libadwaita-1.0.5-support-gtk-4.4.patch +patch -p1 < $CWD/libadwaita-1.0.5-suppress-line-break-warnings.patch + +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" \ +meson \ + --buildtype=${BUILDTYPE:-release} \ + --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc \ + -Dstrip=true \ + -Dgtk_doc=${GTK_DOC:-false} \ + build/ + +${NINJA:=ninja} -v -C build/ +DESTDIR=$PKG $NINJA -C build/ install + +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 HACKING* README* COPYING NEWS \ + $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/libadwaita/libadwaita.info b/libraries/libadwaita/libadwaita.info new file mode 100644 index 0000000000..bdaec4ece6 --- /dev/null +++ b/libraries/libadwaita/libadwaita.info @@ -0,0 +1,10 @@ +PRGNAM="libadwaita" +VERSION="1.0.5" +HOMEPAGE="https://gitlab.gnome.org/GNOME/libadwaita" +DOWNLOAD="https://gitlab.gnome.org/GNOME/libadwaita/-/archive/1.0.5/libadwaita-1.0.5.tar.gz" +MD5SUM="213699e793c2c6a15d939dc85ef8c691" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Logan Rathbone" +EMAIL="poprocks@gmail.com" diff --git a/libraries/libadwaita/slack-desc b/libraries/libadwaita/slack-desc new file mode 100644 index 0000000000..b8d9292faa --- /dev/null +++ b/libraries/libadwaita/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------------------------------------------------------| +libadwaita: libadwaita (GTK 4 library implementing the GNOME HIG) +libadwaita: +libadwaita: Libadwaita is a GTK 4 library implementing the GNOME HIG, +libadwaita: complementing GTK. +libadwaita: +libadwaita: +libadwaita: +libadwaita: +libadwaita: +libadwaita: Homepage: https://gitlab.gnome.org/GNOME/libadwaita +libadwaita: |