summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Tumaykin <itumaykin@gmail.com>2015-11-30 11:39:25 +0300
committerIlya Tumaykin <itumaykin@gmail.com>2015-11-30 15:07:24 +0300
commit360d05f414d353600b5816704280ad25c2d7afa8 (patch)
treef3737318e8ccbafb7f98073c3ab4b23e6c12c58f /media-sound/flacon
parentmedia-video/ffmpeg: bump to 2.8.3 (diff)
downloadgentoo-360d05f414d353600b5816704280ad25c2d7afa8.tar.gz
gentoo-360d05f414d353600b5816704280ad25c2d7afa8.tar.bz2
gentoo-360d05f414d353600b5816704280ad25c2d7afa8.zip
media-sound/flacon: version bump to 1.2.0 wrt bug #547054, update live
Inherited from Nikoli. List of changes in 1.2.0 compared to 1.0.0 by Nikoli: - add Qt5 support - add Opus output files support - properly separate DEPEND and RDEPEND - rename mp4 USE to aac for clarity, since mp4 is just a container while aac is an actual encoding format that is used - rename ogg USE to vorbis for clarity, since ogg is just a container while vorbis is an actual encoding format that is used - update USE descriptions to clarify which ones are used for input and which ones are used for output - remove ugly 9999 conditionals from ebuild as they make it hard to read - remove defunct, rudimentary translations - sync DESCRIPTION with upstream Sync live ebuild with 1.2.0 Gentoo-Bug: 547054
Diffstat (limited to 'media-sound/flacon')
-rw-r--r--media-sound/flacon/Manifest1
-rw-r--r--media-sound/flacon/files/flacon-1.2.0-fix-corrupt-file-crash.patch22
-rw-r--r--media-sound/flacon/files/flacon-1.2.0-fix-disks-or-tracks-number-change-crash.patch85
-rw-r--r--media-sound/flacon/files/flacon-1.2.0-fix-qpainter-error.patch87
-rw-r--r--media-sound/flacon/flacon-1.2.0.ebuild90
-rw-r--r--media-sound/flacon/flacon-9999.ebuild69
-rw-r--r--media-sound/flacon/metadata.xml5
7 files changed, 332 insertions, 27 deletions
diff --git a/media-sound/flacon/Manifest b/media-sound/flacon/Manifest
index e347c209b517..55bdd110b5d3 100644
--- a/media-sound/flacon/Manifest
+++ b/media-sound/flacon/Manifest
@@ -2,3 +2,4 @@ DIST flacon-0.7.2.tgz 238604 SHA256 b10cfe6d7f99c3b64082edc5bf926c1759714719ef5e
DIST flacon-0.8.0.tgz 272910 SHA256 d2889b364ea49b19c400ce8081d829e5a37149dfdcb82d55f6ab453b679d1f85 SHA512 58b2cd57266533ae3bdd524d18c279171c3092665e20332a16c421d6931492deb6d201e2b3f818ecda7e2d50fdbe7170597b12922aa9cbe07cc24dc7b6d4d0d1 WHIRLPOOL e515de827886d95c6e67c8549ef4ec3ec6700d6d7cc9f06d9e568d79274942d37e0153b88391bedfda7d5b28fc3231ceb59a7faecd0830a01468d61c1cd5197f
DIST flacon-0.9.4.tar.gz 242933 SHA256 ef97a89897f95112d623c37f64a2c42a58f3527d66a4c322637d721ff2675e64 SHA512 3ea923fe68bcecd505f75ef25f6117209489ed57321c06bd5370bcd6c2919d709ce18d2ecbd1f6e1834f003f80f38665e522960bd7114d7c0c011296aec9e996 WHIRLPOOL efc4863b1c0f3ee1e46a60cbae3f922ca155d6d578e27f8eb4a5db6137f9b19b1ffbad0fdbda796ac1eb5c1970e7343b5c75dee7130681bad8b5946bdca20703
DIST flacon-1.0.0.tar.gz 249473 SHA256 60487a85e828a08afbaf2fe5f7228a94e1f4094606456f73d59ae351f75e1284 SHA512 2336ec0b0bc7cdaa3792f64adb88a7fd62e7b6f4c84b6cc465e6f6546ca5cae21929de87aa3ab4c7b12754d3480cc66f412f25969707765798ecbb8aea78b7db WHIRLPOOL 50c6b2737de9d82616377048a8fee0b0feec97ae337562d53ecaa2476b417d98327c481ea162d8970615becc6b75754e8cf195fd56285b34414df1d85ba37013
+DIST flacon-1.2.0.tar.gz 283187 SHA256 2ebc83d733ea6d50f2bd4ad8c20c65368be5eaf351e0195c9b4d47a54957b8f8 SHA512 4cc64467350c941eed16299a562ddc3c6c83d785dddffe6825e3df50a988ce9494517b3ea862d90398110564ec3f828ef6760a6c02d24163f9247930330a3b6d WHIRLPOOL 918926069daaf5e9a16711d641c873a70d1dc97f04b05387f649f1d1d6e1d652f3e676f1100d5fe0d70d03fa9edb1d4e64fc67b489f5c5e74d21108a437f87ea
diff --git a/media-sound/flacon/files/flacon-1.2.0-fix-corrupt-file-crash.patch b/media-sound/flacon/files/flacon-1.2.0-fix-corrupt-file-crash.patch
new file mode 100644
index 000000000000..11a4f1307a1c
--- /dev/null
+++ b/media-sound/flacon/files/flacon-1.2.0-fix-corrupt-file-crash.patch
@@ -0,0 +1,22 @@
+From 01bf112e4bfd0718829b7dc6f83de6fbceb3ac0c Mon Sep 17 00:00:00 2001
+From: "sokoloff (Alexander)" <sokoloff.a@gmail.com>
+Date: Fri, 18 Sep 2015 20:15:16 +0300
+Subject: [PATCH] Fix crash if audio file is corrupt
+
+---
+ disk.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/disk.cpp b/disk.cpp
+index 99c7dff..23d7ab2 100644
+--- a/disk.cpp
++++ b/disk.cpp
+@@ -577,7 +577,7 @@ bool Disk::replaceAudioFile(const QString &fileName, bool force)
+ audio = 0;
+ }
+
+- if (force || audio->isValid())
++ if (force || audio)
+ {
+ delete mAudioFile;
+ mAudioFile = audio;
diff --git a/media-sound/flacon/files/flacon-1.2.0-fix-disks-or-tracks-number-change-crash.patch b/media-sound/flacon/files/flacon-1.2.0-fix-disks-or-tracks-number-change-crash.patch
new file mode 100644
index 000000000000..1e9a3369671a
--- /dev/null
+++ b/media-sound/flacon/files/flacon-1.2.0-fix-disks-or-tracks-number-change-crash.patch
@@ -0,0 +1,85 @@
+From bf2dc4aa42e91bda2d41e129f7fe6597b9f86673 Mon Sep 17 00:00:00 2001
+From: "sokoloff (Alexander)" <sokoloff.a@gmail.com>
+Date: Sun, 27 Sep 2015 09:24:35 +0300
+Subject: [PATCH] Fix: the program sometimes crash when you change the number
+ of disks or tracks
+
+---
+ disk.cpp | 3 +++
+ project.cpp | 9 +++++----
+ tests/testflacon.cpp | 6 +++---
+ 3 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/disk.cpp b/disk.cpp
+index 969cb71..3b624de 100644
+--- a/disk.cpp
++++ b/disk.cpp
+@@ -433,6 +433,9 @@ void Disk::loadFromCue(const CueTagSet &cueTags, bool activate)
+ for (int i=mTracks.count(); i<mCount; ++i)
+ mTracks.append(new Track(this, i));
+
++ while (mTracks.count() > mCount)
++ mTracks.takeLast()->deleteLater();
++
+ for (int t=0; t<cueTags.tracksCount(); ++t)
+ {
+ for (int idx=0; idx<100; ++idx)
+diff --git a/project.cpp b/project.cpp
+index 00486e4..38710ae 100644
+--- a/project.cpp
++++ b/project.cpp
+@@ -169,7 +169,8 @@ void Project::removeDisk(const QList<Disk*> *disks)
+ Disk *disk = disks->at(i);
+ emit beforeRemoveDisk(disk);
+ if (mDisks.removeAll(disk))
+- delete disk;
++ disk->deleteLater();
++
+ emit afterRemoveDisk();
+ }
+
+@@ -274,10 +275,10 @@ DiskList Project::addCueFile(const QString &fileName, bool showErrors)
+ }
+ else
+ {
+- foreach(Disk *d, res)
++ foreach(Disk *disk, res)
+ {
+- mDisks.removeAll(d);
+- delete d;
++ mDisks.removeAll(disk);
++ disk->deleteLater();
+ }
+
+ emit layoutChanged();
+diff --git a/tests/testflacon.cpp b/tests/testflacon.cpp
+index bcd7c46..571b425 100644
+--- a/tests/testflacon.cpp
++++ b/tests/testflacon.cpp
+@@ -830,7 +830,7 @@ void TestFlacon::testTrackResultFileName()
+ expected);
+ QFAIL(msg.toLocal8Bit());
+ }
+- delete disk;
++ disk->deleteLater();
+ }
+
+
+@@ -983,7 +983,7 @@ void TestFlacon::testTrackResultFilePath()
+ QFAIL(msg.toLocal8Bit());
+ }
+ //QCOMPARE(result, expected);
+- delete disk;
++ disk->deleteLater();
+ }
+
+
+@@ -1117,7 +1117,7 @@ void TestFlacon::testTrackSetCodepages()
+ QFAIL((msg + "\n " + cmd).toLocal8Bit());
+ }
+
+- delete disk;
++ disk->deleteLater();
+ }
+
+
diff --git a/media-sound/flacon/files/flacon-1.2.0-fix-qpainter-error.patch b/media-sound/flacon/files/flacon-1.2.0-fix-qpainter-error.patch
new file mode 100644
index 000000000000..cc7398730eda
--- /dev/null
+++ b/media-sound/flacon/files/flacon-1.2.0-fix-qpainter-error.patch
@@ -0,0 +1,87 @@
+From 8ffd4d83e19e8f1e28841f37248e99fae0796b10 Mon Sep 17 00:00:00 2001
+From: "sokoloff (Alexander)" <sokoloff.a@gmail.com>
+Date: Fri, 18 Sep 2015 20:14:31 +0300
+Subject: [PATCH] Fix QPainter::font: Painter not active error
+
+---
+ gui/trackviewdelegate.cpp | 20 +++++++++-----------
+ gui/trackviewdelegate.h | 4 ++--
+ 2 files changed, 11 insertions(+), 13 deletions(-)
+
+diff --git a/gui/trackviewdelegate.cpp b/gui/trackviewdelegate.cpp
+index ab05833..02b6137 100644
+--- a/gui/trackviewdelegate.cpp
++++ b/gui/trackviewdelegate.cpp
+@@ -261,8 +261,8 @@ void TrackViewDelegate::paintDisk(QPainter *painter, const QStyleOptionViewItem
+ //cache = self.cache(index)
+ painter->save();
+ painter->setClipRect(option.rect);
+- QFont titleFont = this->titleFont(painter);
+- QFont filesFont = this->filesFont(painter);
++ QFont titleFont = this->titleFont(painter->font());
++ QFont filesFont = this->filesFont(painter->font());
+
+
+ int topPadding = index.row() ? TOP_PADDING : 0;
+@@ -408,19 +408,17 @@ QSize TrackViewDelegate::sizeHint(const QStyleOptionViewItem &option, const QMod
+
+ if (!index.parent().isValid())
+ {
+-
+ if (!mDiskHeightHint)
+ {
+ int h = 8;
+- QPainter painter(mTrackView);
+- QFont titleFont = this->titleFont(&painter);
+- QFont filesFont = this->filesFont(&painter);
++
++ QFont titleFont = this->titleFont(option.font);
++ QFont filesFont = this->filesFont(option.font);
+ h += QFontMetrics(titleFont).height();
+ h += QFontMetrics(filesFont).height() * 2;
+ mDiskHeightHint = qMax(IMG_HEIGHT, h) + 2 * MARGIN + BOTTOM_PADDING; //For Line
+ }
+
+-
+ res.rheight() = mDiskHeightHint;
+ if (index.row())
+ res.rheight() += TOP_PADDING;
+@@ -533,9 +531,9 @@ void TrackViewDelegate::downloadingFinished(DataProvider *provider)
+ /************************************************
+
+ ************************************************/
+-QFont TrackViewDelegate::titleFont(const QPainter *painter) const
++QFont TrackViewDelegate::titleFont(const QFont &font) const
+ {
+- QFont res = painter->font();
++ QFont res = font;
+ res.setPointSize(res.pointSize() + 1);
+ res.setBold(true);
+ return res;
+@@ -545,9 +543,9 @@ QFont TrackViewDelegate::titleFont(const QPainter *painter) const
+ /************************************************
+
+ ************************************************/
+-QFont TrackViewDelegate::filesFont(const QPainter *painter) const
++QFont TrackViewDelegate::filesFont(const QFont &font) const
+ {
+- QFont res = painter->font();
++ QFont res = font;
+ return res;
+ }
+
+diff --git a/gui/trackviewdelegate.h b/gui/trackviewdelegate.h
+index 3a6aa09..492e514 100644
+--- a/gui/trackviewdelegate.h
++++ b/gui/trackviewdelegate.h
+@@ -76,8 +76,8 @@ private slots:
+ QMovie mDownloadMovie;
+ mutable int mDiskHeightHint;
+
+- QFont titleFont(const QPainter *painter) const;
+- QFont filesFont(const QPainter *painter) const;
++ QFont titleFont(const QFont &font) const;
++ QFont filesFont(const QFont &font) const;
+ void paintTrack(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const Track *track) const;
+ void paintDisk(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const Disk *disk) const;
+ QRect drawLabel(const QString &text, QRect rect, QPainter *painter) const;
diff --git a/media-sound/flacon/flacon-1.2.0.ebuild b/media-sound/flacon/flacon-1.2.0.ebuild
new file mode 100644
index 000000000000..64599b76bea8
--- /dev/null
+++ b/media-sound/flacon/flacon-1.2.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Ignore rudimentary uz@Latn, zh_TW translation(s)
+PLOCALES="cs_CZ cs de es_MX es fr gl hu it ja_JP lt pl_PL pl pt_BR pt_PT ro_RO ru sr tr uk zh_CN"
+
+inherit cmake-utils fdo-mime gnome2-utils l10n
+
+DESCRIPTION="Extracts audio tracks from an audio CD image to separate tracks"
+HOMEPAGE="https://flacon.github.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="aac flac mac mp3 opus qt4 qt5 replaygain tta vorbis wavpack"
+
+DEPEND="
+ dev-libs/uchardet
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+"
+RDEPEND="${DEPEND}
+ media-sound/shntool[mac?]
+ aac? ( media-libs/faac )
+ flac? ( media-libs/flac )
+ mac? ( media-sound/mac )
+ mp3? ( media-sound/lame )
+ opus? ( media-sound/opus-tools )
+ replaygain? (
+ mp3? ( media-sound/mp3gain )
+ vorbis? ( media-sound/vorbisgain )
+ )
+ tta? ( media-sound/ttaenc )
+ vorbis? ( media-sound/vorbis-tools )
+ wavpack? ( media-sound/wavpack )
+"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-qpainter-error.patch"
+ "${FILESDIR}/${P}-fix-corrupt-file-crash.patch"
+ "${FILESDIR}/${P}-fix-disks-or-tracks-number-change-crash.patch"
+)
+
+src_prepare() {
+ # Ignore rudimentary uz@Latn, zh_TW translation(s)
+ rm "translations/${PN}_uz@Latn.desktop" || die
+ rm "translations/${PN}_zh_TW.ts" || die
+
+ remove_locale() {
+ rm "translations/${PN}_${1}."{ts,desktop} || die
+ }
+
+ l10n_find_plocales_changes 'translations' "${PN}_" '.ts'
+ l10n_for_each_disabled_locale_do remove_locale
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use qt4 QT4)
+ $(cmake-utils_use_use qt5 QT5)
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-sound/flacon/flacon-9999.ebuild b/media-sound/flacon/flacon-9999.ebuild
index e491e873d839..82dbb725e273 100644
--- a/media-sound/flacon/flacon-9999.ebuild
+++ b/media-sound/flacon/flacon-9999.ebuild
@@ -1,53 +1,72 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI=5
-PLOCALES="cs_CZ cs de es_MX es fr gl hu it pl_PL pl pt_BR pt_PT ro_RO ru si_LK uk zh_CN zh_TW"
+# Ignore rudimentary et, uz@Latn, zh_TW translation(s)
+PLOCALES="cs_CZ cs de es_MX es fr gl hu it ja_JP lt nb pl_PL pl pt_BR pt_PT ro_RO ru sr tr uk zh_CN"
-EGIT_REPO_URI="https://github.com/flacon/flacon.git"
+inherit cmake-utils fdo-mime gnome2-utils l10n git-r3
-inherit cmake-utils l10n fdo-mime gnome2-utils
-[[ ${PV} == *9999* ]] && inherit git-r3
-
-DESCRIPTION="Extracts audio tracks from audio CD image to separate tracks"
+DESCRIPTION="Extracts audio tracks from an audio CD image to separate tracks"
HOMEPAGE="https://flacon.github.io/"
-[[ ${PV} == *9999* ]] || \
-SRC_URI="https://github.com/flacon/flacon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+EGIT_REPO_URI="git://github.com/${PN}/${PN}.git"
LICENSE="LGPL-2.1"
SLOT="0"
-[[ ${PV} == *9999* ]] || \
-KEYWORDS="~amd64 ~x86"
-IUSE="flac mac mp3 mp4 ogg replaygain tta wavpack"
+KEYWORDS=""
+IUSE="aac flac mac mp3 opus qt4 qt5 replaygain tta vorbis wavpack"
-RDEPEND="
- dev-qt/qtcore:4
- dev-qt/qtgui:4
+DEPEND="
dev-libs/uchardet
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+"
+RDEPEND="${DEPEND}
media-sound/shntool[mac?]
+ aac? ( media-libs/faac )
flac? ( media-libs/flac )
mac? ( media-sound/mac )
mp3? ( media-sound/lame )
- mp4? ( media-libs/faac )
- ogg? ( media-sound/vorbis-tools )
- tta? ( media-sound/ttaenc )
- wavpack? ( media-sound/wavpack )
+ opus? ( media-sound/opus-tools )
replaygain? (
mp3? ( media-sound/mp3gain )
- ogg? ( media-sound/vorbisgain )
+ vorbis? ( media-sound/vorbisgain )
)
+ tta? ( media-sound/ttaenc )
+ vorbis? ( media-sound/vorbis-tools )
+ wavpack? ( media-sound/wavpack )
"
-DEPEND="${RDEPEND}"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
src_prepare() {
- my_rm_loc() {
+ # Ignore rudimentary et, uz@Latn, zh_TW translation(s)
+ rm "translations/${PN}_uz@Latn.desktop" || die
+ rm "translations/${PN}"_{et,zh_TW}.ts || die
+
+ remove_locale() {
rm "translations/${PN}_${1}."{ts,desktop} || die
}
- l10n_find_plocales_changes "translations" "${PN}_" '.ts'
- l10n_for_each_disabled_locale_do my_rm_loc
+ l10n_find_plocales_changes 'translations' "${PN}_" '.ts'
+ l10n_for_each_disabled_locale_do remove_locale
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use qt4 QT4)
+ $(cmake-utils_use_use qt5 QT5)
+ )
+ cmake-utils_src_configure
}
pkg_preinst() {
diff --git a/media-sound/flacon/metadata.xml b/media-sound/flacon/metadata.xml
index ecc017d76658..d35aac6619e4 100644
--- a/media-sound/flacon/metadata.xml
+++ b/media-sound/flacon/metadata.xml
@@ -16,9 +16,10 @@
<description>Proxied maintainer; set to assignee in all bugs</description>
</maintainer>
<use>
- <flag name="mac">Add support for Monkey's Audio files</flag>
+ <flag name="mac">Add support for Monkey's Audio input files</flag>
+ <flag name="opus">Add support for Opus output files</flag>
<flag name="replaygain">Support for Replay Gain metadata, for relative volume adjustment</flag>
- <flag name="tta">Add support for True Audio encoding</flag>
+ <flag name="tta">Add support for True Audio input files</flag>
</use>
<upstream>
<remote-id type="github">flacon/flacon</remote-id>