summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Cort <tcort@gentoo.org>2006-09-25 02:05:35 +0000
committerThomas Cort <tcort@gentoo.org>2006-09-25 02:05:35 +0000
commit8572d445accf874a7a5f3423d9330546f30fbd9d (patch)
tree7078c42fb29f246086684293c4d7f5d9d9819d82 /media-sound/quodlibet
parentVersion bump to 1.7.1. (diff)
downloadhistorical-8572d445accf874a7a5f3423d9330546f30fbd9d.tar.gz
historical-8572d445accf874a7a5f3423d9330546f30fbd9d.tar.bz2
historical-8572d445accf874a7a5f3423d9330546f30fbd9d.zip
Added python-2.5 compatibility patch from upstream revision 3817 wrt Bug #148495.
Package-Manager: portage-2.1.1
Diffstat (limited to 'media-sound/quodlibet')
-rw-r--r--media-sound/quodlibet/ChangeLog9
-rw-r--r--media-sound/quodlibet/Manifest19
-rw-r--r--media-sound/quodlibet/files/digest-quodlibet-0.23.1-r13
-rw-r--r--media-sound/quodlibet/files/quodlibet-0.23.1-python25.patch307
-rw-r--r--media-sound/quodlibet/quodlibet-0.23.1-r1.ebuild123
5 files changed, 456 insertions, 5 deletions
diff --git a/media-sound/quodlibet/ChangeLog b/media-sound/quodlibet/ChangeLog
index efab4997d21a..26d62c220cd7 100644
--- a/media-sound/quodlibet/ChangeLog
+++ b/media-sound/quodlibet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/quodlibet
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/quodlibet/ChangeLog,v 1.41 2006/09/09 00:26:51 tcort Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/quodlibet/ChangeLog,v 1.42 2006/09/25 02:05:35 tcort Exp $
+
+*quodlibet-0.23.1-r1 (25 Sep 2006)
+
+ 25 Sep 2006; Thomas Cort <tcort@gentoo.org>
+ +files/quodlibet-0.23.1-python25.patch, +quodlibet-0.23.1-r1.ebuild:
+ Added python-2.5 compatibility patch from upstream revision 3817 wrt Bug
+ #148495.
09 Sep 2006; Thomas Cort <tcort@gentoo.org> quodlibet-0.23.1.ebuild:
Make the gst-plugins-gconf dep optional (with USE='gnome') to solve Bug
diff --git a/media-sound/quodlibet/Manifest b/media-sound/quodlibet/Manifest
index c629a153fda4..92d0527c9fac 100644
--- a/media-sound/quodlibet/Manifest
+++ b/media-sound/quodlibet/Manifest
@@ -6,6 +6,10 @@ AUX quodlibet-0.21-ctypes.patch 2415 RMD160 8a1794e80c238d755fe03f295164d0dd6f2a
MD5 ccd26cb6273d960e8ffbd0bd4077e3ef files/quodlibet-0.21-ctypes.patch 2415
RMD160 8a1794e80c238d755fe03f295164d0dd6f2a8ea0 files/quodlibet-0.21-ctypes.patch 2415
SHA256 99da3261adda36550649da72782545861214a4ed0d3ea63eb2b2c59a625271e6 files/quodlibet-0.21-ctypes.patch 2415
+AUX quodlibet-0.23.1-python25.patch 11209 RMD160 228f6f70b12dba75f4d88d01a98ec2e33de821d6 SHA1 74e63cbcced3a77b94b49122ce4cc18188c3d148 SHA256 b5fd16a939bf2abadaae6925e7f6d2feda2c0d550ab9b33cf0950bd9f3471da8
+MD5 58a14ab3b881b006415f94f6735b26e6 files/quodlibet-0.23.1-python25.patch 11209
+RMD160 228f6f70b12dba75f4d88d01a98ec2e33de821d6 files/quodlibet-0.23.1-python25.patch 11209
+SHA256 b5fd16a939bf2abadaae6925e7f6d2feda2c0d550ab9b33cf0950bd9f3471da8 files/quodlibet-0.23.1-python25.patch 11209
DIST quodlibet-0.21.1.tar.gz 498151 RMD160 7aacdd88982beb48493698ea590a2091e18ad32c SHA1 c0e4d0dcc8a97a2b1095eff814356167b62723ba SHA256 c093116a7b3846a937c37396f630dd8e5ea79654a38e322144b231ce685926d5
DIST quodlibet-0.22.tar.gz 505179 RMD160 f115a112ecb8e152b575ef55fed192ea55ca9451 SHA1 7622407f8c6f3bc11643859d0d9bb49c78a637aa SHA256 f5643c08f5cb677a68bcbff08ac805713befdbd4bde44be9550431b628df327e
DIST quodlibet-0.23.1.tar.gz 542885 RMD160 043ab4131a527932a57899875a343f468b7afd99 SHA1 7e927accc15d3f40fe32dba63fd37cfe929f8bf2 SHA256 639d6364798802ab50580e652abe53c72470ab04e7ecd06e66bee0542d2d01e8
@@ -18,6 +22,10 @@ EBUILD quodlibet-0.22.ebuild 2740 RMD160 b09c287420be55cc52875b2ea999a67d760eac3
MD5 c82c1e5e4beff53d879f3e055c1ef9b5 quodlibet-0.22.ebuild 2740
RMD160 b09c287420be55cc52875b2ea999a67d760eac30 quodlibet-0.22.ebuild 2740
SHA256 4e341d4745584f4856473a864241bbfc0aa0adb325900c26e41cab75fa412bb4 quodlibet-0.22.ebuild 2740
+EBUILD quodlibet-0.23.1-r1.ebuild 3932 RMD160 9578c196f32c699a49cbcdeaee890f8f2441ae66 SHA1 09c3a06da407203bf83096e9c0ac87c43032840f SHA256 da49b786643acc647904655cd7f36b0171246c5ab446baefffeb2e4072a898b6
+MD5 a5c156809d74fa2d4032e3360aad290e quodlibet-0.23.1-r1.ebuild 3932
+RMD160 9578c196f32c699a49cbcdeaee890f8f2441ae66 quodlibet-0.23.1-r1.ebuild 3932
+SHA256 da49b786643acc647904655cd7f36b0171246c5ab446baefffeb2e4072a898b6 quodlibet-0.23.1-r1.ebuild 3932
EBUILD quodlibet-0.23.1.ebuild 3851 RMD160 28fb99abf62cbe439f9af7746a99be9cda0e5f61 SHA1 8227aeceafd7f31acfed1487673f554a58a1438b SHA256 ce93a504083985061deb52bbd677e3ee071ccca03a29bd0924c16482e1cfb769
MD5 4c5503f08a3c7cd49ac3ba22cd9ee0d7 quodlibet-0.23.1.ebuild 3851
RMD160 28fb99abf62cbe439f9af7746a99be9cda0e5f61 quodlibet-0.23.1.ebuild 3851
@@ -26,10 +34,10 @@ EBUILD quodlibet-0.23.ebuild 2740 RMD160 b3e82095339a83704d3069d4f848a3c3a821f83
MD5 c378392aeccf440f34bfe58835abf427 quodlibet-0.23.ebuild 2740
RMD160 b3e82095339a83704d3069d4f848a3c3a821f833 quodlibet-0.23.ebuild 2740
SHA256 297a08651878e10c442784d50b45c14a52416096e54359a4ce87322f40c4f762 quodlibet-0.23.ebuild 2740
-MISC ChangeLog 7647 RMD160 b6f3a86b74a311901a4fcb68a84be88e74f525a3 SHA1 05c99b92024a7abbecd58cbc15f96b7c776ca917 SHA256 960c81116aecba2046843df53be9972573c2c38c01a49a0ca4ac10944662af2b
-MD5 aa839af07a78b671ee781e41dbe34bb1 ChangeLog 7647
-RMD160 b6f3a86b74a311901a4fcb68a84be88e74f525a3 ChangeLog 7647
-SHA256 960c81116aecba2046843df53be9972573c2c38c01a49a0ca4ac10944662af2b ChangeLog 7647
+MISC ChangeLog 7887 RMD160 e4b8a3390bfe40171d2027fe19a54884cc842baa SHA1 cdbbbc91c8193c69f1ebf883d9588935590d2cac SHA256 acd814ef41f55f2e238f4d9075b1cb4c51477a3b4b950442f1f04dcaff6ff94b
+MD5 643143c88070e29542fd796b74aeef49 ChangeLog 7887
+RMD160 e4b8a3390bfe40171d2027fe19a54884cc842baa ChangeLog 7887
+SHA256 acd814ef41f55f2e238f4d9075b1cb4c51477a3b4b950442f1f04dcaff6ff94b ChangeLog 7887
MISC metadata.xml 744 RMD160 dc40c6015ca8f3069e0f2f58df8d1235b479756a SHA1 dd66baefd0ae6cfb7afa7f4f46f97dcc67f4c617 SHA256 f819f84833247761ab1f99f2a933eb9af9875daa971f69d87138a1fee381cd7b
MD5 10a5efe7c3476d69729db9532e53b27e metadata.xml 744
RMD160 dc40c6015ca8f3069e0f2f58df8d1235b479756a metadata.xml 744
@@ -46,3 +54,6 @@ SHA256 05fb1b299c4ca9372473deed39bcee451bea8906e3fb12aeb8491e00b7dfc137 files/di
MD5 309931d348bcbb56d692ef0bfa5ddaad files/digest-quodlibet-0.23.1 250
RMD160 454c21d7c1dbfb0fe14a3f4aafc60bafc7a5eeff files/digest-quodlibet-0.23.1 250
SHA256 4d8812cd5865aeda32b8194664e8f1a7834afee8f52ea745094876bc177abe6c files/digest-quodlibet-0.23.1 250
+MD5 309931d348bcbb56d692ef0bfa5ddaad files/digest-quodlibet-0.23.1-r1 250
+RMD160 454c21d7c1dbfb0fe14a3f4aafc60bafc7a5eeff files/digest-quodlibet-0.23.1-r1 250
+SHA256 4d8812cd5865aeda32b8194664e8f1a7834afee8f52ea745094876bc177abe6c files/digest-quodlibet-0.23.1-r1 250
diff --git a/media-sound/quodlibet/files/digest-quodlibet-0.23.1-r1 b/media-sound/quodlibet/files/digest-quodlibet-0.23.1-r1
new file mode 100644
index 000000000000..29562ab0a151
--- /dev/null
+++ b/media-sound/quodlibet/files/digest-quodlibet-0.23.1-r1
@@ -0,0 +1,3 @@
+MD5 8b9d4f4dc0850b48cfe9b4b390722ef4 quodlibet-0.23.1.tar.gz 542885
+RMD160 043ab4131a527932a57899875a343f468b7afd99 quodlibet-0.23.1.tar.gz 542885
+SHA256 639d6364798802ab50580e652abe53c72470ab04e7ecd06e66bee0542d2d01e8 quodlibet-0.23.1.tar.gz 542885
diff --git a/media-sound/quodlibet/files/quodlibet-0.23.1-python25.patch b/media-sound/quodlibet/files/quodlibet-0.23.1-python25.patch
new file mode 100644
index 000000000000..3a6764e80a3d
--- /dev/null
+++ b/media-sound/quodlibet/files/quodlibet-0.23.1-python25.patch
@@ -0,0 +1,307 @@
+Index: parse/_pattern.py
+===================================================================
+--- parse/_pattern.py (revision 3816)
++++ parse/_pattern.py (revision 3817)
+@@ -15,7 +15,7 @@
+ # every time. The Song proxy might also get in the way.
+
+ import os
+-import sre
++import re
+
+ import util
+
+@@ -43,16 +43,16 @@
+ str(self._reverse[self.type]) +
+ "), lexeme=" + repr(self.lexeme) + ">")
+
+-class PatternLexer(sre.Scanner):
++class PatternLexer(re.Scanner):
+ def __init__(self, s):
+ self.string = s.strip()
+- sre.Scanner.__init__(self,
++ re.Scanner.__init__(self,
+ [(r"([^<>|\\]|\\.)+", self.text),
+ (r"[<>|]", self.table),
+ ])
+
+ def text(self, scanner, string):
+- return PatternLexeme(TEXT, sre.sub(r"\\(.)", r"\1", string))
++ return PatternLexeme(TEXT, re.sub(r"\\(.)", r"\1", string))
+ def table(self, scanner, string):
+ return PatternLexeme(
+ {"|": COND, "<": OPEN, ">": CLOSE}[string], string)
+Index: parse/_query.py
+===================================================================
+--- parse/_query.py (revision 3816)
++++ parse/_query.py (revision 3817)
+@@ -10,7 +10,7 @@
+ # but it could use some cleaning up. It builds the requisite match.*
+ # objects as it goes, which is where the interesting stuff will happen.
+
+-import sre
++import re
+
+ import parse._match as match
+
+@@ -22,10 +22,10 @@
+ class ParseError(error): pass
+ class LexerError(error): pass
+
+-class QueryLexer(sre.Scanner):
++class QueryLexer(re.Scanner):
+ def __init__(self, s):
+ self.string = s.strip()
+- sre.Scanner.__init__(self,
++ re.Scanner.__init__(self,
+ [(r"/([^/\\]|\\.)*/", self.regexp),
+ (r'"([^"\\]|\\.)*"', self.str_to_re),
+ (r"'([^'\\]|\\.)*'", self.str_to_re),
+@@ -42,7 +42,7 @@
+ if isinstance(string, unicode): string = string.encode('utf-8')
+ string = string[1:-1].decode('string_escape')
+ string = string.decode('utf-8')
+- return QueryLexeme(RE, "^%s$" % sre.escape(string))
++ return QueryLexeme(RE, "^%s$" % re.escape(string))
+
+ def tag(self, scanner, string):
+ return QueryLexeme(TAG, string.strip())
+@@ -190,24 +190,24 @@
+ def MatchTag(self):
+ tag = self.lookahead.lexeme
+ self.match(TAG)
+- try: return sre.compile(sre.escape(tag), sre.IGNORECASE | sre.UNICODE)
+- except sre.error:
++ try: return re.compile(re.escape(tag), re.IGNORECASE | re.UNICODE)
++ except re.error:
+ raise ParseError("The regular expression was invalid")
+
+ def Regexp(self):
+- re = self.lookahead.lexeme
++ regex = self.lookahead.lexeme
+ self.match(RE)
+- mods = sre.MULTILINE | sre.UNICODE | sre.IGNORECASE
++ mods = re.MULTILINE | re.UNICODE | re.IGNORECASE
+ if self.lookahead.type == TAG:
+ s = self.lookahead.lexeme.lower()
+- if "c" in s: mods &= ~sre.IGNORECASE
+- if "i" in s: mods |= sre.IGNORECASE
+- if "s" in s: mods |= sre.DOTALL
+- if "l" in s: mods = (mods & ~sre.UNICODE) | sre.LOCALE
++ if "c" in s: mods &= ~re.IGNORECASE
++ if "i" in s: mods |= re.IGNORECASE
++ if "s" in s: mods |= re.DOTALL
++ if "l" in s: mods = (mods & ~re.UNICODE) | re.LOCALE
+ self.match(TAG)
+- try: return sre.compile(re, mods)
+- except sre.error:
+- raise ParseError("The regular expression /%s/ is invalid." % re)
++ try: return re.compile(regex, mods)
++ except re.error:
++ raise ParseError("The regular expression /%s/ is invalid." % regex)
+
+ def match(self, *tokens):
+ if tokens == [EOF] and self.lookahead.type == EOF:
+@@ -227,7 +227,7 @@
+ if not isinstance(string, unicode): string = string.decode('utf-8')
+ if string == "": return match.Inter([])
+ elif not set("#=").intersection(string):
+- parts = ["%s = /%s/" % (", ".join(star), sre.escape(p))
++ parts = ["%s = /%s/" % (", ".join(star), re.escape(p))
+ for p in string.split()]
+ string = "&(" + ",".join(parts) + ")"
+ return QueryParser(QueryLexer(string)).StartQuery()
+Index: qltk/remote.py
+===================================================================
+--- qltk/remote.py (revision 3816)
++++ qltk/remote.py (revision 3817)
+@@ -9,7 +9,7 @@
+
+ import os
+ import random
+-import sre
++import re
+
+ import gobject
+ import gtk
+@@ -162,7 +162,7 @@
+ for added in library.scan([filename]): pass
+ if window.browser.can_filter(None):
+ window.browser.set_text(
+- "filename = /^%s/c" % sre.escape(filename))
++ "filename = /^%s/c" % re.escape(filename))
+ window.browser.activate()
+ else:
+ basepath = filename + "/"
+Index: qltk/cbes.py
+===================================================================
+--- qltk/cbes.py (revision 3816)
++++ qltk/cbes.py (revision 3817)
+@@ -241,8 +241,8 @@
+ if not os.path.isdir(os.path.dirname(filename)):
+ os.makedirs(os.path.dirname(filename))
+
+- saved = file(filename + ".saved", "wU")
+- memory = file(filename, "wU")
++ saved = file(filename + ".saved", "w")
++ memory = file(filename, "w")
+ target = saved
+ for row in self.get_model():
+ if row[0] is None: target = memory
+Index: qltk/renamefiles.py
+===================================================================
+--- qltk/renamefiles.py (revision 3816)
++++ qltk/renamefiles.py (revision 3817)
+@@ -8,7 +8,7 @@
+ # $Id: quodlibet-0.23.1-python25.patch,v 1.1 2006/09/25 02:05:35 tcort Exp $
+
+ import os
+-import sre
++import re
+ import unicodedata
+
+ import gtk
+@@ -38,7 +38,7 @@
+ new = u"".join(map(lambda s: (s in self.BAD and "_") or s, filename))
+ parts = new.split(os.sep)
+ def fix_end(string):
+- return sre.sub(r'[\. ]$', "_", string)
++ return re.sub(r'[\. ]$', "_", string)
+ return unicode(os.sep).join(map(fix_end, parts))
+
+ class StripDiacriticals(FilterCheckButton):
+Index: qltk/tagsfrompath.py
+===================================================================
+--- qltk/tagsfrompath.py (revision 3816)
++++ qltk/tagsfrompath.py (revision 3817)
+@@ -8,7 +8,7 @@
+ # $Id: quodlibet-0.23.1-python25.patch,v 1.1 2006/09/25 02:05:35 tcort Exp $
+
+ import os
+-import sre
++import re
+
+ import gtk
+
+@@ -29,7 +29,7 @@
+ self.slashes = len(pattern) - len(pattern.replace(os.path.sep,'')) + 1
+ self.pattern = None
+ # patterns look like <tagname> non regexy stuff <tagname> ...
+- pieces = sre.split(r'(<[A-Za-z0-9_]+>)', pattern)
++ pieces = re.split(r'(<[A-Za-z0-9_]+>)', pattern)
+ override = { '<tracknumber>': r'\d\d?', '<discnumber>': r'\d\d??' }
+ for i, piece in enumerate(pieces):
+ if not piece: continue
+@@ -38,7 +38,7 @@
+ pieces[i] = '(?P%s%s)' % (piece, override.get(piece, '.+?'))
+ self.headers.append(piece[1:-1].encode("ascii", "replace"))
+ else:
+- pieces[i] = sre.escape(piece)
++ pieces[i] = re.escape(piece)
+
+ # some slight magic to anchor searches "nicely"
+ # nicely means if it starts with a <tag>, anchor with a /
+@@ -52,7 +52,7 @@
+ and not pattern.endswith('<discnumber>'):
+ pieces.append(r'(?:\.\w+)$')
+
+- self.pattern = sre.compile(''.join(pieces))
++ self.pattern = re.compile(''.join(pieces))
+
+ def match(self, song):
+ if isinstance(song, dict):
+@@ -125,7 +125,7 @@
+ if songs: pattern_text = self.combo.child.get_text().decode("utf-8")
+ else: pattern_text = ""
+ try: pattern = TagsFromPattern(pattern_text)
+- except sre.error:
++ except re.error:
+ qltk.ErrorMessage(
+ self, _("Invalid pattern"),
+ _("The pattern\n\t<b>%s</b>\nis invalid. "
+Index: util/__init__.py
+===================================================================
+--- util/__init__.py (revision 3816)
++++ util/__init__.py (revision 3817)
+@@ -9,7 +9,7 @@
+ import gettext
+ import locale
+ import os
+-import sre
++import re
+ import sys
+
+ from const import FSCODING as fscoding, ENCODING
+@@ -26,7 +26,13 @@
+ t.install()
+
+ def python_init():
+- sre.escape = re_esc
++ re.escape = re_esc
++ # Python 2.4 has sre.Scanner but not re.Scanner. Python 2.5 has
++ # deprecated sre and moved Scanner to re.
++ try: re.Scanner
++ except AttributeError:
++ from sre import Scanner
++ re.Scanner = Scanner
+
+ def re_esc(str, BAD="/.^$*+?{,\\[]|()<>#=!:"):
+ needs_escape = lambda c: (c in BAD and "\\" + c) or c
+@@ -237,7 +243,7 @@
+ """Unescape a string in a manner suitable for XML/Pango."""
+ return str.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", "&")
+
+-def parse_time(timestr, err=(ValueError, sre.error)):
++def parse_time(timestr, err=(ValueError, re.error)):
+ """Parse a time string in hh:mm:ss, mm:ss, or ss format."""
+ if timestr[0:1] == "-":
+ m = -1
+@@ -246,7 +252,7 @@
+
+ try:
+ return m * reduce(lambda s, a: s * 60 + int(a),
+- sre.split(r":|\.", timestr), 0)
++ re.split(r":|\.", timestr), 0)
+ except err: return 0
+
+ RATING_PRECISION = 0.25
+@@ -362,7 +368,7 @@
+ if not splitters: return [s.strip()]
+ values = s.split("\n")
+ for spl in splitters:
+- spl = sre.compile(r"\b\s*%s\s*\b" % sre.escape(spl), sre.UNICODE)
++ spl = re.compile(r"\b\s*%s\s*\b" % re.escape(spl), re.UNICODE)
+ new_values = []
+ for v in values:
+ new_values.extend([st.strip() for st in spl.split(v)])
+Index: util/massagers.py
+===================================================================
+--- util/massagers.py (revision 3816)
++++ util/massagers.py (revision 3817)
+@@ -8,7 +8,7 @@
+ # $Id: quodlibet-0.23.1-python25.patch,v 1.1 2006/09/25 02:05:35 tcort Exp $
+
+ import locale
+-import sre
++import re
+
+ class Massager(object):
+ """Massage a tag value from various 'okay' formats to the
+@@ -23,7 +23,7 @@
+ tags = ["date"]
+ error = _("The date must be entered in 'YYYY', 'YYYY-MM-DD' or "
+ "'YYYY-MM-DD HH:MM:SS' format.")
+- __match = sre.compile(r"^\d{4}([-.]\d{2}([-.]\d{2}([T ]\d{2}"
++ __match = re.compile(r"^\d{4}([-.]\d{2}([-.]\d{2}([T ]\d{2}"
+ "([:.]\d{2}([:.]\d{2})?)?)?)?)?$").match
+ def validate(self, value):
+ value = value.strip().replace(".", "-").replace("/", "-")
+@@ -32,7 +32,7 @@
+ class GainMassager(Massager):
+ tags = ["replaygain_album_gain", "replaygain_track_gain"]
+ error = _("Replay Gain gains must be entered in 'x.yy dB' format.")
+- __match = sre.compile(r"^[+-]\d+\.?\d+?\s+dB$").match
++ __match = re.compile(r"^[+-]\d+\.?\d+?\s+dB$").match
+
+ def validate(self, value):
+ if self.__match(value): return value
diff --git a/media-sound/quodlibet/quodlibet-0.23.1-r1.ebuild b/media-sound/quodlibet/quodlibet-0.23.1-r1.ebuild
new file mode 100644
index 000000000000..184f12beaa1a
--- /dev/null
+++ b/media-sound/quodlibet/quodlibet-0.23.1-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/quodlibet/quodlibet-0.23.1-r1.ebuild,v 1.1 2006/09/25 02:05:35 tcort Exp $
+
+inherit eutils python
+
+DESCRIPTION="Quod Libet is a GTK+-based audio player written in Python."
+HOMEPAGE="http://www.sacredchao.net/quodlibet/"
+SRC_URI="http://www.sacredchao.net/~piman/software/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE="aac alsa dbus esd flac gnome mad mmkeys musepack oss trayicon vorbis"
+
+DEPEND=">=virtual/python-2.4.3-r1
+ trayicon? ( >=dev-python/pygtk-2.8 )
+ mmkeys? ( >=dev-python/pygtk-2.8 )"
+
+RDEPEND="${DEPEND}
+ >=dev-python/pygtk-2.8
+ >=media-libs/mutagen-1.6
+ >=media-libs/gst-plugins-good-0.10.2
+ >=dev-python/gst-python-0.10.2
+ mad? ( >=media-plugins/gst-plugins-mad-0.10.2 )
+ vorbis? ( >=media-plugins/gst-plugins-vorbis-0.10.2
+ >=media-plugins/gst-plugins-ogg-0.10.2 )
+ flac? ( >=media-plugins/gst-plugins-flac-0.10.2 )
+ aac? ( >=media-plugins/gst-plugins-faad-0.10.1
+ >=dev-python/ctypes-0.9.9.6 )
+ musepack? ( >=media-plugins/gst-plugins-musepack-0.10.0
+ >=dev-python/ctypes-0.9.9.6 )
+ alsa? ( >=media-plugins/gst-plugins-alsa-0.10.2 )
+ oss? ( >=media-plugins/gst-plugins-oss-0.10.2 )
+ esd? ( >=media-plugins/gst-plugins-esd-0.10.2 )
+ gnome? ( dev-python/gnome-python-extras
+ >=media-plugins/gst-plugins-gconf-0.10.3
+ >=media-plugins/gst-plugins-gnomevfs-0.10.2
+ dev-python/feedparser )
+ dbus? ( >=sys-apps/dbus-0.62 )"
+
+PDEPEND="trayicon? ( media-plugins/quodlibet-trayicon )"
+
+pkg_setup() {
+ if use dbus && ! built_with_use sys-apps/dbus python ; then
+ eerror "dbus is missing python support. Please add 'python'"
+ eerror "to your USE flags, and re-emerge sys-apps/dbus"
+ die "dbus needs python support"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # multilib fix
+ sed -i -e "s,^TODEP = lib/quodlibet,TODEP = \$(libdir)/quodlibet," Makefile
+
+ # no gst-plugins-gconf, attempt to guess the proper pipeline value. Bug #133043, #146728.
+ if ! use gnome; then
+ local sinktype="alsasink"
+
+ use esd && sinktype="esdsink"
+ use oss && sinktype="osssink"
+ use alsa && sinktype="alsasink"
+
+ elog "Setting the default pipeline to ${sinktype}"
+
+ sed -i -e "s,^ \"pipeline\": \"\", \"pipeline\": \"${sinktype}\"," config.py
+ fi
+
+ epatch "${FILESDIR}"/quodlibet-0.23.1-python25.patch || die "epatch failed"
+}
+
+src_compile() {
+ if use trayicon ; then
+ emake _trayicon.so || die "emake _trayicon.so failed"
+ fi
+
+ if use mmkeys ; then
+ emake _mmkeys.so || die "emake _mmkeys.so failed"
+ fi
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" libdir="$(get_libdir)" install || die "install failed"
+ dodoc README NEWS
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ if ! use mad; then
+ elog ""
+ elog "You do not have the 'mad' USE flag enabled."
+ elog "gst-plugins-mad, which is required for mp3 playback, may"
+ elog "not be installed. For mp3 support, enable the 'mad'"
+ elog "USE flag and emerge =media-sound/${P}."
+ fi
+
+ if ! use gnome; then
+ elog ""
+ elog "You do not have the 'gnome' USE flag enabled."
+ elog "media-plugins/gst-plugins-gnomevfs may not be installed,"
+ elog "so the proper pipeline won't be automatically selected."
+ elog "We've tried to select the proper pipeline based on your"
+ elog "USE flags, but if we guessed wrong you may have to set"
+ elog "'pipeline = ' in your ~/.quodlibet/config file to one"
+ elog "of the following: alsasink, osssink, esdsink. To enable"
+ elog "automatic selection of the proper pipeline, enable the"
+ elog "'gnome' USE flag and emerge =media-sound/${P}."
+ fi
+
+ elog ""
+ elog "Installing Quod Libet from an ebuild is not supported"
+ elog "upstream. If you encounter any problems, file bugs on"
+ elog "bugs.gentoo.org. DO NOT USE THE UPSTREAM BUG SYSTEM."
+ elog ""
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}