From ee31cb7cc1c27dbca84ebef88a4d42ef59ebd55b Mon Sep 17 00:00:00 2001 From: Christoph Willing Date: Thu, 18 Aug 2016 08:06:40 +1000 Subject: [PATCH] network/uTox: Updated for version 0.9.8 + new maintainer Signed-off-by: Christoph Willing --- network/uTox/README | 8 ++++---- network/uTox/doinst.sh | 10 ++++++++++ network/uTox/gtk2.diff | 6 +++--- network/uTox/locationfix.diff | 13 ------------- network/uTox/uTox.SlackBuild | 32 ++++++++++++-------------------- network/uTox/uTox.info | 10 +++++----- 6 files changed, 34 insertions(+), 45 deletions(-) create mode 100644 network/uTox/doinst.sh delete mode 100644 network/uTox/locationfix.diff diff --git a/network/uTox/README b/network/uTox/README index 240e2d591d..e4ffcc283c 100644 --- a/network/uTox/README +++ b/network/uTox/README @@ -1,5 +1,5 @@ -Lightweight Tox client that uses Xlib. Supports many features and is on-par with other Tox clients. +Lightweight Tox client that uses Xlib. +Supports many features and is on-par with other Tox clients. -By default, it builds with GTK2. If you want to build with GTK3 support, do: - -GTK3=YES ./uTox.Slackbuild +To build with GTK3 support instead of the default GTK2, execute: + GTK3=yes ./uTox.Slackbuild diff --git a/network/uTox/doinst.sh b/network/uTox/doinst.sh new file mode 100644 index 0000000000..daf1ce3148 --- /dev/null +++ b/network/uTox/doinst.sh @@ -0,0 +1,10 @@ + +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/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/network/uTox/gtk2.diff b/network/uTox/gtk2.diff index 7dc1379691..c6c86ab6e2 100644 --- a/network/uTox/gtk2.diff +++ b/network/uTox/gtk2.diff @@ -1,11 +1,11 @@ ---- uTox-0.5.0/xlib/gtk.c 2015-12-20 00:57:28.000000000 -0700 -+++ uTox-0.5.0-fix/xlib/gtk.c 2015-12-24 10:59:28.346223121 -0700 +--- uTox-0.5.0/src/xlib/gtk.c 2015-12-20 00:57:28.000000000 -0700 ++++ uTox-0.5.0-fix/src/xlib/gtk.c 2015-12-24 10:59:28.346223121 -0700 @@ -2,7 +2,7 @@ #include #include -#define LIBGTK_FILENAME "libgtk-3.so.0" -+#define LIBGTK_FILENAME "libgtk-x11-2.0.so.0" ++#define LIBGTK_FILENAME "libgtk-x11-2.0.so" #define GTK_FILE_CHOOSER_ACTION_OPEN 0 #define GTK_FILE_CHOOSER_ACTION_SAVE 1 diff --git a/network/uTox/locationfix.diff b/network/uTox/locationfix.diff deleted file mode 100644 index bb74652ea2..0000000000 --- a/network/uTox/locationfix.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- uTox-0.5.0/Makefile 2015-12-20 00:57:28.000000000 -0700 -+++ uTox-0.5.0-fix/Makefile 2015-12-24 10:57:21.787213435 -0700 -@@ -127,8 +127,8 @@ - install -m 644 utox.desktop $(DESTDIR)$(PREFIX)/share/applications/utox.desktop - if [ "$(UNITY)" -eq "1" ]; then echo "X-MessagingMenu-UsesChatSection=true" >> $(DESTDIR)$(PREFIX)/share/applications/utox.desktop; fi - -- mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 -- install -m 644 utox.1 $(DESTDIR)$(PREFIX)/share/man/man1/utox.1 -+ mkdir -p $(DESTDIR)$(PREFIX)/man/man1 -+ install -m 644 utox.1 $(DESTDIR)$(PREFIX)/man/man1/utox.1 - - $(OBJ): %.o: %.c $(HEADERS) - @echo " CC $@" diff --git a/network/uTox/uTox.SlackBuild b/network/uTox/uTox.SlackBuild index 967b6407e8..79fbdb7faa 100644 --- a/network/uTox/uTox.SlackBuild +++ b/network/uTox/uTox.SlackBuild @@ -3,11 +3,9 @@ # Slackware build script for uTox # # Copyright 2015 Gethyn ThomasQuail +# Copyright 2016 Christoph Willing Brisbane, Australia # All rights reserved. # -# Tiny bit of shell from: -# Wine SlackBuild by David Woodfall Copyright 2011 -# # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. @@ -21,13 +19,13 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. PRGNAM=uTox -VERSION=${VERSION:-0.5.0} +VERSION=${VERSION:-0.9.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -38,8 +36,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -60,6 +58,7 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz cd $PRGNAM-$VERSION +sed -i -e 's:DIR)/man:DIR)/../man:g' Makefile chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -67,26 +66,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fixes man install directory -patch -p1 < $CWD/locationfix.diff - -# Build with GTK2 by default -GTK3=${GTK3:-NO} - -if [ "$GTK3" = "NO" ]; then - patch -p1 < $CWD/gtk2.diff -fi +# Use GTK2 as default +[ GTK3=${GTK3:-no} != "yes" ] && patch -p1 < $CWD/gtk2.diff make -make DESTDIR=$PKG \ - PREFIX=/usr \ - install +make install \ + DESTDIR=$PKG \ + PREFIX=/usr 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE README.md utox_theme.ini $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md src/utox_theme.ini $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/network/uTox/uTox.info b/network/uTox/uTox.info index 5295fa27f5..9b873477ed 100644 --- a/network/uTox/uTox.info +++ b/network/uTox/uTox.info @@ -1,10 +1,10 @@ PRGNAM="uTox" -VERSION="0.5.0" +VERSION="0.9.8" HOMEPAGE="https://github.com/GrayHatter/utox" -DOWNLOAD="https://github.com/GrayHatter/uTox/archive/v0.5.0.tar.gz" -MD5SUM="de906e2a5dad1b1da0465462429bb037" +DOWNLOAD="https://github.com/GrayHatter/uTox/archive/v0.9.8.tar.gz" +MD5SUM="ac70ab7f10646e4af2bbb5437c20ee1f" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="toxcore libfilteraudio" -MAINTAINER="Gethyn ThomasQuail" -EMAIL="gethyn@bloodbathsoftworks.com" +MAINTAINER="Christoph Willing" +EMAIL="chris.willing@linux.com"