diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-02-28 06:03:41 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-02-28 06:03:41 +0000 |
commit | 9826f72d47c8936c9baa3bd102957beb67b320af (patch) | |
tree | d36e6564d1dc5826fb988ab4c39b6bc1fb36a360 /media-sound/phonon | |
parent | Add patch for correct directory configuration. Per bug #260098 (diff) | |
download | gentoo-2-9826f72d47c8936c9baa3bd102957beb67b320af.tar.gz gentoo-2-9826f72d47c8936c9baa3bd102957beb67b320af.tar.bz2 gentoo-2-9826f72d47c8936c9baa3bd102957beb67b320af.zip |
Fix nonascii character named/taged files with xine playback. Per bug #259825.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'media-sound/phonon')
-rw-r--r-- | media-sound/phonon/ChangeLog | 10 | ||||
-rw-r--r-- | media-sound/phonon/files/fix_nonascii_chars.patch | 95 | ||||
-rw-r--r-- | media-sound/phonon/phonon-4.2.0.ebuild | 36 | ||||
-rw-r--r-- | media-sound/phonon/phonon-4.3.0-r1.ebuild (renamed from media-sound/phonon/phonon-4.3.0.ebuild) | 4 |
4 files changed, 107 insertions, 38 deletions
diff --git a/media-sound/phonon/ChangeLog b/media-sound/phonon/ChangeLog index 3dc887880ab4..6f54ef17c713 100644 --- a/media-sound/phonon/ChangeLog +++ b/media-sound/phonon/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/phonon # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/phonon/ChangeLog,v 1.7 2009/02/05 18:15:28 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/phonon/ChangeLog,v 1.8 2009/02/28 06:03:40 scarabeus Exp $ + +*phonon-4.3.0-r1 (28 Feb 2009) + + 28 Feb 2009; Tomas Chvatal <scarabeus@gentoo.org> + +files/fix_nonascii_chars.patch, -phonon-4.2.0.ebuild, + -phonon-4.3.0.ebuild, +phonon-4.3.0-r1.ebuild: + Fix nonascii character named/taged files with xine playback. Per bug + #259825. 05 Feb 2009; Tomas Chvatal <scarabeus@gentoo.org> phonon-4.3.0.ebuild: Fix -xine build. Per bug #257509. diff --git a/media-sound/phonon/files/fix_nonascii_chars.patch b/media-sound/phonon/files/fix_nonascii_chars.patch new file mode 100644 index 000000000000..d39e2ab5e34c --- /dev/null +++ b/media-sound/phonon/files/fix_nonascii_chars.patch @@ -0,0 +1,95 @@ +--- branches/phonon/4.3/xine/mediaobject.cpp 2009/02/10 09:11:04 924143 ++++ branches/phonon/4.3/xine/mediaobject.cpp 2009/02/10 09:17:28 924144 +@@ -317,6 +317,20 @@ + setSourceInternal(source, HardSwitch); + } + ++static QByteArray mrlEncode(QByteArray mrl) ++{ ++ for (int i = 0; i < mrl.size(); ++i) { ++ const unsigned char c = static_cast<unsigned char>(mrl.at(i)); ++ if (c & 0x80 || c == '\\' || c < 32 || c == '%') { ++ char enc[4]; ++ qsnprintf(enc, 4, "%%%02X", c); ++ mrl = mrl.left(i) + QByteArray(enc, 3) + mrl.mid(i + 1); ++ i += 2; ++ } ++ } ++ return mrl; ++} ++ + void MediaObject::setSourceInternal(const MediaSource &source, HowToSetTheUrl how) + { + //debug() << Q_FUNC_INFO; +@@ -340,13 +354,18 @@ + m_stream->setError(Phonon::NormalError, tr("Cannot open media data at '<i>%1</i>'").arg(source.url().toString(QUrl::RemovePassword))); + return; + } +- switch (how) { +- case GaplessSwitch: +- m_stream->gaplessSwitchTo(source.url()); +- break; +- case HardSwitch: +- m_stream->setUrl(source.url()); +- break; ++ { ++ const QByteArray &mrl = (source.url().scheme() == QLatin1String("file") ? ++ "file:/" + mrlEncode(QFile::encodeName(source.url().toLocalFile())) : ++ source.url().toEncoded()); ++ switch (how) { ++ case GaplessSwitch: ++ m_stream->gaplessSwitchTo(mrl); ++ break; ++ case HardSwitch: ++ m_stream->setMrl(mrl); ++ break; ++ } + } + break; + case MediaSource::Disc: +--- branches/phonon/4.3/xine/xinestream.cpp 2009/02/10 09:11:04 924143 ++++ branches/phonon/4.3/xine/xinestream.cpp 2009/02/10 09:17:28 924144 +@@ -619,12 +619,6 @@ + } + + // called from main thread +-void XineStream::gaplessSwitchTo(const QUrl &url) +-{ +- gaplessSwitchTo(url.toEncoded()); +-} +- +-// called from main thread + void XineStream::gaplessSwitchTo(const QByteArray &mrl) + { + QCoreApplication::postEvent(this, new GaplessSwitchEvent(mrl)); +@@ -1707,12 +1701,6 @@ + } + + // called from main thread +-void XineStream::setUrl(const QUrl &url) +-{ +- setMrl(url.toEncoded()); +-} +- +-// called from main thread + void XineStream::setMrl(const QByteArray &mrl, StateForNewMrl sfnm) + { + debug() << Q_FUNC_INFO << mrl << ", " << sfnm; +--- branches/phonon/4.3/xine/xinestream.h 2009/02/10 09:11:04 924143 ++++ branches/phonon/4.3/xine/xinestream.h 2009/02/10 09:17:28 924144 +@@ -86,7 +86,6 @@ + //void needRewire(AudioPostList *postList); + void useGaplessPlayback(bool); + void useGapOf(int gap); +- void gaplessSwitchTo(const QUrl &url); + void gaplessSwitchTo(const QByteArray &mrl); + void closeBlocking(); + void aboutToDeleteVideoWidget(); +@@ -141,7 +140,6 @@ + + void unload(); + public slots: +- void setUrl(const QUrl &url); + void setMrl(const QByteArray &mrl, StateForNewMrl = StoppedState); + void play(); + void pause(); diff --git a/media-sound/phonon/phonon-4.2.0.ebuild b/media-sound/phonon/phonon-4.2.0.ebuild deleted file mode 100644 index 3afcac5064ec..000000000000 --- a/media-sound/phonon/phonon-4.2.0.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/phonon/phonon-4.2.0.ebuild,v 1.4 2008/11/15 21:58:01 vapier Exp $ - -EAPI="2" -inherit cmake-utils - -DESCRIPTION="KDE multimedia API" -HOMEPAGE="http://phonon.kde.org/" -SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.bz2" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" -IUSE="debug gstreamer" -RESTRICT="test" - -RDEPEND="!kde-base/phonon:kde-svn - !kde-base/phonon:kde-4 - !x11-libs/qt-phonon:4 - x11-libs/qt-core:4 - x11-libs/qt-dbus:4 - x11-libs/qt-gui:4 - x11-libs/qt-test:4 - gstreamer? ( >=media-libs/gstreamer-0.10.20 - >=media-libs/gst-plugins-base-0.10.20 - x11-libs/qt-opengl:4 )" -DEPEND="${RDEPEND} - kde-base/automoc" - -src_compile() { - mycmakeargs="${mycmakeargs} - $(cmake-utils_use_with gstreamer GStreamer) - $(cmake-utils_use_with gstreamer GStreamerPlugins)" - cmake-utils_src_compile -} diff --git a/media-sound/phonon/phonon-4.3.0.ebuild b/media-sound/phonon/phonon-4.3.0-r1.ebuild index 60c08dec3d83..d517514f7fc4 100644 --- a/media-sound/phonon/phonon-4.3.0.ebuild +++ b/media-sound/phonon/phonon-4.3.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/phonon/phonon-4.3.0.ebuild,v 1.3 2009/02/05 18:15:28 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/phonon/phonon-4.3.0-r1.ebuild,v 1.1 2009/02/28 06:03:40 scarabeus Exp $ EAPI="2" inherit cmake-utils @@ -37,6 +37,8 @@ DEPEND="${RDEPEND} >=kde-base/automoc-0.9.87 " +PATCHES=( "$FILESDIR/fix_nonascii_chars.patch" ) + pkg_setup() { if use !xine && use !gstreamer; then die "you must at least select one backend for phonon" |