From f30eb5332eeddf4a4f52932c359be8a34373e2f0 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 10 Jul 2018 02:19:16 +0000 Subject: [PATCH] added community/qtox --- community/qtox/PKGBUILD | 78 +++++++++++++++++++++++++++++++++ community/qtox/atomic.patch | 24 ++++++++++ community/qtox/autoaccept.patch | 13 ++++++ 3 files changed, 115 insertions(+) create mode 100644 community/qtox/PKGBUILD create mode 100644 community/qtox/atomic.patch create mode 100644 community/qtox/autoaccept.patch diff --git a/community/qtox/PKGBUILD b/community/qtox/PKGBUILD new file mode 100644 index 000000000..9178d8257 --- /dev/null +++ b/community/qtox/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: Jiachen Yang +# AUR Maintainer: Vlad M. +# Contributor: Håvard Pettersson +# Contributor: Kevin MacMartin + +# ALARM: Kevin Mihelich +# - patch to explicitly link against libatomic for v5/v6 + +pkgname=qtox +_pkgname=qTox +pkgver=1.16.1 +pkgrel=1 +_gitver='4921b8868f02ddcfc06d617be886547d59a388d6' +pkgdesc='Powerful Tox client written in C++/Qt that follows the Tox design guidelines' +arch=('x86_64') +url='https://github.com/tux3/qTox' +license=('GPL3') +depends=('desktop-file-utils' + 'libxss' + 'openal' + 'gtk2' + 'ffmpeg' + 'qrencode' + 'qt5-svg' + 'sqlcipher' + 'libexif' + 'toxcore' + 'libgl') +makedepends=('qt5-tools' 'git' 'check' 'cmake' 'mesa' 'libglvnd') + +source=( + "https://github.com/$_pkgname/$_pkgname/releases/download/v$pkgver/v$pkgver.tar.lz" + "https://github.com/$_pkgname/$_pkgname/releases/download/v$pkgver/v$pkgver.tar.lz.asc" + 'atomic.patch' + ) +sha512sums=('e2da3e229bce54ea36403d9a31cc6e12b1a1a350726e00b4b9221f3e196289c8655e5351a23cc54e7491ab08274c08b98cc443b730fa55ce2ad192f67f151630' + 'SKIP' + '07c18349c92648455fc603581a594fc1cc30d706d3c136027b5b2a11218b769391a4469b6c9da8afc59d10f43ec6f5b63b7cde899e1286fc17c7d9dbcf570152') + +## GPG key fingerprints taken from https://github.com/qTox/qTox/blob/$_gitver/README.md +validpgpkeys=('DA262CC93C0E1E525AD21C8596775D454B8EBF44' # sudden6 + 'BA7883E22F9D35945BA3376053137C3033F09008' # Zetok Zalbavar + '1157616BBD860C539926F8139591A163FF9BE04C' # - antis81 + '31039166FA902CA50D05D6085AF9F2E29107C727' # - Diadlo + 'C7A2552D0B250F983827742C133203A3AC399151' # - initramfs + '2880C860D95C909D3DA45C687E086DD661263264' # - tux3 + '74ADB7A7F8ECC1009916C4E42AA8E0DA1B31FB3C' # - AnthonyBilinski subkey + '7EB339FE881747E701B7D472EBE36E66A8429B99' # - AnthonyBilinski + 'CA9221C5389B7C50AA5F779352A50775BE13DF17' # - noavarice + '141C880E8BA25B198D0F850F7C132143C1A3A7D4' # – tox-user + ) + +prepare() { + # disable -Werror for release packaging + sed -e 's|-Werror||' -i CMakeLists.txt + if [[ $CARCH == "arm" || $CARCH == "armv6h" ]]; then + patch -p1 -i atomic.patch + fi +} + +check() { + cd build + make test +} + +build() { + mkdir -p build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + -DGIT_VERSION=$_gitver \ + -DGIT_DESCRIBE=v$pkgver + make +} + +package() { + cd build + make DESTDIR="$pkgdir" install +} diff --git a/community/qtox/atomic.patch b/community/qtox/atomic.patch new file mode 100644 index 000000000..c9fbd212a --- /dev/null +++ b/community/qtox/atomic.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d51e6e3d..8bd39e95 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -610,7 +610,8 @@ add_library(${PROJECT_NAME}_static + ${${PROJECT_NAME}_SOURCES} + ${${PROJECT_NAME}_QM_FILES}) + target_link_libraries(${PROJECT_NAME}_static +- ${ALL_LIBRARIES}) ++ ${ALL_LIBRARIES} ++ atomic) + + add_executable(${PROJECT_NAME} + WIN32 +@@ -619,7 +620,8 @@ add_executable(${PROJECT_NAME} + src/main.cpp) + target_link_libraries(${PROJECT_NAME} + ${PROJECT_NAME}_static +- ${ALL_LIBRARIES}) ++ ${ALL_LIBRARIES} ++ atomic) + + include(Testing) + include(Installation) diff --git a/community/qtox/autoaccept.patch b/community/qtox/autoaccept.patch new file mode 100644 index 000000000..7c8a78152 --- /dev/null +++ b/community/qtox/autoaccept.patch @@ -0,0 +1,13 @@ +diff --git a/src/widget/friendwidget.cpp b/src/widget/friendwidget.cpp +index 752c2f81..a0d76c58 100644 +--- a/src/widget/friendwidget.cpp ++++ b/src/widget/friendwidget.cpp +@@ -222,7 +222,7 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event) + Settings::getInstance().setAutoAcceptDir(id, ""); + } else if (autoAccept->isChecked()) { + const QString dir = QFileDialog::getExistingDirectory( +- Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir); ++ Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), Settings::getInstance().getAutoAcceptDir(id)); + + autoAccept->setChecked(true); + qDebug() << "Setting auto accept dir for" << friendId << "to" << dir;