Author: igor Date: Tue Jan 27 00:30:14 2015 New Revision: 3127 Log: patch for building qemu with python3
Added: trunk/qemu/qemu-2.2.0-python3-1.patch Added: trunk/qemu/qemu-2.2.0-python3-1.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/qemu/qemu-2.2.0-python3-1.patch Tue Jan 27 00:30:14 2015 (r3127) @@ -0,0 +1,57 @@ +Submitted By: Igor Živković <[email protected]> +Date: 2015-01-27 +Initial Package Version: 2.2.0 +Upstream Status: Not submitted +Origin: Self +Description: Allows compilation with python3 at least with these: + +find -name '*.py' | xargs 2to3 -w && +patch -p1 -i ../qemu-2.2.0-python3-1.patch && +./configure --python=python3 \ + --prefix=/usr \ + --sysconfdir=/etc \ + --docdir=/usr/share/doc/qemu-2.2.0 \ + --target-list=x86_64-softmmu,i386-softmmu \ + --audio-drv-list=alsa \ + --with-sdlabi=2.0 + +diff -Naur qemu-2.2.0.orig/configure qemu-2.2.0/configure +--- qemu-2.2.0.orig/configure 2014-12-09 15:45:40.000000000 +0100 ++++ qemu-2.2.0/configure 2015-01-27 09:16:24.747407858 +0100 +@@ -1143,11 +1143,6 @@ + + # Note that if the Python conditional here evaluates True we will exit + # with status 1 which is a shell 'false' value. +-if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then +- error_exit "Cannot use '$python', Python 2.4 or later is required." \ +- "Note that Python 3 or later is not yet supported." \ +- "Use --python=/path/to/python to specify a supported Python." +-fi + + # The -B switch was added in Python 2.6. + # If it is supplied, compiled files are not written. +diff -Naur qemu-2.2.0.orig/scripts/ordereddict.py qemu-2.2.0/scripts/ordereddict.py +--- qemu-2.2.0.orig/scripts/ordereddict.py 2014-12-09 15:45:43.000000000 +0100 ++++ qemu-2.2.0/scripts/ordereddict.py 2015-01-27 09:16:24.723408901 +0100 +@@ -20,7 +20,7 @@ + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + # OTHER DEALINGS IN THE SOFTWARE. + +-from UserDict import DictMixin ++from collections import MutableMapping as DictMixin + + class OrderedDict(dict, DictMixin): + +@@ -94,9 +94,9 @@ + pop = DictMixin.pop + values = DictMixin.values + items = DictMixin.items +- iterkeys = DictMixin.iterkeys +- itervalues = DictMixin.itervalues +- iteritems = DictMixin.iteritems ++ iterkeys = DictMixin.keys ++ itervalues = DictMixin.values ++ iteritems = DictMixin.items + + def __repr__(self): + if not self: -- http://lists.linuxfromscratch.org/listinfo/patches FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
