From 84f14749b7bec66b2af5f74d08766b0e82597fbe Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 8 Apr 2009 13:06:22 +0000 Subject: split the "xcbgen" Python extension which comes with xcb-proto into its own pkg and pull it in the common Python way so that we ensure matching Python versions --- x11/libxcb/Makefile | 6 +++++- x11/py-xcbgen/DESCR | 20 ++++++++++++++++++++ x11/py-xcbgen/Makefile | 23 +++++++++++++++++++++++ x11/py-xcbgen/PLIST | 20 ++++++++++++++++++++ x11/py-xcbgen/distinfo | 10 ++++++++++ x11/py-xcbgen/patches/patch-aa | 13 +++++++++++++ x11/py-xcbgen/patches/patch-ab | 42 ++++++++++++++++++++++++++++++++++++++++++ x11/py-xcbgen/patches/patch-ac | 13 +++++++++++++ x11/py-xcbgen/patches/patch-ad | 13 +++++++++++++ x11/py-xcbgen/patches/patch-ae | 22 ++++++++++++++++++++++ x11/xcb-proto/Makefile | 7 ++++--- x11/xcb-proto/PLIST | 21 +-------------------- x11/xcb-proto/distinfo | 6 ++---- x11/xcb-proto/patches/patch-ab | 42 ------------------------------------------ x11/xcb-proto/patches/patch-ac | 13 ------------- x11/xcb-proto/patches/patch-ad | 13 ------------- x11/xcb-proto/patches/patch-ae | 13 +++++++++++++ 17 files changed, 201 insertions(+), 96 deletions(-) create mode 100644 x11/py-xcbgen/DESCR create mode 100644 x11/py-xcbgen/Makefile create mode 100644 x11/py-xcbgen/PLIST create mode 100644 x11/py-xcbgen/distinfo create mode 100644 x11/py-xcbgen/patches/patch-aa create mode 100644 x11/py-xcbgen/patches/patch-ab create mode 100644 x11/py-xcbgen/patches/patch-ac create mode 100644 x11/py-xcbgen/patches/patch-ad create mode 100644 x11/py-xcbgen/patches/patch-ae delete mode 100644 x11/xcb-proto/patches/patch-ab delete mode 100644 x11/xcb-proto/patches/patch-ac delete mode 100644 x11/xcb-proto/patches/patch-ad create mode 100644 x11/xcb-proto/patches/patch-ae (limited to 'x11') diff --git a/x11/libxcb/Makefile b/x11/libxcb/Makefile index f5bff6009c3..27b25dfef2e 100644 --- a/x11/libxcb/Makefile +++ b/x11/libxcb/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2009/04/06 10:23:59 drochner Exp $ +# $NetBSD: Makefile,v 1.2 2009/04/08 13:06:22 drochner Exp $ # DISTNAME= libxcb-1.1.93 @@ -75,11 +75,15 @@ SUBST_VARS.pc= XTHREADLIB XTHREAD_CPPFLAGS pre-configure: cd ${WRKSRC} && autoreconf -v -i -f +BUILD_DEPENDS+= ${PYPKGPREFIX}-xcbgen-[0-9]*:../../x11/py-xcbgen + ### ### XXX needed to build from scratch, but we're patching right now ### so it's not needed (nor should it ever be, really). ### #.include "../../devel/gperf/buildlink3.mk" +PYTHON_FOR_BUILD_ONLY= yes +.include "../../lang/python/application.mk" .include "../../x11/xcb-proto/buildlink3.mk" .include "../../x11/libXdmcp/buildlink3.mk" .include "../../x11/libXau/buildlink3.mk" diff --git a/x11/py-xcbgen/DESCR b/x11/py-xcbgen/DESCR new file mode 100644 index 00000000000..9796595282f --- /dev/null +++ b/x11/py-xcbgen/DESCR @@ -0,0 +1,20 @@ +About xcb-proto +=============== + +The xcb-proto package provides the XML-XCB (X C Bindings) protocol +descriptions that libxcb uses to generate the majority of its code and API. +We provide them separately from libxcb to allow reuse by other projects, +such as additional language bindings, protocol dissectors, or +documentation generators. + +Separation of XCB's transport and protocol layers simplifies both +writing extensions and client-side support for extensions. +By contrast, with the xlib infrastructure, client-side support for +new extensions requires significant duplication of effort. With XCB and +the XML-XCB protocol descriptions, client-side support for a new +extension requires only an XML description of the extension--and not a +single line of code. + +Python libraries: xcb-proto also contains language-independent Python +libraries that are used to parse an XML description and create objects +used by Python code generators in individual language bindings. diff --git a/x11/py-xcbgen/Makefile b/x11/py-xcbgen/Makefile new file mode 100644 index 00000000000..f9cf1f045bb --- /dev/null +++ b/x11/py-xcbgen/Makefile @@ -0,0 +1,23 @@ +# $NetBSD: Makefile,v 1.1 2009/04/08 13:06:22 drochner Exp $ +# + +DISTNAME= xcb-proto-1.4 +PKGNAME= ${PYPKGPREFIX}-xcbgen-1.4 +CATEGORIES= x11 +MASTER_SITES= http://xcb.freedesktop.org/dist/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= reed@reedmedia.net +HOMEPAGE= http://xcb.freedesktop.org/ +COMMENT= XCB protocol descriptions (in XML) + +CONFLICTS+= xcb-proto<1.4nb1 +PKG_DESTDIR_SUPPORT= user-destdir + +GNU_CONFIGURE= yes +USE_TOOLS+= pkg-config +USE_LANGUAGES= # none +PY_PATCHPLIST= yes + +.include "../../lang/python/extension.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/x11/py-xcbgen/PLIST b/x11/py-xcbgen/PLIST new file mode 100644 index 00000000000..2499712c202 --- /dev/null +++ b/x11/py-xcbgen/PLIST @@ -0,0 +1,20 @@ +@comment $NetBSD: PLIST,v 1.1 2009/04/08 13:06:22 drochner Exp $ +${PYSITELIB}/xcbgen/__init__.py +${PYSITELIB}/xcbgen/__init__.pyc +${PYSITELIB}/xcbgen/__init__.pyo +${PYSITELIB}/xcbgen/error.py +${PYSITELIB}/xcbgen/error.pyc +${PYSITELIB}/xcbgen/error.pyo +${PYSITELIB}/xcbgen/expr.py +${PYSITELIB}/xcbgen/expr.pyc +${PYSITELIB}/xcbgen/expr.pyo +${PYSITELIB}/xcbgen/matcher.py +${PYSITELIB}/xcbgen/matcher.pyc +${PYSITELIB}/xcbgen/matcher.pyo +${PYSITELIB}/xcbgen/state.py +${PYSITELIB}/xcbgen/state.pyc +${PYSITELIB}/xcbgen/state.pyo +${PYSITELIB}/xcbgen/xtypes.py +${PYSITELIB}/xcbgen/xtypes.pyc +${PYSITELIB}/xcbgen/xtypes.pyo +@dirrm ${PYSITELIB}/xcbgen diff --git a/x11/py-xcbgen/distinfo b/x11/py-xcbgen/distinfo new file mode 100644 index 00000000000..0bf537cab48 --- /dev/null +++ b/x11/py-xcbgen/distinfo @@ -0,0 +1,10 @@ +$NetBSD: distinfo,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +SHA1 (xcb-proto-1.4.tar.bz2) = ab9bb7c875558a3324673bb749e0502046f31083 +RMD160 (xcb-proto-1.4.tar.bz2) = a344ca302a1cbefd98dcd289abf8704667a4b536 +Size (xcb-proto-1.4.tar.bz2) = 87093 bytes +SHA1 (patch-aa) = a04e2b8bb3fa6630d47d3febd7d676717ac15907 +SHA1 (patch-ab) = c61982389c86d2a61136aba67ea2a0647cc68da5 +SHA1 (patch-ac) = 39539e6d45e4994df0c291f6c05382c5c00a6aee +SHA1 (patch-ad) = bb86c889e0520aa98761b01d71d438ca4e71fc6b +SHA1 (patch-ae) = dc24bb927986f7112367836e6520c30059891686 diff --git a/x11/py-xcbgen/patches/patch-aa b/x11/py-xcbgen/patches/patch-aa new file mode 100644 index 00000000000..390cc7b0f39 --- /dev/null +++ b/x11/py-xcbgen/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- configure.orig 2009-01-07 13:20:32.000000000 +0100 ++++ configure +@@ -2207,7 +2207,7 @@ echo $ECHO_N "checking whether $PYTHON v + prog="import sys, string + # split strings by '.' and convert to numeric. Append some zeros + # because we need at least 4 digits for the hex conversion. +-minver = map(int, string.split('2.5', '.')) + [0, 0, 0] ++minver = map(int, string.split('2.4', '.')) + [0, 0, 0] + minverhex = 0 + for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] + sys.exit(sys.hexversion < minverhex)" diff --git a/x11/py-xcbgen/patches/patch-ab b/x11/py-xcbgen/patches/patch-ab new file mode 100644 index 00000000000..5826a798832 --- /dev/null +++ b/x11/py-xcbgen/patches/patch-ab @@ -0,0 +1,42 @@ +$NetBSD: patch-ab,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- xcbgen/xtypes.py.orig 2008-09-05 00:49:13.000000000 +0200 ++++ xcbgen/xtypes.py +@@ -160,12 +160,22 @@ class ListType(Type): + + if elt.tag == 'list': + elts = list(elt) +- self.expr = Expression(elts[0] if len(elts) else elt, self) ++ if len(elts): ++ self.expr = Expression(elts[0], self) ++ else: ++ self.expr = Expression(elt, self) + elif elt.tag == 'valueparam': + self.expr = Expression(elt, self) + +- self.size = member.size if member.fixed_size() else None +- self.nmemb = self.expr.nmemb if self.expr.fixed_size() else None ++ if member.fixed_size(): ++ self.size = member.size ++ else: ++ self.size = None ++ ++ if self.expr.fixed_size(): ++ self.nmemb = self.expr.nmemb ++ else: ++ self.nmemb = None + + def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto): + if not self.fixed_size(): +@@ -256,7 +266,10 @@ class PadType(SizedPadType): + Derived class which represents a padding field of given type. + ''' + def __init__(self, elt): +- self.nmemb = "1" if (elt == None) else elt.get('bytes') ++ if (elt == None): ++ self.nmemb = "1" ++ else: ++ self.nmemb = elt.get('bytes') + SizedPadType.__init__(self, self.nmemb) + + class ComplexType(Type): diff --git a/x11/py-xcbgen/patches/patch-ac b/x11/py-xcbgen/patches/patch-ac new file mode 100644 index 00000000000..3839ee75088 --- /dev/null +++ b/x11/py-xcbgen/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- xcbgen/state.py.orig 2009-04-01 16:05:28.000000000 +0200 ++++ xcbgen/state.py +@@ -2,7 +2,7 @@ + This module contains the namespace class and the singleton module class. + ''' + from os.path import dirname, basename +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + import matcher + from error import * diff --git a/x11/py-xcbgen/patches/patch-ad b/x11/py-xcbgen/patches/patch-ad new file mode 100644 index 00000000000..c841f17a6d9 --- /dev/null +++ b/x11/py-xcbgen/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- xcbgen/matcher.py.orig 2009-04-01 16:06:02.000000000 +0200 ++++ xcbgen/matcher.py +@@ -7,7 +7,7 @@ we do not create a new type object, we j + ''' + + from os.path import join +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + import state + from xtypes import * diff --git a/x11/py-xcbgen/patches/patch-ae b/x11/py-xcbgen/patches/patch-ae new file mode 100644 index 00000000000..27a50716c55 --- /dev/null +++ b/x11/py-xcbgen/patches/patch-ae @@ -0,0 +1,22 @@ +$NetBSD: patch-ae,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- Makefile.in.orig 2009-04-08 14:37:08.000000000 +0200 ++++ Makefile.in +@@ -158,7 +158,7 @@ target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + xcbincludedir = @xcbincludedir@ +-SUBDIRS = src xcbgen ++SUBDIRS = xcbgen + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = xcb-proto.pc + EXTRA_DIST = doc xcb-proto.pc.in +@@ -547,7 +547,7 @@ info: info-recursive + + info-am: + +-install-data-am: install-pkgconfigDATA ++install-data-am: #install-pkgconfigDATA + + install-dvi: install-dvi-recursive + diff --git a/x11/xcb-proto/Makefile b/x11/xcb-proto/Makefile index 8d5c252b09d..b30ff818173 100644 --- a/x11/xcb-proto/Makefile +++ b/x11/xcb-proto/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2009/04/08 09:58:20 drochner Exp $ +# $NetBSD: Makefile,v 1.3 2009/04/08 13:06:22 drochner Exp $ # DISTNAME= xcb-proto-1.4 +PKGREVISION= 1 CATEGORIES= x11 MASTER_SITES= http://xcb.freedesktop.org/dist/ EXTRACT_SUFX= .tar.bz2 @@ -19,10 +20,10 @@ USE_LANGUAGES= # none PKGCONFIG_OVERRIDE+= xcb-proto.pc.in CONFIGURE_ENV+= XMLLLINT=${BUILDLINK_PREFIX.libxml}/bin/xmllint -PY_PATCHPLIST= yes +# XXX just for the "configure" check +PYTHON_FOR_BUILD_ONLY= yes .include "../../lang/python/application.mk" -.include "../../lang/python/extension.mk" BUILDLINK_DEPMETHOD.libxml2?= build .include "../../textproc/libxml2/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/x11/xcb-proto/PLIST b/x11/xcb-proto/PLIST index e4e99593f2f..fc6fc8d41fe 100644 --- a/x11/xcb-proto/PLIST +++ b/x11/xcb-proto/PLIST @@ -1,23 +1,5 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2009/04/06 10:22:12 drochner Exp $ +@comment $NetBSD: PLIST,v 1.2 2009/04/08 13:06:22 drochner Exp $ lib/pkgconfig/xcb-proto.pc -${PYSITELIB}/xcbgen/__init__.py -${PYSITELIB}/xcbgen/__init__.pyc -${PYSITELIB}/xcbgen/__init__.pyo -${PYSITELIB}/xcbgen/error.py -${PYSITELIB}/xcbgen/error.pyc -${PYSITELIB}/xcbgen/error.pyo -${PYSITELIB}/xcbgen/expr.py -${PYSITELIB}/xcbgen/expr.pyc -${PYSITELIB}/xcbgen/expr.pyo -${PYSITELIB}/xcbgen/matcher.py -${PYSITELIB}/xcbgen/matcher.pyc -${PYSITELIB}/xcbgen/matcher.pyo -${PYSITELIB}/xcbgen/state.py -${PYSITELIB}/xcbgen/state.pyc -${PYSITELIB}/xcbgen/state.pyo -${PYSITELIB}/xcbgen/xtypes.py -${PYSITELIB}/xcbgen/xtypes.pyc -${PYSITELIB}/xcbgen/xtypes.pyo share/xcb/bigreq.xml share/xcb/composite.xml share/xcb/damage.xml @@ -45,4 +27,3 @@ share/xcb/xtest.xml share/xcb/xv.xml share/xcb/xvmc.xml @dirrm share/xcb -@dirrm ${PYSITELIB}/xcbgen diff --git a/x11/xcb-proto/distinfo b/x11/xcb-proto/distinfo index 9b886d30b10..abae261d9e4 100644 --- a/x11/xcb-proto/distinfo +++ b/x11/xcb-proto/distinfo @@ -1,9 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2009/04/06 10:22:12 drochner Exp $ +$NetBSD: distinfo,v 1.2 2009/04/08 13:06:22 drochner Exp $ SHA1 (xcb-proto-1.4.tar.bz2) = ab9bb7c875558a3324673bb749e0502046f31083 RMD160 (xcb-proto-1.4.tar.bz2) = a344ca302a1cbefd98dcd289abf8704667a4b536 Size (xcb-proto-1.4.tar.bz2) = 87093 bytes SHA1 (patch-aa) = a04e2b8bb3fa6630d47d3febd7d676717ac15907 -SHA1 (patch-ab) = c61982389c86d2a61136aba67ea2a0647cc68da5 -SHA1 (patch-ac) = 39539e6d45e4994df0c291f6c05382c5c00a6aee -SHA1 (patch-ad) = bb86c889e0520aa98761b01d71d438ca4e71fc6b +SHA1 (patch-ae) = 58631ece73de8568e2edfa97dbbb4011a9ba00f0 diff --git a/x11/xcb-proto/patches/patch-ab b/x11/xcb-proto/patches/patch-ab deleted file mode 100644 index a2390ebed2f..00000000000 --- a/x11/xcb-proto/patches/patch-ab +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2009/04/06 10:22:12 drochner Exp $ - ---- xcbgen/xtypes.py.orig 2008-09-05 00:49:13.000000000 +0200 -+++ xcbgen/xtypes.py -@@ -160,12 +160,22 @@ class ListType(Type): - - if elt.tag == 'list': - elts = list(elt) -- self.expr = Expression(elts[0] if len(elts) else elt, self) -+ if len(elts): -+ self.expr = Expression(elts[0], self) -+ else: -+ self.expr = Expression(elt, self) - elif elt.tag == 'valueparam': - self.expr = Expression(elt, self) - -- self.size = member.size if member.fixed_size() else None -- self.nmemb = self.expr.nmemb if self.expr.fixed_size() else None -+ if member.fixed_size(): -+ self.size = member.size -+ else: -+ self.size = None -+ -+ if self.expr.fixed_size(): -+ self.nmemb = self.expr.nmemb -+ else: -+ self.nmemb = None - - def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto): - if not self.fixed_size(): -@@ -256,7 +266,10 @@ class PadType(SizedPadType): - Derived class which represents a padding field of given type. - ''' - def __init__(self, elt): -- self.nmemb = "1" if (elt == None) else elt.get('bytes') -+ if (elt == None): -+ self.nmemb = "1" -+ else: -+ self.nmemb = elt.get('bytes') - SizedPadType.__init__(self, self.nmemb) - - class ComplexType(Type): diff --git a/x11/xcb-proto/patches/patch-ac b/x11/xcb-proto/patches/patch-ac deleted file mode 100644 index 2210ef7d77f..00000000000 --- a/x11/xcb-proto/patches/patch-ac +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2009/04/06 10:22:12 drochner Exp $ - ---- xcbgen/state.py.orig 2009-04-01 16:05:28.000000000 +0200 -+++ xcbgen/state.py -@@ -2,7 +2,7 @@ - This module contains the namespace class and the singleton module class. - ''' - from os.path import dirname, basename --from xml.etree.cElementTree import parse -+from xml.etree.ElementTree import parse - - import matcher - from error import * diff --git a/x11/xcb-proto/patches/patch-ad b/x11/xcb-proto/patches/patch-ad deleted file mode 100644 index 6b16b431a3b..00000000000 --- a/x11/xcb-proto/patches/patch-ad +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2009/04/06 10:22:12 drochner Exp $ - ---- xcbgen/matcher.py.orig 2009-04-01 16:06:02.000000000 +0200 -+++ xcbgen/matcher.py -@@ -7,7 +7,7 @@ we do not create a new type object, we j - ''' - - from os.path import join --from xml.etree.cElementTree import parse -+from xml.etree.ElementTree import parse - - import state - from xtypes import * diff --git a/x11/xcb-proto/patches/patch-ae b/x11/xcb-proto/patches/patch-ae new file mode 100644 index 00000000000..e2929685199 --- /dev/null +++ b/x11/xcb-proto/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2009/04/08 13:06:22 drochner Exp $ + +--- Makefile.in.orig 2009-04-08 13:05:03.000000000 +0200 ++++ Makefile.in +@@ -158,7 +158,7 @@ target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + xcbincludedir = @xcbincludedir@ +-SUBDIRS = src xcbgen ++SUBDIRS = src + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = xcb-proto.pc + EXTRA_DIST = doc xcb-proto.pc.in -- cgit v1.2.3