summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-04-08 21:15:29 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-04-08 21:26:20 +0200
commit7c4215924fc8369d0321cbca1203d2f08d54933a (patch)
treea6d31e6158806924deac009c52e18446b709f337 /media-sound/qtscrobbler
parentapp-emacs/slime: Fix doc build (diff)
downloadgentoo-7c4215924fc8369d0321cbca1203d2f08d54933a.tar.gz
gentoo-7c4215924fc8369d0321cbca1203d2f08d54933a.tar.bz2
gentoo-7c4215924fc8369d0321cbca1203d2f08d54933a.zip
media-sound/qtscrobbler: Switch to Qt5
Patch kindly borrowed from Debian. Bug: https://bugs.gentoo.org/641922 Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'media-sound/qtscrobbler')
-rw-r--r--media-sound/qtscrobbler/Manifest1
-rw-r--r--media-sound/qtscrobbler/files/qtscrobbler-0.11_pre20130123-qt5.patch194
-rw-r--r--media-sound/qtscrobbler/qtscrobbler-0.11_pre20130123.ebuild56
3 files changed, 251 insertions, 0 deletions
diff --git a/media-sound/qtscrobbler/Manifest b/media-sound/qtscrobbler/Manifest
index 936f50aaf1d0..6dcf57b924a2 100644
--- a/media-sound/qtscrobbler/Manifest
+++ b/media-sound/qtscrobbler/Manifest
@@ -1 +1,2 @@
DIST qtscrob-0.10.tar.bz2 132507 BLAKE2B 168bc3747bb48e7c5fedbaeb66cf12c4d7230fb240fb9b034b576f739ef55c497cdb6d8383bace8a00ad54890882134598777acc826d8ced195488b932123e92 SHA512 d743976ef26c4f61402187930ac2cfba71bc4d7079e1166bdb34115196c99d3e0093a4df06d4b0eda24ab4f0f6fcce840812fd2d1dff847dc905adc9a74127c5
+DIST qtscrobbler-0.11_pre20130123.zip 298519 BLAKE2B 36d3c3fdf59aa7fd9127c0200b03a6427f6fa27cb40e144f10041a25ba977e40fc5f63547596cf93f797d94e741a4a159c5e1aa48f8742d7738d1c113b22aae8 SHA512 24de4a45d4b31fb3c544b963b97b8716b8472a0dfde1bd2fd6bf101785f22ef07ff34fcd9ce7028fe231b215538bb8e4c3248c234feb870a3adeb4c0b259d646
diff --git a/media-sound/qtscrobbler/files/qtscrobbler-0.11_pre20130123-qt5.patch b/media-sound/qtscrobbler/files/qtscrobbler-0.11_pre20130123-qt5.patch
new file mode 100644
index 000000000000..910471aca6c0
--- /dev/null
+++ b/media-sound/qtscrobbler/files/qtscrobbler-0.11_pre20130123-qt5.patch
@@ -0,0 +1,194 @@
+Origin: other, https://sourceforge.net/p/qtscrob/patches/15/
+Bug: https://sourceforge.net/p/qtscrob/patches/15/
+Bug-Debian: https://bugs.debian.org/875156
+Description: Port to Qt5
+
+--- a/src/lib/gettrackinfo.cpp
++++ b/src/lib/gettrackinfo.cpp
+@@ -58,7 +58,7 @@
+ data += "&track=" + QUrl::toPercentEncoding(track_info.title);
+ data += "&autocorrect=1";
+ time.restart();
+- manager->post(request, QByteArray(data.toAscii()));
++ manager->post(request, QByteArray(data.toLatin1()));
+ }
+
+ void GetTrackInfo::run()
+--- a/src/lib/lib.pro
++++ b/src/lib/lib.pro
+@@ -13,7 +13,8 @@
+ QT += core \
+ network \
+ xml \
+- sql
++ sql \
++ widgets
+
+ QT -= gui
+ LANGUAGE = C++
+--- a/src/lib/parse-log.cpp
++++ b/src/lib/parse-log.cpp
+@@ -153,9 +153,9 @@
+ //right number of tabs in the line
+ scrob_entry temp_entry;
+
+- temp_entry.artist = QString::fromUtf8(log_entry[0].toAscii());
+- temp_entry.album = QString::fromUtf8(log_entry[1].toAscii());
+- temp_entry.title = QString::fromUtf8(log_entry[2].toAscii());
++ temp_entry.artist = QString::fromUtf8(log_entry[0].toLatin1());
++ temp_entry.album = QString::fromUtf8(log_entry[1].toLatin1());
++ temp_entry.title = QString::fromUtf8(log_entry[2].toLatin1());
+ temp_entry.tracknum = log_entry[3].toInt();
+ temp_entry.length = log_entry[4].toInt();
+ temp_entry.played = log_entry[5][0];
+--- a/src/lib/submit.cpp
++++ b/src/lib/submit.cpp
+@@ -151,7 +151,7 @@
+ submit_handshake.setHeader(QNetworkRequest::ContentTypeHeader,
+ "application/x-www-form-urlencoded");
+
+- QByteArray submit_data = QByteArray(data.toAscii());
++ QByteArray submit_data = QByteArray(data.toLatin1());
+ nr_submit = nam_submit->post(submit_handshake, submit_data);
+ }
+
+@@ -251,7 +251,7 @@
+ QString time_str = QString::number(QDateTime::currentDateTime().toTime_t());
+
+ QCryptographicHash auth_hash(QCryptographicHash::Md5);
+- auth_hash.addData(QString(context.password_hash + time_str).toAscii());
++ auth_hash.addData(QString(context.password_hash + time_str).toLatin1());
+ QString auth = QString(auth_hash.result().toHex());
+
+ QUrl url_handshake = QString( "http://%1/?hs=true&p=%2&c=%3&v=%4&u=%5&t=%6&a=%7" )
+--- a/src/lib/submit.h
++++ b/src/lib/submit.h
+@@ -20,7 +20,6 @@
+ #define SUBMIT_H
+
+ #include <QtCore>
+-#include <QHttp>
+ #include <QNetworkAccessManager>
+ #include <QNetworkProxy>
+ #include <QNetworkReply>
+--- a/src/qt/qt.pro
++++ b/src/qt/qt.pro
+@@ -34,6 +34,7 @@
+ TEMPLATE = app
+ TARGET = qtscrob
+ QT += gui
++QT += widgets
+ LANGUAGE = C++
+ INCLUDEPATH += . \
+ src \
+--- a/src/qt/src/about.h
++++ b/src/qt/src/about.h
+@@ -22,6 +22,7 @@
+ #include "ui_aboutWin.h"
+ #include <QApplication>
+ #include <QtGui>
++#include <QLabel>
+
+ class QTScrob;
+
+--- a/src/qt/src/console.h
++++ b/src/qt/src/console.h
+@@ -22,6 +22,11 @@
+ #include <QTimer>
+ #include <QApplication>
+ #include <QtGui>
++#include <QLabel>
++#include <QTextEdit>
++#include <QDialog>
++#include <QComboBox>
++#include <QPushButton>
+
+ class QTScrob;
+ class QTimer;
+--- a/src/qt/src/help.h
++++ b/src/qt/src/help.h
+@@ -21,6 +21,9 @@
+
+ #include <QApplication>
+ #include <QtGui>
++#include <QLabel>
++#include <QDialog>
++#include <QTextEdit>
+
+ class QTScrob;
+
+--- a/src/qt/src/progress.h
++++ b/src/qt/src/progress.h
+@@ -21,6 +21,13 @@
+
+ #include <QApplication>
+ #include <QtGui>
++#include <QLabel>
++#include <QWidget>
++#include <QProgressBar>
++#include <QDialog>
++#include <QFormLayout>
++#include <QVBoxLayout>
++#include <QPushButton>
+
+ class QTScrob;
+
+--- a/src/qt/src/qtscrob.cpp
++++ b/src/qt/src/qtscrob.cpp
+@@ -41,7 +41,7 @@
+ logTable->setHorizontalHeaderLabels(tableLabels);
+ logTable->setAlternatingRowColors(true);
+ logTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+- logTable->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
++ logTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
+ logTable->installEventFilter(this);
+
+ recalc_timestamp = scrob->get_gmt();
+@@ -600,7 +600,7 @@
+ case 5:
+ if (!logTable->item(r, c)->text().isEmpty())
+ {
+- char rating = logTable->item(r, c)->text().toAscii().data()[0];
++ char rating = logTable->item(r, c)->text().toLatin1().data()[0];
+ if ('L' == rating || 'S' == rating)
+ tmp.played = rating;
+ }
+--- a/src/qt/src/qtscrob.h
++++ b/src/qt/src/qtscrob.h
+@@ -23,12 +23,20 @@
+ #include <QtGui>
+ #include <QApplication>
+ #include <QMainWindow>
++#include <QTableWidget>
++#include <QMenu>
++#include <QMenuBar>
++#include <QStatusBar>
++#include <QFile>
++#include <QFileDialog>
++#include <QTextEdit>
+ #include <QMessageBox>
+ #include <QByteArray>
+ #include <QtDebug>
+ #include <QSettings>
+ #include <QDateTimeEdit>
+ #include <QLabel>
++#include <QWidget>
+ #include "libscrobble.h"
+ #include "common.h"
+ #include "missingtimeprogress.h"
+--- a/src/qtscrob.pro
++++ b/src/qtscrob.pro
+@@ -1,4 +1,4 @@
+-VER = $$find(QT_VERSION, ^4\\.[6-9]+.*)
++VER = $$find(QT_VERSION, ^4\\.[6-9]+.*|^5)
+ isEmpty(VER) {
+ message("Qt >= 4.6 required!")
+ !isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION])
+@@ -17,6 +17,7 @@
+ system($$QMAKE_LUPDATE -silent language/language.pro)
+ system($$QMAKE_LRELEASE -silent language/language.pro)
+
++QT += widgets
+ TEMPLATE=subdirs
+ SUBDIRS=lib qt cli
+ CONFIG += ordered
diff --git a/media-sound/qtscrobbler/qtscrobbler-0.11_pre20130123.ebuild b/media-sound/qtscrobbler/qtscrobbler-0.11_pre20130123.ebuild
new file mode 100644
index 000000000000..6a3e9163a25b
--- /dev/null
+++ b/media-sound/qtscrobbler/qtscrobbler-0.11_pre20130123.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+COMMIT=33ed278b9b543554fd6a556fd391eb4c78faab07
+MY_PN=qtscrob
+MY_P=${MY_PN}-${PV}
+inherit desktop gnome2-utils qmake-utils toolchain-funcs
+
+DESCRIPTION="Updates last.fm profiles using information from supported portable music players"
+HOMEPAGE="http://qtscrob.sourceforge.net/"
+SRC_URI="https://sourceforge.net/code-snapshots/git/q/qt/${MY_PN}/code.git/${MY_PN}-code-${COMMIT}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsql:5
+ dev-qt/qtwidgets:5
+ media-libs/libmtp:=
+ net-misc/curl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_PN}-code-${COMMIT}"
+
+PATCHES=( "${FILESDIR}"/${P}-qt5.patch )
+
+src_configure() {
+ pushd src >/dev/null
+ eqmake5 ${MY_PN}.pro
+ popd >/dev/null
+}
+
+src_compile() {
+ emake -C src
+}
+
+src_install() {
+ newbin src/cli/scrobbler qtscrobbler-cli
+
+ newbin src/qt/qtscrob qtscrobbler
+ newicon src/qt/resources/icons/256x256/qtscrob.png qtscrobbler.png
+ make_desktop_entry qtscrobbler QtScrobbler
+
+ einstalldocs
+}
+
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }