Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2014 03:20:01 GMT
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        freebsd-x11@FreeBSD.org
Subject:   Re: ports/187200: [PATCH] x11/xcb-proto: fix USE_PYTHON
Message-ID:  <201403030320.s233K1jY050516@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/187200; it has been noted by GNATS.

From: Shane Ambler <FreeBSD@ShaneWare.Biz>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403030320.s233K1jY050516>