diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2012-08-13 13:19:20 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2012-08-13 13:19:20 +0000 |
commit | 408804f155f3d7893669f7603628d1039dceb784 (patch) | |
tree | a749306ce7d9ea4ae53a0f4ba14dae8c0f44651b /media-video | |
parent | Bump to 0.6.3.1 (diff) | |
download | gentoo-2-408804f155f3d7893669f7603628d1039dceb784.tar.gz gentoo-2-408804f155f3d7893669f7603628d1039dceb784.tar.bz2 gentoo-2-408804f155f3d7893669f7603628d1039dceb784.zip |
Add back support for building with python2. So at least I don't have to install py3.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/mplayer2/ChangeLog | 7 | ||||
-rw-r--r-- | media-video/mplayer2/files/mplayer2-py2compat.patch | 62 | ||||
-rw-r--r-- | media-video/mplayer2/mplayer2-9999.ebuild | 8 |
3 files changed, 74 insertions, 3 deletions
diff --git a/media-video/mplayer2/ChangeLog b/media-video/mplayer2/ChangeLog index befff428e0b7..1500dad242e8 100644 --- a/media-video/mplayer2/ChangeLog +++ b/media-video/mplayer2/ChangeLog @@ -1,6 +1,11 @@ # 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.62 2012/08/13 11:48:57 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.63 2012/08/13 13:19:20 scarabeus Exp $ + + 13 Aug 2012; Tomáš Chvátal <scarabeus@gentoo.org> + +files/mplayer2-py2compat.patch, mplayer2-9999.ebuild: + Add back support for building with python2. So at least I don't have to + install py3. 13 Aug 2012; Tomáš Chvátal <scarabeus@gentoo.org> mplayer2-9999.ebuild: There needs to be only one dependency on py3. diff --git a/media-video/mplayer2/files/mplayer2-py2compat.patch b/media-video/mplayer2/files/mplayer2-py2compat.patch new file mode 100644 index 000000000000..2f0d7d11421d --- /dev/null +++ b/media-video/mplayer2/files/mplayer2-py2compat.patch @@ -0,0 +1,62 @@ +From c2bf465af05a65639557ef7f6e9200f793568ce2 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/matroska.py | 4 +++- + TOOLS/vdpau_functions.py | 2 +- + 3 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/TOOLS/file2string.py b/TOOLS/file2string.py +index 002ba4a..1627fa2 100755 +--- a/TOOLS/file2string.py ++++ b/TOOLS/file2string.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + # 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): + 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') + + with open(sys.argv[1], 'rb') as infile: + sys.stdout.write("// Generated from %s\n\n" % sys.argv[1]) +diff --git a/TOOLS/matroska.py b/TOOLS/matroska.py +index ffa388e..5b34d7d 100755 +--- a/TOOLS/matroska.py ++++ b/TOOLS/matroska.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + """ + Generate C definitions for parsing Matroska files. + Can also be used to directly parse Matroska files and display their contents. +@@ -22,6 +22,8 @@ Can also be used to directly parse Matroska files and display their contents. + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + # + ++# Python2 compat so we don't enforce py3 usage ++from __future__ import print_function + + elements_ebml = ( + 'EBML, 1a45dfa3, sub', ( +diff --git a/TOOLS/vdpau_functions.py b/TOOLS/vdpau_functions.py +index 39e38a8..85e6f1d 100755 +--- a/TOOLS/vdpau_functions.py ++++ b/TOOLS/vdpau_functions.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + # Generate vdpau_template.c + +-- +1.7.8.6 + diff --git a/media-video/mplayer2/mplayer2-9999.ebuild b/media-video/mplayer2/mplayer2-9999.ebuild index dffd1ea3eef5..5546019df536 100644 --- a/media-video/mplayer2/mplayer2-9999.ebuild +++ b/media-video/mplayer2/mplayer2-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.41 2012/08/13 11:48:57 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.42 2012/08/13 13:19:20 scarabeus Exp $ EAPI=4 @@ -152,7 +152,7 @@ RDEPEND+=" ASM_DEP="dev-lang/yasm" DEPEND="${RDEPEND} virtual/pkgconfig - =dev-lang/python-3* + >=dev-lang/python-2.6 sys-devel/gettext X? ( x11-proto/videoproto @@ -170,6 +170,10 @@ DEPEND="${RDEPEND} x86-fbsd? ( ${ASM_DEP} ) " +PATCHES=( + "${FILESDIR}/${PN}-py2compat.patch" +) + pkg_setup() { if [[ ${PV} == *9999* ]]; then elog |