mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-26 15:52:15 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
90f914e4a0
@ -7,26 +7,35 @@
|
||||
pkgbase=transmission
|
||||
pkgname=('transmission-cli' 'transmission-qt')
|
||||
pkgver=2.82
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
arch=('x86_64')
|
||||
url="http://www.transmissionbt.com/"
|
||||
license=('MIT')
|
||||
makedepends=('intltool' 'curl' 'pkgconfig' 'desktop-file-utils' 'qt5-base' 'libevent' 'gettext')
|
||||
makedepends=('intltool' 'curl' 'pkgconfig' 'desktop-file-utils' 'qt' 'libevent' 'gettext')
|
||||
source=("http://mirrors.m0k.org/transmission/files/${pkgbase}-${pkgver}.tar.xz"
|
||||
'transmission.systemd' 'transmission.tmpfiles')
|
||||
'transmission.systemd'
|
||||
'transmission.tmpfiles'
|
||||
'build-against-qt-4-and-5.patch')
|
||||
md5sums=('a5ef870c0410b12d10449c2d36fa4661'
|
||||
'5c289c8901221a94be74665368ab5c2c'
|
||||
'23f2320361ad54373c3a4551ef634fe8')
|
||||
'23f2320361ad54373c3a4551ef634fe8'
|
||||
'd747baff383df78e6544d5a0a5106268')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
# with this patch can be build against qt4
|
||||
# upstream included from version > 2.82
|
||||
pushd qt
|
||||
patch -Np0 -i "$srcdir/build-against-qt-4-and-5.patch"
|
||||
popd
|
||||
|
||||
export CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
./configure --prefix=/usr --enable-nls
|
||||
make
|
||||
pushd qt
|
||||
qmake-qt5 qtr.pro
|
||||
qmake qtr.pro
|
||||
make
|
||||
}
|
||||
|
||||
|
84
transmission-qt/build-against-qt-4-and-5.patch
Normal file
84
transmission-qt/build-against-qt-4-and-5.patch
Normal file
@ -0,0 +1,84 @@
|
||||
Index: README.txt
|
||||
===================================================================
|
||||
--- README.txt (revision 14161)
|
||||
+++ README.txt (working copy)
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
BUILDING ON UNIX
|
||||
|
||||
- 1. Prerequisites: Qt >= 5 and its development packages
|
||||
+ 1. Prerequisites: Qt >= 4.6 and its development packages
|
||||
2. Build Transmission as normal
|
||||
- 3. In the qt/ directory, type "qmake qtr.pro" or "qmake-qt5 qtr.pro"
|
||||
+ 3. In the qt/ directory, type "qmake qtr.pro" (or "qmake-qt4 qtr.pro", or "qmake-qt5 qtr.pro")
|
||||
4. In the qt/ directory, type "make"
|
||||
5. In the qt/ directory, as root, type "INSTALL_ROOT=/usr make install"
|
||||
(Feel free to replace /usr with /usr/local or /opt or whatever)
|
||||
Index: favicon.cc
|
||||
===================================================================
|
||||
--- favicon.cc (revision 14161)
|
||||
+++ favicon.cc (working copy)
|
||||
@@ -14,7 +14,12 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
+
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
+#include <QDesktopServices>
|
||||
+#else
|
||||
#include <QStandardPaths>
|
||||
+#endif
|
||||
|
||||
#include "favicon.h"
|
||||
|
||||
@@ -40,7 +45,13 @@
|
||||
QString
|
||||
Favicons :: getCacheDir( )
|
||||
{
|
||||
- const QString base = QStandardPaths::writableLocation (QStandardPaths::CacheLocation);
|
||||
+ const QString base =
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
+ QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
|
||||
+#else
|
||||
+ QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
|
||||
+#endif
|
||||
+
|
||||
return QDir( base ).absoluteFilePath( "favicons" );
|
||||
}
|
||||
|
||||
Index: file-tree.cc
|
||||
===================================================================
|
||||
--- file-tree.cc (revision 14161)
|
||||
+++ file-tree.cc (working copy)
|
||||
@@ -885,7 +885,12 @@
|
||||
for (int i=0; i<NUM_COLUMNS; ++i)
|
||||
{
|
||||
setColumnHidden (i, (i<FIRST_VISIBLE_COLUMN) || (LAST_VISIBLE_COLUMN<i));
|
||||
+
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
+ header()->setResizeMode(i, QHeaderView::Interactive);
|
||||
+#else
|
||||
header()->setSectionResizeMode(i, QHeaderView::Interactive);
|
||||
+#endif
|
||||
}
|
||||
|
||||
connect (this, SIGNAL(clicked(const QModelIndex&)),
|
||||
Index: qtr.pro
|
||||
===================================================================
|
||||
--- qtr.pro (revision 14161)
|
||||
+++ qtr.pro (working copy)
|
||||
@@ -12,9 +12,13 @@
|
||||
man.files = transmission-qt.1
|
||||
|
||||
CONFIG += qt thread debug link_pkgconfig
|
||||
-QT += network dbus widgets
|
||||
+QT += network dbus
|
||||
PKGCONFIG = fontconfig libcurl openssl libevent
|
||||
|
||||
+greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
+ QT += widgets
|
||||
+}
|
||||
+
|
||||
TRANSMISSION_TOP = ..
|
||||
|
||||
include(config.pri)
|
Loading…
Reference in New Issue
Block a user