diff options
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-Support-miniupnpc-version-1.9.20150730.patch | 29 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | drawpile.install | 1 | ||||
-rw-r--r-- | drawpile103.patch | 111 |
5 files changed, 145 insertions, 58 deletions
@@ -1,11 +1,13 @@ +# Generated by mksrcinfo v8 +# Sat Feb 6 18:10:00 UTC 2016 pkgbase = drawpile pkgdesc = Collaborative drawing program specially made for use with pen tablets pkgver = 1.0.2 - pkgrel = 2 + pkgrel = 3 url = http://drawpile.net/ install = drawpile.install - arch = x86_64 arch = i686 + arch = x86_64 license = GPL2 makedepends = qt5-tools makedepends = qt5-svg @@ -21,9 +23,9 @@ pkgbase = drawpile optdepends = libmicrohttpd: web-admin feature (server dependency) optdepends = libsystemd: systemd and logging support (server dependency) source = http://drawpile.net/files/src/drawpile-1.0.2.tar.gz - source = 0001-Support-miniupnpc-version-1.9.20150730.patch + source = drawpile103.patch sha256sums = 012a470316ccca51a28700948cd3f866c9b7fcc8fa9bfa21f27f28e9dc53f019 - sha256sums = 8bfda21cf734a36cafeeac1132337dbfddfb464f104a0c67acf9d5f4fc432727 + sha256sums = f25371be6b712c079dc1e742f246e2b9b60a9c6b083c3cebf60916c80521e160 pkgname = drawpile diff --git a/0001-Support-miniupnpc-version-1.9.20150730.patch b/0001-Support-miniupnpc-version-1.9.20150730.patch deleted file mode 100644 index 07da695a2ea0..000000000000 --- a/0001-Support-miniupnpc-version-1.9.20150730.patch +++ /dev/null @@ -1,29 +0,0 @@ -From cdd4942e035a9dcddc1918ccb418affb056d6128 Mon Sep 17 00:00:00 2001 -From: Calle Laakkonen <laakkonenc@gmail.com> -Date: Wed, 30 Sep 2015 21:14:56 +0300 -Subject: [PATCH] Support miniupnpc version 1.9.20150730 - -Issue #273 ---- - src/client/net/upnp.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/client/net/upnp.cpp b/src/client/net/upnp.cpp -index f31c972..543432a 100644 ---- a/src/client/net/upnp.cpp -+++ b/src/client/net/upnp.cpp -@@ -92,7 +92,11 @@ bool UPnPClient::doDiscover() - return true; - - int error; -+#if MINIUPNPC_API_VERSION < 14 - d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, &error); -+#else -+ d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &error); -+#endif - if(!d->devices) { - qWarning("UPnP: Error (%d) discovering devices!", error); - return false; --- -2.6.2 - @@ -4,9 +4,9 @@ pkgname=drawpile pkgver=1.0.2 -pkgrel=2 +pkgrel=3 pkgdesc='Collaborative drawing program specially made for use with pen tablets' -arch=('x86_64' 'i686') +arch=('i686' 'x86_64') url='http://drawpile.net/' license=('GPL2') depends=('karchive' 'qt5-multimedia' 'desktop-file-utils') @@ -19,54 +19,58 @@ optdepends=('kdnssd: automatic service discovery (such as printers)' makedepends=('qt5-tools' 'qt5-svg' 'ninja' 'cmake') install="${pkgname}.install" source=("http://drawpile.net/files/src/${pkgname}-${pkgver}.tar.gz" - '0001-Support-miniupnpc-version-1.9.20150730.patch') + 'drawpile103.patch') sha256sums=('012a470316ccca51a28700948cd3f866c9b7fcc8fa9bfa21f27f28e9dc53f019' - '8bfda21cf734a36cafeeac1132337dbfddfb464f104a0c67acf9d5f4fc432727') + 'f25371be6b712c079dc1e742f246e2b9b60a9c6b083c3cebf60916c80521e160') - ## SET TO 'SERVER' OR 'CLIENT' FOR BUILDING SERVER OR CLIENT ONLY ## - BUILD='BOTH' +## SET TO 'SERVER' OR 'CLIENT' FOR BUILDING SERVER OR CLIENT ONLY ## +_build='BOTH' +_cmakeargs=('-Wno-dev') + +## Used for interactive makepkg later ## +# msg "If you wish to only install the server or client set '_build' to 'SERVER' or 'CLIENT' in the provided PKGBUILD file and recompile this package." +# msg2 "The package 'customizepkg' may be helpful in this case." prepare() { cd "${pkgname}-${pkgver}" - patch -p1 -i '../0001-Support-miniupnpc-version-1.9.20150730.patch' + msg2 'Applying patches of unofficial Drawpile 1.0.3' + patch -p1 -i '../drawpile103.patch' } build() { cd "${pkgname}-${pkgver}" # Ensure build is an empty directory - rm -rf build - mkdir -p build - cd build - - local makeargs='' + rm -rf 'build' + mkdir -p 'build' + cd 'build' - if [ -z "$BUILD" ]; then - BUILD='BOTH' + if [ -z "${_build}" ]; then + _build='BOTH' fi - if [ "$BUILD" == 'CLIENT' ]; then + if [ "${_build}" == 'CLIENT' ]; then warning 'BUILDING CLIENT ONLY.' - makeargs='-DSERVER=off' - elif [ "$BUILD" == 'SERVER' ]; then + _cmakeargs+=('-DSERVER=off') + elif [ "${_build}" == 'SERVER' ]; then warning 'BUILDING STAND-ALONE SERVER ONLY.' - makeargs='-DCLIENT=off' - elif [ "$BUILD" != 'BOTH' ]; then - error "You can set 'BUILD' TO 'SERVER', 'CLIENT' or 'BOTH' only!" + _cmakeargs+=('-DCLIENT=off') + elif [ "${_build}" != 'BOTH' ]; then + error "You can set '_build' TO 'SERVER', 'CLIENT' or 'BOTH' only!" return 1 fi - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -G Ninja -Wno-dev $makeargs + cmake .. -DCMAKE_INSTALL_PREFIX='/usr' -G Ninja "${_cmakeargs[@]}" ninja } package() { cd "${pkgname}-${pkgver}" - DESTDIR="$pkgdir" ninja -C build install - install -Dm644 "desktop/${pkgname}-128x128.png" \ - "${pkgdir}/usr/share/pixmaps/${pkgname}.png" + DESTDIR="${pkgdir}" ninja -C 'build' install + install -Dm644 "desktop/${pkgname}.svg" \ + "${pkgdir}/usr/share/pixmaps/${pkgname}.svg" install -Dm644 "desktop/${pkgname}.desktop" \ "${pkgdir}/usr/share/applications/${pkgname}.desktop" } diff --git a/drawpile.install b/drawpile.install index ace6a9c3f0df..bb7981908ba3 100644 --- a/drawpile.install +++ b/drawpile.install @@ -20,7 +20,6 @@ _update() { post_install() { _update note "If installing optional dependencies afterwards you may have to recompile this package." - #note "If you wish to only install the server or client set 'BUILD' to 'SERVER' or 'CLIENT' in the PKGBUILD file and recompile this package." } post_upgrade() { diff --git a/drawpile103.patch b/drawpile103.patch new file mode 100644 index 000000000000..eba1428fcd89 --- /dev/null +++ b/drawpile103.patch @@ -0,0 +1,111 @@ +diff --git a/ChangeLog b/ChangeLog +index feb0daf..76d59d9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2015-1?-?? Version 1.0.3 ++ * Remember last used path when saving files ++ * Support new miniupnpc library version ++ + 2015-09-13 Version 1.0.2 + * Fixed crash when smoother was set to zero + * Server: added command line option to enable split recording mode (new recording for each snapshot) +diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt +index 30dde26..9bbf5f2 100644 +--- a/src/client/CMakeLists.txt ++++ b/src/client/CMakeLists.txt +@@ -212,6 +212,7 @@ else() + ) + qt5_add_resources( QtResource bundled/QtColorWidgets/color_widgets.qrc ) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/bundled/QtColorWidgets") ++ add_definitions(-DQTCOLORPICKER_STATICALLY_LINKED) + endif() + + qt5_wrap_ui( UI_Headers ${UIs} ) +diff --git a/src/client/bundled/QtColorWidgets/color_utils.cpp b/src/client/bundled/QtColorWidgets/color_utils.cpp +index b153158..1d829d6 100644 +--- a/src/client/bundled/QtColorWidgets/color_utils.cpp ++++ b/src/client/bundled/QtColorWidgets/color_utils.cpp +@@ -22,6 +22,8 @@ + */ + #include "color_utils.hpp" + ++#include <cmath> ++ + namespace color_widgets { + namespace detail { + +diff --git a/src/client/mainwindow.cpp b/src/client/mainwindow.cpp +index 5e15177..645326a 100644 +--- a/src/client/mainwindow.cpp ++++ b/src/client/mainwindow.cpp +@@ -104,8 +104,8 @@ + namespace { + + QString getLastPath() { +- QSettings cfg; +- return cfg.value("window/lastpath").toString(); ++ QFileInfo fi(QSettings().value("window/lastpath").toString()); ++ return fi.absoluteDir().absolutePath(); + } + + void setLastPath(const QString &lastpath) { +@@ -918,13 +918,8 @@ void MainWindow::open() + QApplication::tr("All Files (*)"); + + // Get the file name to open +-#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)) +- const QUrl file = QFileDialog::getOpenFileUrl(this, +- tr("Open Image"), getLastPath(), filter); +-#else + const QUrl file = QUrl::fromLocalFile(QFileDialog::getOpenFileName(this, + tr("Open Image"), getLastPath(), filter)); +-#endif + + // Open the file if it was selected + if(file.isValid()) { +@@ -1035,7 +1030,6 @@ bool MainWindow::saveas() + // Get the file name + QString file = QFileDialog::getSaveFileName(this, + tr("Save Image"), getLastPath(), filter.join(";;"), &selfilter); +- + if(file.isEmpty()==false) { + + // Set file suffix if missing +@@ -1073,6 +1067,8 @@ bool MainWindow::saveas() + _autosave->setEnabled(true); + setWindowModified(false); + updateTitle(); ++ setLastPath(file); ++ addRecentFile(file); + return true; + } + } +diff --git a/src/client/net/upnp.cpp b/src/client/net/upnp.cpp +index f31c972..543432a 100644 +--- a/src/client/net/upnp.cpp ++++ b/src/client/net/upnp.cpp +@@ -92,7 +92,11 @@ bool UPnPClient::doDiscover() + return true; + + int error; ++#if MINIUPNPC_API_VERSION < 14 + d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, &error); ++#else ++ d->devices = upnpDiscover(2000, nullptr, nullptr, 0, 0, 2, &error); ++#endif + if(!d->devices) { + qWarning("UPnP: Error (%d) discovering devices!", error); + return false; +diff --git a/src/shared/bundled/karchive/karchive_bundled.h b/src/shared/bundled/karchive/karchive_bundled.h +index 29cffdd..78c9f86 100644 +--- a/src/shared/bundled/karchive/karchive_bundled.h ++++ b/src/shared/bundled/karchive/karchive_bundled.h +@@ -28,6 +28,7 @@ + #include <QtCore/QString> + #include <QtCore/QStringList> + #include <QtCore/QHash> ++#include <QtCore/QIODevice> + + #ifdef Q_OS_WIN + #include <qplatformdefs.h> // mode_t |