diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2012-09-05 07:53:17 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2012-09-05 07:53:17 +0000 |
commit | 12aff81e4a67de2780068b87d16d93644fb8d750 (patch) | |
tree | c77bce484823c191fd2b66aa90d5ba30b8f2ee52 /media-video/mplayer2 | |
parent | Use domenu instead insinto + doins to install .desktop files (diff) | |
download | gentoo-2-12aff81e4a67de2780068b87d16d93644fb8d750.tar.gz gentoo-2-12aff81e4a67de2780068b87d16d93644fb8d750.tar.bz2 gentoo-2-12aff81e4a67de2780068b87d16d93644fb8d750.zip |
Make the python scripts work again with py3. Fixes bug#433716.
(Portage version: 2.2.0_alpha124/cvs/Linux x86_64)
Diffstat (limited to 'media-video/mplayer2')
-rw-r--r-- | media-video/mplayer2/ChangeLog | 6 | ||||
-rw-r--r-- | media-video/mplayer2/files/mplayer2-py2compat.patch | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/media-video/mplayer2/ChangeLog b/media-video/mplayer2/ChangeLog index ce2fb84b825a..da62dfe3c3b9 100644 --- a/media-video/mplayer2/ChangeLog +++ b/media-video/mplayer2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/mplayer2 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.66 2012/09/03 16:33:52 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.67 2012/09/05 07:53:17 scarabeus Exp $ + + 05 Sep 2012; Tomáš Chvátal <scarabeus@gentoo.org> + files/mplayer2-py2compat.patch: + Make the python scripts work again with py3. Fixes bug#433716. *mplayer2-2.0_p20120828 (03 Sep 2012) diff --git a/media-video/mplayer2/files/mplayer2-py2compat.patch b/media-video/mplayer2/files/mplayer2-py2compat.patch index 2f0d7d11421d..21c447c8fbbd 100644 --- a/media-video/mplayer2/files/mplayer2-py2compat.patch +++ b/media-video/mplayer2/files/mplayer2-py2compat.patch @@ -1,16 +1,16 @@ -From c2bf465af05a65639557ef7f6e9200f793568ce2 Mon Sep 17 00:00:00 2001 +From 2cef169d4c8872394065606821075c7acb71ef25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.cz> Date: Mon, 13 Aug 2012 14:12:05 +0200 Subject: [PATCH] Add py2 compat. Now scripts work under both py3 and py2. --- - TOOLS/file2string.py | 4 ++-- + TOOLS/file2string.py | 7 +++++-- TOOLS/matroska.py | 4 +++- TOOLS/vdpau_functions.py | 2 +- - 3 files changed, 6 insertions(+), 4 deletions(-) + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/TOOLS/file2string.py b/TOOLS/file2string.py -index 002ba4a..1627fa2 100755 +index 002ba4a..1f8d493 100755 --- a/TOOLS/file2string.py +++ b/TOOLS/file2string.py @@ -1,4 +1,4 @@ @@ -19,12 +19,15 @@ index 002ba4a..1627fa2 100755 # Convert the contents of a file into a C string constant. # Note that the compiler will implicitly add an extra 0 byte at the end -@@ -16,7 +16,7 @@ def main(infile): +@@ -16,7 +16,10 @@ def main(infile): for c, esc in ("\nn", "\tt", r"\\", '""'): conv[ord(c)] = '\\' + esc for line in infile: - sys.stdout.write('"' + ''.join(conv[c] for c in line) + '"\n') -+ sys.stdout.write('"' + ''.join(conv[ord(c)] for c in line) + '"\n') ++ try: ++ sys.stdout.write('"' + ''.join(conv[ord(c)] for c in line) + '"\n') ++ except TypeError: ++ sys.stdout.write('"' + ''.join(conv[c] for c in line) + '"\n') with open(sys.argv[1], 'rb') as infile: sys.stdout.write("// Generated from %s\n\n" % sys.argv[1]) |