summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-02-12 22:14:57 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-02-12 22:24:50 +0100
commit81e8a77f5fb397d63647ba2ae29c5350117f980e (patch)
treef568d70c5517edf9dba7f20fa6dd85056c88f9a2 /app-cdr/k3b
parentnet-libs/gnutls: no longer need cxx hack (diff)
downloadgentoo-81e8a77f5fb397d63647ba2ae29c5350117f980e.tar.gz
gentoo-81e8a77f5fb397d63647ba2ae29c5350117f980e.tar.bz2
gentoo-81e8a77f5fb397d63647ba2ae29c5350117f980e.zip
app-cdr/k3b: Fix DVD-ripping, flac, build w/ ffmpeg-3 and gcc-7
Also update DESCRIPTION, HOMEPAGE, pkg_postinst info Gentoo-bug: 578894 Package-Manager: portage-2.3.3
Diffstat (limited to 'app-cdr/k3b')
-rw-r--r--app-cdr/k3b/files/k3b-2.0.3-dvdrip.patch33
-rw-r--r--app-cdr/k3b/files/k3b-2.0.3-ffmpeg-3.patch27
-rw-r--r--app-cdr/k3b/files/k3b-2.0.3-flac.patch28
-rw-r--r--app-cdr/k3b/files/k3b-2.0.3-gcc7.patch60
-rw-r--r--app-cdr/k3b/files/k3b-2.0.3-sndfile.patch49
-rw-r--r--app-cdr/k3b/k3b-2.0.3-r4.ebuild123
6 files changed, 320 insertions, 0 deletions
diff --git a/app-cdr/k3b/files/k3b-2.0.3-dvdrip.patch b/app-cdr/k3b/files/k3b-2.0.3-dvdrip.patch
new file mode 100644
index 00000000000..04526fc3283
--- /dev/null
+++ b/app-cdr/k3b/files/k3b-2.0.3-dvdrip.patch
@@ -0,0 +1,33 @@
+From 9f109bbc7fe718135da402535f6ca7ca5c105d4d Mon Sep 17 00:00:00 2001
+From: Martin Koller <kollix@aon.at>
+Date: Mon, 26 Oct 2015 22:12:35 +0100
+Subject: revert "fix" which adds literal quote chars to the filename
+
+commit 2786d19f added explicit quote characters around the filename,
+which is wrong since the filename is passed into a QStringList,
+which passes all its separate arguments to the started process.
+Adding quote chars would lead to the filename having the
+quote chars as part of the filename.
+
+BUG: 350403
+REVIEW: 125804
+---
+ libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp
+index 95e4811..4b721ff 100644
+--- a/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp
++++ b/libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp
+@@ -303,7 +303,7 @@ void K3b::VideoDVDTitleTranscodingJob::startTranscode( int pass )
+ }
+
+ // the output filename
+- *d->process << "-o" << QString("\"%1\"").arg(m_filename);
++ *d->process << "-o" << m_filename;
+ }
+ else {
+ // gather information about the video stream, ignore audio
+--
+cgit v0.11.2
+
diff --git a/app-cdr/k3b/files/k3b-2.0.3-ffmpeg-3.patch b/app-cdr/k3b/files/k3b-2.0.3-ffmpeg-3.patch
new file mode 100644
index 00000000000..5a06503304a
--- /dev/null
+++ b/app-cdr/k3b/files/k3b-2.0.3-ffmpeg-3.patch
@@ -0,0 +1,27 @@
+From 5b9b3537b658ad342d688fa4f210113a3d066d2a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= <oldium.pro@seznam.cz>
+Date: Sat, 14 Feb 2015 15:31:07 +0100
+Subject: Fixed compilation with newer ffmpeg/libav.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 64 ++++++++++++++++++++++++-----
+ 1 file changed, 54 insertions(+), 10 deletions(-)
+
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.old 2017-02-12 21:09:02.258453125 +0100
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2017-02-12 21:12:44.799077359 +0100
+@@ -378,7 +378,11 @@
+ #endif
+
+ if( d->packetSize <= 0 || len < 0 )
++#if LIBAVCODEC_VERSION_MAJOR >= 56
++ ::av_packet_unref( &d->packet );
++#else
+ ::av_free_packet( &d->packet );
++#endif
+ if( len < 0 ) {
+ kDebug() << "(K3bFFMpegFile) decoding failed for " << m_filename;
+ return -1;
diff --git a/app-cdr/k3b/files/k3b-2.0.3-flac.patch b/app-cdr/k3b/files/k3b-2.0.3-flac.patch
new file mode 100644
index 00000000000..a03237e4111
--- /dev/null
+++ b/app-cdr/k3b/files/k3b-2.0.3-flac.patch
@@ -0,0 +1,28 @@
+From ef2ce428dc1607563273d1258f56d9083dcf99d4 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Wed, 19 Nov 2014 22:50:43 +0100
+Subject: FLAC plugin's function seekToFrame may not work properly
+
+BUGS: 341077
+
+Patch by Vitaly <vitfunk@yandex.ru>
+---
+ plugins/decoder/flac/k3bflacdecoder.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/decoder/flac/k3bflacdecoder.cpp b/plugins/decoder/flac/k3bflacdecoder.cpp
+index 2931f76..6dc21d3 100644
+--- a/plugins/decoder/flac/k3bflacdecoder.cpp
++++ b/plugins/decoder/flac/k3bflacdecoder.cpp
+@@ -121,7 +121,7 @@ protected:
+ };
+
+ bool K3bFLACDecoder::Private::seekToFrame(int frame) {
+- FLAC__uint64 sample = frame * rate / 75;
++ FLAC__uint64 sample = static_cast<FLAC__uint64>(frame) * rate / 75;
+ return seek_absolute(sample);
+ }
+
+--
+cgit v0.11.2
+
diff --git a/app-cdr/k3b/files/k3b-2.0.3-gcc7.patch b/app-cdr/k3b/files/k3b-2.0.3-gcc7.patch
new file mode 100644
index 00000000000..2d74090fad8
--- /dev/null
+++ b/app-cdr/k3b/files/k3b-2.0.3-gcc7.patch
@@ -0,0 +1,60 @@
+From 1777236203f21eed7a9baade632472094c8081d3 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Sat, 4 Feb 2017 10:48:45 +0100
+Subject: ffmpeg: fix/simplify metadata conversion to string
+
+Comparing a pointer with an integer value is (correctly) an error with
+GCC 7.
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 21 +++------------------
+ 1 file changed, 3 insertions(+), 18 deletions(-)
+
+diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+index a4fc784..22928b2 100644
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+@@ -259,12 +259,7 @@ QString K3bFFMpegFile::title() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "TITLE", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString();
+ }
+
+
+@@ -272,12 +267,7 @@ QString K3bFFMpegFile::author() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "ARTIST", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString();
+ }
+
+
+@@ -285,12 +275,7 @@ QString K3bFFMpegFile::comment() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "COMMENT", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit( ade->value ) : QString();
+ }
+
+
+--
+cgit v0.11.2
+
diff --git a/app-cdr/k3b/files/k3b-2.0.3-sndfile.patch b/app-cdr/k3b/files/k3b-2.0.3-sndfile.patch
new file mode 100644
index 00000000000..268173a7fec
--- /dev/null
+++ b/app-cdr/k3b/files/k3b-2.0.3-sndfile.patch
@@ -0,0 +1,49 @@
+From 399adb1ace87ab25525922f422e5cad3b30f5b60 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Sun, 22 Nov 2015 11:48:36 +0100
+Subject: Use FindPkgConfig instead of UsePkgConfig
+
+UsePkgConfig is marked as obsolete and doesn't handle differently
+named pkg-config executables, like architecture or toolchain prefixed
+ones, well. The FindPkgConfig module respects the PKG_CONFIG env
+variable and sets PKG_CONFIG_EXECUTABLE accordingly.
+
+REVIEW: 126135
+---
+ cmake/modules/FindSndfile.cmake | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/cmake/modules/FindSndfile.cmake b/cmake/modules/FindSndfile.cmake
+index c5d21b5..8a6fe2b 100644
+--- a/cmake/modules/FindSndfile.cmake
++++ b/cmake/modules/FindSndfile.cmake
+@@ -21,22 +21,20 @@ endif ( SNDFILE_INCLUDE_DIR AND SNDFILE_LIBRARIES )
+ IF (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+- INCLUDE(UsePkgConfig)
++ include(FindPkgConfig)
+
+- PKGCONFIG(sndfile _SndfileIncDir _SndfileLinkDir _SndfileLinkFlags _SndfileCflags)
++ pkg_check_modules(_pc_SNDFILE sndfile)
+ ENDIF (NOT WIN32)
+
+
+ FIND_PATH(SNDFILE_INCLUDE_DIR
+ NAMES sndfile.h
+- PATHS ${_SndfileIncDir}
+- NO_DEFAULT_PATH
++ HINTS ${_pc_SNDFILE_INCLUDE_DIRS}
+ )
+
+ FIND_LIBRARY(SNDFILE_LIBRARIES
+ NAMES sndfile
+- PATHS ${_SndfileLinkDir}
+- NO_DEFAULT_PATH
++ HINTS ${_pc_SNDFILE_LIBRARY_DIRS}
+ )
+
+ include(FindPackageHandleStandardArgs)
+--
+cgit v0.11.2
+
diff --git a/app-cdr/k3b/k3b-2.0.3-r4.ebuild b/app-cdr/k3b/k3b-2.0.3-r4.ebuild
new file mode 100644
index 00000000000..22342a23df9
--- /dev/null
+++ b/app-cdr/k3b/k3b-2.0.3-r4.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+MULTIMEDIA_REQUIRED="always"
+WEBKIT_REQUIRED="always"
+KDE_HANDBOOK="optional"
+
+KDE_LINGUAS="ast be bg bs ca ca@valencia cs csb da de el en_GB eo es et eu fi fr
+ga gl he hi hne hr hu is it ja kk km ko ku lt lv mai mr ms nb nds nl nn oc pa pl
+pt pt_BR ro ru se sk sl sr sr@ijekavian sr@ijekavianlatin sr@latin sv th tr ug uk
+zh_CN zh_TW"
+
+inherit kde4-base
+
+DESCRIPTION="Full-featured burning and ripping application by KDE"
+HOMEPAGE="http://www.k3b.org/"
+SRC_URI="mirror://kde/stable/${PN}/${P}a.tar.xz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dvd emovix encode ffmpeg flac libav mad mp3 musepack sndfile sox taglib vcd vorbis"
+
+CDEPEND="
+ $(add_kdeapps_dep libkcddb)
+ media-libs/libsamplerate
+ dvd? ( media-libs/libdvdread )
+ ffmpeg? (
+ libav? ( media-video/libav:= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ flac? ( >=media-libs/flac-1.2[cxx] )
+ mp3? ( media-sound/lame )
+ mad? ( media-libs/libmad )
+ musepack? ( >=media-sound/musepack-tools-444 )
+ sndfile? ( media-libs/libsndfile )
+ taglib? ( >=media-libs/taglib-1.5 )
+ vorbis? ( media-libs/libvorbis )
+"
+DEPEND="${CDEPEND}
+ sys-devel/gettext
+"
+RDEPEND="${CDEPEND}
+ app-cdr/cdrdao
+ kde-frameworks/kdelibs:4[udev,udisks(+)]
+ media-sound/cdparanoia
+ virtual/cdrtools
+ dvd? (
+ >=app-cdr/dvd+rw-tools-7
+ encode? ( media-video/transcode[dvd] )
+ )
+ emovix? ( media-video/emovix )
+ sox? ( media-sound/sox )
+ vcd? ( media-video/vcdimager )
+"
+
+REQUIRED_USE="
+ mp3? ( encode )
+ sox? ( encode )
+"
+
+DOCS=( ChangeLog FAQ PERMISSIONS README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libav-11.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+ "${FILESDIR}"/${P}-flac.patch
+ "${FILESDIR}"/${P}-sndfile.patch
+ "${FILESDIR}"/${P}-ffmpeg-3.patch
+ "${FILESDIR}"/${P}-gcc7.patch
+ # master
+ "${FILESDIR}"/${P}-dvdrip.patch
+)
+
+src_prepare() {
+ kde4-base_src_prepare
+
+ # bug 558640
+ sed -i -e "/^add_subdirectory( doc )/d" CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DK3B_BUILD_API_DOCS=OFF
+ -DK3B_BUILD_K3BSETUP=OFF
+ -DK3B_BUILD_WAVE_DECODER_PLUGIN=ON
+ -DK3B_ENABLE_HAL_SUPPORT=OFF
+ -DK3B_ENABLE_MUSICBRAINZ=OFF
+ -DK3B_DEBUG=$(usex debug)
+ -DK3B_ENABLE_DVD_RIPPING=$(usex dvd)
+ -DK3B_BUILD_EXTERNAL_ENCODER_PLUGIN=$(usex encode)
+ -DK3B_BUILD_FFMPEG_DECODER_PLUGIN=$(usex ffmpeg)
+ -DK3B_BUILD_FLAC_DECODER_PLUGIN=$(usex flac)
+ -DK3B_BUILD_LAME_ENCODER_PLUGIN=$(usex mp3)
+ -DK3B_BUILD_MAD_DECODER_PLUGIN=$(usex mad)
+ -DK3B_BUILD_MUSE_DECODER_PLUGIN=$(usex musepack)
+ -DK3B_BUILD_SNDFILE_DECODER_PLUGIN=$(usex sndfile)
+ -DK3B_BUILD_SOX_ENCODER_PLUGIN=$(usex sox)
+ -DK3B_ENABLE_TAGLIB=$(usex taglib)
+ -DK3B_BUILD_OGGVORBIS_DECODER_PLUGIN=$(usex vorbis)
+ -DK3B_BUILD_OGGVORBIS_ENCODER_PLUGIN=$(usex vorbis)
+ )
+
+ kde4-base_src_configure
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ echo
+ elog "If you get warnings on start-up, uncheck the \"Check system"
+ elog "configuration\" option in the \"Misc\" settings window."
+ echo
+
+ local group=cdrom
+ use kernel_linux || group=operator
+ elog "Make sure you have proper read/write permissions on optical device(s)."
+ elog "Usually, it is sufficient to be in the ${group} group."
+ echo
+}