From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 842871382C5 for ; Sun, 8 Apr 2018 19:26:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9F4EE0AB7; Sun, 8 Apr 2018 19:26:37 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8297FE0AB7 for ; Sun, 8 Apr 2018 19:26:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DE14B335C49 for ; Sun, 8 Apr 2018 19:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E29F026D for ; Sun, 8 Apr 2018 19:26:33 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1523215580.7c4215924fc8369d0321cbca1203d2f08d54933a.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/qtscrobbler/files/, media-sound/qtscrobbler/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/qtscrobbler/Manifest media-sound/qtscrobbler/files/qtscrobbler-0.11_pre20130123-qt5.patch media-sound/qtscrobbler/qtscrobbler-0.11_pre20130123.ebuild X-VCS-Directories: media-sound/qtscrobbler/ media-sound/qtscrobbler/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 7c4215924fc8369d0321cbca1203d2f08d54933a X-VCS-Branch: master Date: Sun, 8 Apr 2018 19:26:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8acdc525-e1ad-4266-8833-30ac80f6e830 X-Archives-Hash: 07cebf91dc5d5fc4b9282d30005cda32 commit: 7c4215924fc8369d0321cbca1203d2f08d54933a Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Apr 8 19:15:29 2018 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Apr 8 19:26:20 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c421592 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 media-sound/qtscrobbler/Manifest | 1 + .../files/qtscrobbler-0.11_pre20130123-qt5.patch | 194 +++++++++++++++++++++ .../qtscrobbler-0.11_pre20130123.ebuild | 56 ++++++ 3 files changed, 251 insertions(+) diff --git a/media-sound/qtscrobbler/Manifest b/media-sound/qtscrobbler/Manifest index 936f50aaf1d..6dcf57b924a 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 00000000000..910471aca6c --- /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 +-#include + #include + #include + #include +--- 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 + #include ++#include + + class QTScrob; + +--- a/src/qt/src/console.h ++++ b/src/qt/src/console.h +@@ -22,6 +22,11 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + + class QTScrob; + class QTimer; +--- a/src/qt/src/help.h ++++ b/src/qt/src/help.h +@@ -21,6 +21,9 @@ + + #include + #include ++#include ++#include ++#include + + class QTScrob; + +--- a/src/qt/src/progress.h ++++ b/src/qt/src/progress.h +@@ -21,6 +21,13 @@ + + #include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + 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 + #include + #include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + #include + #include + #include + #include + #include ++#include + #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 00000000000..6a3e9163a25 --- /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; }