summaryrefslogtreecommitdiffstats
path: root/multimedia/youtube-viewer/youtube-viewer.SlackBuild
diff options
context:
space:
mode:
author B. Watson2020-03-05 23:18:12 +0100
committer Willy Sudiarto Raharjo2020-03-07 08:06:33 +0100
commit187f537fecf7d451e2a8e31469f0d3ce56d08e93 (patch)
tree4a7afdf5fe32357b9fe73923d29e0af06f335b7f /multimedia/youtube-viewer/youtube-viewer.SlackBuild
parent1f9f359f3711f4e64c67df3e45da683cd364fdb7 (diff)
downloadslackbuilds-187f537fecf7d451e2a8e31469f0d3ce56d08e93.tar.gz
multimedia/youtube-viewer: Updated for version 3.7.4.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'multimedia/youtube-viewer/youtube-viewer.SlackBuild')
-rw-r--r--multimedia/youtube-viewer/youtube-viewer.SlackBuild30
1 files changed, 23 insertions, 7 deletions
diff --git a/multimedia/youtube-viewer/youtube-viewer.SlackBuild b/multimedia/youtube-viewer/youtube-viewer.SlackBuild
index fbaf4abde6..a12b886b9d 100644
--- a/multimedia/youtube-viewer/youtube-viewer.SlackBuild
+++ b/multimedia/youtube-viewer/youtube-viewer.SlackBuild
@@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20200305 bkw: updated for 3.7.4, add README stuff about API keys.
# 20200110 bkw: updated for 3.7.0, add .sqf.
# 20191220 bkw: updated for 3.6.0.
# 20191201 bkw: updated for 3.5.9.
@@ -65,7 +66,7 @@
# - Added support for gtk-youtube-viewer
PRGNAM=youtube-viewer
-VERSION=${VERSION:-3.7.0}
+VERSION=${VERSION:-3.7.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch
@@ -86,22 +87,37 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-# perl-gtk2 is a runtime dep, we can build with GTK=yes even if it's not
-# installed... but don't do that by default.
+# perl-gtk2 and perl-Gtk3 are runtime deps, we can build with GTK=yes
+# even if they're not installed... but don't do that by default.
GTK="${GTK:-auto}"
case "$GTK" in
no) BUILD_GTK="no" ;;
yes) BUILD_GTK="yes" ;;
- *) perl -MGtk2 -MFile::ShareDir -e 0 2>/dev/null \
- && BUILD_GTK="yes" \
- || BUILD_GTK="no" ;;
+ *) if perl -MGtk2 -MFile::ShareDir -e 0 2>/dev/null; then
+ BUILD_GTK="yes"
+ elif perl -MGtk3 -MFile::ShareDir -MList::MoreUtils -e 0 2>/dev/null; then
+ BUILD_GTK="yes"
+ else
+ BUILD_GTK="no"
+ fi
+ ;;
esac
[ "$BUILD_GTK" = "yes" ] && GTKOPT="--gtk"
echo "=== HAVE_GTK=$HAVE_GTK BUILD_GTK=$BUILD_GTK"
+# 20200305 bkw: upstream claims gtk+3-3.20 is required, but everything
+# actually works fine with 14.2's 3.18. So:
+sed -i 's,"3.20","3.18",' share/gtk3-$PRGNAM.glade
+
+# 20200305 bkw: 14.2's perl package has List::Util 1.4.1, which lacks
+# the uniq() function. However, SBo's perl-List-MoreUtils provides it.
+# This means we can ignore the build warning:
+# ! List::Util (1.41) is installed, but we need version >= 1.43
+patch -p1 < $CWD/list-moreutils.diff
+
perl Build.PL $GTKOPT prefix=/usr installdirs=vendor --destdir="$PKG"
./Build
./Build test
@@ -123,7 +139,7 @@ if [ "$BUILD_GTK" = "yes" ]; then
# support TERMINAL option for user's preferred terminal.
if [ "$TERMINAL" != "" ]; then
- sed -i "s/'gnome-terminal'/'$TERMINAL', &/" $PKG/usr/bin/gtk-$PRGNAM
+ sed -i "s/'gnome-terminal'/'$TERMINAL', &/" $PKG/usr/bin/gtk?-$PRGNAM
fi
fi