svn commit: r425598 - in head/x11/libxcb: . files

Ruslan Makhmatkhanov rm at FreeBSD.org
Mon Nov 7 09:36:16 UTC 2016


Author: rm
Date: Mon Nov  7 09:36:15 2016
New Revision: 425598
URL: https://svnweb.freebsd.org/changeset/ports/425598

Log:
  x11/libxcb: fix build with python3
  
  Add upstream patches to fix build/packaging with python3 as default after
  the recent update. python3 is not default, so no PORTREVISION bump is required.
  
  PR:		214281
  Submitted by:	John W. O'Brien <john at saltant.com>
  Approved by:	portmgr (just-fix-it blanket)

Added:
  head/x11/libxcb/files/patch-src_c__client.py   (contents, props changed)
Modified:
  head/x11/libxcb/Makefile
  head/x11/libxcb/files/patch-tests-check_public.c

Modified: head/x11/libxcb/Makefile
==============================================================================
--- head/x11/libxcb/Makefile	Mon Nov  7 09:32:02 2016	(r425597)
+++ head/x11/libxcb/Makefile	Mon Nov  7 09:36:15 2016	(r425598)
@@ -20,7 +20,7 @@ RUN_DEPENDS=	${LOCALBASE}/libdata/pkgcon
 CONFIGURE_ARGS+=	--disable-build-docs --without-doxygen --enable-xinput
 
 XORG_CAT=	lib
-USES=		cpe gmake python:build
+USES=		cpe gmake python:2.7+,build
 USE_GNOME=	libxslt:build
 USE_XORG=	xau xdmcp
 INSTALL_TARGET=	install-strip

Added: head/x11/libxcb/files/patch-src_c__client.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/libxcb/files/patch-src_c__client.py	Mon Nov  7 09:36:15 2016	(r425598)
@@ -0,0 +1,44 @@
+Obtained from:
+
+https://cgit.freedesktop.org/xcb/libxcb/commit/src/c_client.py?id=8740a288ca468433141341347aa115b9544891d3
+
+--- src/c_client.py.orig	2016-05-09 16:10:55 UTC
++++ src/c_client.py
+@@ -1364,7 +1364,7 @@ def _c_serialize(context, self):
+             _c('    unsigned int xcb_align_to = 0;')
+         if self.is_switch:
+             _c('    unsigned int xcb_padding_offset = %d;',
+-	       self.get_align_offset() )
++               self.get_align_offset() )
+         prefix = [('_aux', '->', self)]
+         aux_ptr = 'xcb_out'
+ 
+@@ -1390,7 +1390,7 @@ def _c_serialize(context, self):
+         _c('    unsigned int xcb_align_to = 0;')
+         if self.is_switch:
+             _c('    unsigned int xcb_padding_offset = %d;',
+-	       self.get_align_offset() )
++               self.get_align_offset() )
+ 
+     elif 'sizeof' == context:
+         param_names = [p[2] for p in params]
+@@ -1930,14 +1930,14 @@ def _c_accessors_list(self, field):
+                     # from the request size and divide that by the member size
+                     return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))'
+                 else:
+-		    # use the accessor to get the start of the list, then
+-		    # compute the length of it by subtracting it from
++                    # use the accessor to get the start of the list, then
++                    # compute the length of it by subtracting it from
+                     # the adress of the first byte after the end of the
+                     # request
+-		    after_end_of_request = '(((char*)R) + R->length * 4)'
+-		    start_of_list = '%s(R)' % (field.c_accessor_name)
++                    after_end_of_request = '(((char*)R) + R->length * 4)'
++                    start_of_list = '%s(R)' % (field.c_accessor_name)
+                     bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list)
+-		    return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
++                    return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
+             else:
+                 raise Exception(
+                     "lengthless lists with varsized members are not supported. Fieldname '%s'"

Modified: head/x11/libxcb/files/patch-tests-check_public.c
==============================================================================
--- head/x11/libxcb/files/patch-tests-check_public.c	Mon Nov  7 09:32:02 2016	(r425597)
+++ head/x11/libxcb/files/patch-tests-check_public.c	Mon Nov  7 09:36:15 2016	(r425598)
@@ -1,6 +1,6 @@
---- tests/check_public.c.orig	Wed Jan 24 15:16:59 2007
-+++ tests/check_public.c	Wed Jan 24 15:22:33 2007
-@@ -70,7 +70,10 @@
+--- tests/check_public.c.orig	2011-07-02 20:20:42 UTC
++++ tests/check_public.c
+@@ -30,7 +30,10 @@ static void parse_display_pass(const cha
  		else if(test_type == TEST_ENVIRONMENT)
  		{
  			argument = 0;
@@ -12,7 +12,7 @@
  		}
  
  		got_host = (char *) -1;
-@@ -148,7 +151,7 @@
+@@ -150,7 +153,7 @@ END_TEST
  
  START_TEST(parse_display_negative)
  {


More information about the svn-ports-all mailing list