diff options
author | rm <rm@FreeBSD.org> | 2016-11-07 17:36:15 +0800 |
---|---|---|
committer | rm <rm@FreeBSD.org> | 2016-11-07 17:36:15 +0800 |
commit | d7ceac444686a23519246d6db39b0ce657353fde (patch) | |
tree | dbd15a3af11ebb9bb0ba7763df1c10526bdec275 | |
parent | c0e3bb2eaf5d0e1a99bab20c095932c1cb70dc82 (diff) | |
download | freebsd-ports-gnome-d7ceac444686a23519246d6db39b0ce657353fde.tar.gz freebsd-ports-gnome-d7ceac444686a23519246d6db39b0ce657353fde.tar.zst freebsd-ports-gnome-d7ceac444686a23519246d6db39b0ce657353fde.zip |
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@saltant.com>
Approved by: portmgr (just-fix-it blanket)
-rw-r--r-- | x11/libxcb/Makefile | 2 | ||||
-rw-r--r-- | x11/libxcb/files/patch-src_c__client.py | 44 | ||||
-rw-r--r-- | x11/libxcb/files/patch-tests-check_public.c | 8 |
3 files changed, 49 insertions, 5 deletions
diff --git a/x11/libxcb/Makefile b/x11/libxcb/Makefile index 66a44dac1d83..3bdf76249ef2 100644 --- a/x11/libxcb/Makefile +++ b/x11/libxcb/Makefile @@ -20,7 +20,7 @@ RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-st 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 diff --git a/x11/libxcb/files/patch-src_c__client.py b/x11/libxcb/files/patch-src_c__client.py new file mode 100644 index 000000000000..dec29105192e --- /dev/null +++ b/x11/libxcb/files/patch-src_c__client.py @@ -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'" diff --git a/x11/libxcb/files/patch-tests-check_public.c b/x11/libxcb/files/patch-tests-check_public.c index 2a2f27130ada..a0ae86e27d2b 100644 --- a/x11/libxcb/files/patch-tests-check_public.c +++ b/x11/libxcb/files/patch-tests-check_public.c @@ -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) { |