diff options
author | Mario Preksavec <mario at slackware dot hr> | 2015-04-24 23:06:30 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-04-24 23:06:30 +0700 |
commit | 64036616072e51960d00201e6adf76deab31f0fa (patch) | |
tree | 79588890f976d99eae0699893cfe3db5a84beb11 /network/qTox | |
parent | 8d52fc92fd319ba7ac6fb4e922eff5fa98eaf8a5 (diff) | |
download | slackbuilds-64036616072e51960d00201e6adf76deab31f0fa.tar.gz |
network/qTox: Added (Qt Tox client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/qTox')
-rw-r--r-- | network/qTox/README | 7 | ||||
-rw-r--r-- | network/qTox/doinst.sh | 13 | ||||
-rw-r--r-- | network/qTox/patches/load_friend_name_with_history.diff | 34 | ||||
-rw-r--r-- | network/qTox/patches/remove_statusnotifier_dependency.diff | 13 | ||||
-rw-r--r-- | network/qTox/patches/remove_theme_group_minimum_size.diff | 15 | ||||
-rw-r--r-- | network/qTox/patches/unhide_faux_offline_setting.diff | 11 | ||||
-rw-r--r-- | network/qTox/patches/use_desktop_fallback_variable.diff | 12 | ||||
-rw-r--r-- | network/qTox/qTox.SlackBuild | 108 | ||||
-rw-r--r-- | network/qTox/qTox.info | 10 | ||||
-rw-r--r-- | network/qTox/slack-desc | 19 |
10 files changed, 242 insertions, 0 deletions
diff --git a/network/qTox/README b/network/qTox/README new file mode 100644 index 0000000000..ac800e5b2b --- /dev/null +++ b/network/qTox/README @@ -0,0 +1,7 @@ +qTox is a powerful Tox client that tries to follow the Tox design guidelines +while running on all major platforms. + +NOTE: At the time of writing, upstream is getting prepared to migrate everything +to the new Tox API. In the meantime, and until everything is in place for this +change, we are going to use a specific git revision to communicate successfully +with older clients. diff --git a/network/qTox/doinst.sh b/network/qTox/doinst.sh new file mode 100644 index 0000000000..9424ce43ff --- /dev/null +++ b/network/qTox/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/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/qTox/patches/load_friend_name_with_history.diff b/network/qTox/patches/load_friend_name_with_history.diff new file mode 100644 index 0000000000..33dd69d115 --- /dev/null +++ b/network/qTox/patches/load_friend_name_with_history.diff @@ -0,0 +1,34 @@ +diff -urN qTox-3223707.orig/src/friend.cpp qTox-3223707/src/friend.cpp +--- qTox-3223707.orig/src/friend.cpp 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/friend.cpp 2015-04-16 05:55:03.531187202 +0200 +@@ -40,6 +40,11 @@ + chatForm->loadHistory(QDateTime::currentDateTime().addDays(-7), true); + widget->historyLoaded = true; + } ++ if (Settings::getInstance().getEnableLogging()) ++ { ++ chatForm->loadHistory(QDateTime::currentDateTime().addDays(-7), true); ++ widget->historyLoaded = true; ++ } + } + + Friend::~Friend() +diff -urN qTox-3223707.orig/src/widget/form/genericchatform.cpp qTox-3223707/src/widget/form/genericchatform.cpp +--- qTox-3223707.orig/src/widget/form/genericchatform.cpp 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/widget/form/genericchatform.cpp 2015-04-16 05:57:01.339540592 +0200 +@@ -374,6 +374,15 @@ + return res; + } + } ++ // try load alias from settings ++ QString lastTry = Settings::getInstance().getFriendAlias(id); ++ if (!lastTry.isEmpty()) ++ return lastTry; ++ ++ // try load name from tox ++ lastTry = Core::getInstance()->getPeerName(id); ++ if (!lastTry.isEmpty()) ++ return lastTry; + + return QString(); + } diff --git a/network/qTox/patches/remove_statusnotifier_dependency.diff b/network/qTox/patches/remove_statusnotifier_dependency.diff new file mode 100644 index 0000000000..b8ccefcee3 --- /dev/null +++ b/network/qTox/patches/remove_statusnotifier_dependency.diff @@ -0,0 +1,13 @@ +--- qTox-3223707/src/widget/systemtrayicon.cpp.orig 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/widget/systemtrayicon.cpp 2015-04-16 02:22:08.955184668 +0200 +@@ -230,8 +233,8 @@ + g_signal_connect(item, "activate", G_CALLBACK(callback), a); + gtk_widget_show(item); + } +- void (*callbackMenu)(StatusNotifier*, gint, gint, gpointer) = +- [](StatusNotifier*, gint, gint, gpointer data) ++ void (*callbackMenu)(GtkMenu*, gint, gint, gpointer) = ++ [](GtkMenu*, gint, gint, gpointer data) + { + gtk_widget_show_all(((SystemTrayIcon*)data)->gtkMenu); + gtk_menu_popup(GTK_MENU(((SystemTrayIcon*)data)->gtkMenu), 0, 0, 0, 0, 3, gtk_get_current_event_time()); diff --git a/network/qTox/patches/remove_theme_group_minimum_size.diff b/network/qTox/patches/remove_theme_group_minimum_size.diff new file mode 100644 index 0000000000..fd84b34dd1 --- /dev/null +++ b/network/qTox/patches/remove_theme_group_minimum_size.diff @@ -0,0 +1,15 @@ +--- qTox-3223707/src/widget/form/settings/generalsettings.ui.orig 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/widget/form/settings/generalsettings.ui 2015-04-16 05:22:17.389288167 +0200 +@@ -406,12 +406,6 @@ + </item> + <item> + <widget class="QGroupBox" name="themeGroup"> +- <property name="minimumSize"> +- <size> +- <width>0</width> +- <height>232</height> +- </size> +- </property> + <property name="title"> + <string>Theme</string> + </property> diff --git a/network/qTox/patches/unhide_faux_offline_setting.diff b/network/qTox/patches/unhide_faux_offline_setting.diff new file mode 100644 index 0000000000..9a1857d4b7 --- /dev/null +++ b/network/qTox/patches/unhide_faux_offline_setting.diff @@ -0,0 +1,11 @@ +--- qTox-3223707/src/widget/form/settings/generalsettings.ui.orig 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/widget/form/settings/generalsettings.ui 2015-04-15 23:41:44.130802413 +0200 +@@ -391,7 +391,7 @@ + </property> + </widget> + </item> +- <item row="2" column="1"> ++ <item row="2" column="2"> + <widget class="QCheckBox" name="cbGroupchatPosition"> + <property name="toolTip"> + <string comment="toolTip for groupchat positioning">If checked, groupchats will be placed at the top of the friends list, otherwise, they'll be placed below online friends.</string> diff --git a/network/qTox/patches/use_desktop_fallback_variable.diff b/network/qTox/patches/use_desktop_fallback_variable.diff new file mode 100644 index 0000000000..6176029e8c --- /dev/null +++ b/network/qTox/patches/use_desktop_fallback_variable.diff @@ -0,0 +1,12 @@ +--- qTox-3223707/src/widget/systemtrayicon.cpp.orig 2015-04-05 22:37:15.000000000 +0200 ++++ qTox-3223707/src/widget/systemtrayicon.cpp 2015-04-16 02:22:08.955184668 +0200 +@@ -9,6 +9,9 @@ + SystemTrayIcon::SystemTrayIcon() + { + QString desktop = getenv("XDG_CURRENT_DESKTOP"); ++ if (desktop.isEmpty()) { ++ desktop = getenv("DESKTOP_SESSION"); ++ } + desktop = desktop.toLower(); + if (false); + #ifdef ENABLE_SYSTRAY_UNITY_BACKEND diff --git a/network/qTox/qTox.SlackBuild b/network/qTox/qTox.SlackBuild new file mode 100644 index 0000000000..85b2ce33d8 --- /dev/null +++ b/network/qTox/qTox.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/sh + +# Slackware build script for qTox + +# Copyright 2015 Mario Preksavec, Zagreb, Croatia +# 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. + +PRGNAM=qTox +VERSION=${VERSION:-3223707} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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.bz2 +cd $PRGNAM-$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 {} \; + +# Fix some things +patch -p1 < $CWD/patches/unhide_faux_offline_setting.diff +patch -p1 < $CWD/patches/use_desktop_fallback_variable.diff +patch -p1 < $CWD/patches/remove_statusnotifier_dependency.diff +patch -p1 < $CWD/patches/remove_theme_group_minimum_size.diff +patch -p1 < $CWD/patches/load_friend_name_with_history.diff + +# Prevent multilib interference +if [ "$ARCH" = "x86_64" ]; then + sed -i '/\/usr\/lib\/glib-2.0\/include/d' qtox.pro + sed -i '/\/usr\/lib\/gtk-2.0\/include/d' qtox.pro +fi + +qmake-qt5 \ + ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND=NO \ + ENABLE_SYSTRAY_UNITY_BACKEND=NO \ + ENABLE_SYSTRAY_GTK_BACKEND=YES + +make + +# Copy only the fun stuff ;-) +install -D -m0755 -oroot -groot -s qtox $PKG/usr/bin/qtox +install -D -m0644 -oroot -groot $PRGNAM.desktop \ + $PKG/usr/share/applications/$PRGNAM.desktop +install -D -m0644 -oroot -groot img/icons/qtox-64x64.png \ + $PKG/usr/share/icons/hicolor/64x64/apps/qtox.png + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a NURUPOWILLSUEME $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE +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:-tgz} diff --git a/network/qTox/qTox.info b/network/qTox/qTox.info new file mode 100644 index 0000000000..9835cf22e3 --- /dev/null +++ b/network/qTox/qTox.info @@ -0,0 +1,10 @@ +PRGNAM="qTox" +VERSION="3223707" +HOMEPAGE="https://github.com/tux3/qTox" +DOWNLOAD="http://mirror.slackware.hr/sources/qTox/qTox-3223707.tar.bz2" +MD5SUM="1658f034ca0d1e15fd9eea66f84ca6f0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="toxcore libfilteraudio qt5 opencv qrencode libxkbcommon" +MAINTAINER="Mario Preksavec" +EMAIL="mario at slackware dot hr" diff --git a/network/qTox/slack-desc b/network/qTox/slack-desc new file mode 100644 index 0000000000..d93685fd55 --- /dev/null +++ b/network/qTox/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------------------------------------------------------| +qTox: qTox (Qt Tox client) +qTox: +qTox: qTox is a powerful Tox client that tries to follow the Tox design +qTox: guidelines while running on all major platforms. +qTox: +qTox: Homepage: https://github.com/tux3/qTox +qTox: +qTox: +qTox: +qTox: +qTox: |