From owner-freebsd-x11@FreeBSD.ORG Mon Mar 3 03:20:02 2014 Return-Path: Delivered-To: freebsd-x11@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EDCB905 for ; Mon, 3 Mar 2014 03:20:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B6B419B0 for ; Mon, 3 Mar 2014 03:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s233K1Cg050517 for ; Mon, 3 Mar 2014 03:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s233K1jY050516; Mon, 3 Mar 2014 03:20:01 GMT (envelope-from gnats) Date: Mon, 3 Mar 2014 03:20:01 GMT Message-Id: <201403030320.s233K1jY050516@freefall.freebsd.org> To: freebsd-x11@FreeBSD.org Cc: From: Shane Ambler Subject: Re: ports/187200: [PATCH] x11/xcb-proto: fix USE_PYTHON X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Shane Ambler List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 03:20:02 -0000 The following reply was made to PR ports/187200; it has been noted by GNATS. From: Shane Ambler To: bug-followup@FreeBSD.org, sunpoet@FreeBSD.org Cc: Subject: Re: ports/187200: [PATCH] x11/xcb-proto: fix USE_PYTHON Date: Mon, 03 Mar 2014 13:41:42 +1030 This is a multi-part message in MIME format. --------------050009060103080208050709 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I think a better option is to update the port to build with python 3.x The following patch achieves that. --------------050009060103080208050709 Content-Type: text/plain; charset=UTF-8; name="xcb-proto.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xcb-proto.patch.txt" diff -Nru xcb-proto.orig/Makefile xcb-proto/Makefile --- xcb-proto.orig/Makefile 2014-03-03 13:22:07.190328066 +1030 +++ xcb-proto/Makefile 2014-02-21 13:02:49.763187284 +1030 @@ -15,6 +15,7 @@ USES= pathfix USE_PYTHON= yes GNU_CONFIGURE= yes +PYTHON_PY3K_PLIST_HACK= yes DATADIR= ${PREFIX}/share/xcb diff -Nru xcb-proto.orig/files/patch-py-compile xcb-proto/files/patch-py-compile --- xcb-proto.orig/files/patch-py-compile 1970-01-01 09:30:00.000000000 +0930 +++ xcb-proto/files/patch-py-compile 2014-02-21 13:02:49.774187675 +1030 @@ -0,0 +1,57 @@ +--- ./py-compile.orig 2013-01-11 09:44:12.000000000 +1030 ++++ ./py-compile 2014-02-20 10:39:11.486186145 +1030 +@@ -99,38 +99,38 @@ + fi + + $PYTHON -c " +-import sys, os, string, py_compile ++import sys, os, py_compile + + files = '''$files''' + +-print 'Byte-compiling python modules...' +-for file in string.split(files): ++print('Byte-compiling python modules...') ++for file in str.split(files): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): +- continue +- print file, +- sys.stdout.flush() +- py_compile.compile(filepath, filepath + 'c', path) +-print" || exit $? ++ continue ++ print(file, ++ sys.stdout.flush(), ++ py_compile.compile(filepath) ) ++print()" || exit $? + + # this will fail for python < 1.5, but that doesn't matter ... + $PYTHON -O -c " +-import sys, os, string, py_compile ++import sys, os, py_compile + + files = '''$files''' +-print 'Byte-compiling python modules (optimized versions) ...' +-for file in string.split(files): ++print('Byte-compiling python modules (optimized versions) ...') ++for file in str.split(files): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): +- continue +- print file, +- sys.stdout.flush() +- py_compile.compile(filepath, filepath + 'o', path) +-print" 2>/dev/null || : ++ continue ++ print(file, ++ sys.stdout.flush(), ++ py_compile.compile(filepath) ) ++print()" 2>/dev/null || : + + # Local Variables: + # mode: shell-script diff -Nru xcb-proto.orig/files/patch-xcbgen__xtypes.py xcb-proto/files/patch-xcbgen__xtypes.py --- xcb-proto.orig/files/patch-xcbgen__xtypes.py 1970-01-01 09:30:00.000000000 +0930 +++ xcb-proto/files/patch-xcbgen__xtypes.py 2014-02-20 09:45:55.652187053 +1030 @@ -0,0 +1,11 @@ +--- ./xcbgen/xtypes.py.orig 2014-02-19 23:04:20.705187909 +1030 ++++ ./xcbgen/xtypes.py 2014-02-19 23:05:15.646186528 +1030 +@@ -76,7 +76,7 @@ + complex_type.fields.append(new_field) + + def make_fd_of(self, module, complex_type, fd_name): +- ''' ++ ''' + Method for making a fd member of a structure. + ''' + new_fd = Field(self, module.get_type_name('INT32'), fd_name, True, False, False, None, True) --------------050009060103080208050709--