diff options
author | Matt Turner <mattst88@gentoo.org> | 2018-04-23 22:57:20 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2018-04-26 18:15:59 -0700 |
commit | d420deeb520b7e598eba60f7d2cabd18ae161f7a (patch) | |
tree | 471b1c61913acd7c828414ac0473b2916d6466e0 /x11-base | |
parent | dev-perl/X11-XCB: Move x11 proto deps to DEPEND (diff) | |
download | gentoo-d420deeb520b7e598eba60f7d2cabd18ae161f7a.tar.gz gentoo-d420deeb520b7e598eba60f7d2cabd18ae161f7a.tar.bz2 gentoo-d420deeb520b7e598eba60f7d2cabd18ae161f7a.zip |
x11-base/xcb-proto: Move from x11-proto/xcb-proto
Diffstat (limited to 'x11-base')
7 files changed, 538 insertions, 0 deletions
diff --git a/x11-base/xcb-proto/Manifest b/x11-base/xcb-proto/Manifest new file mode 100644 index 000000000000..e4b1cc4e7beb --- /dev/null +++ b/x11-base/xcb-proto/Manifest @@ -0,0 +1,2 @@ +DIST xcb-proto-1.12.tar.bz2 153890 BLAKE2B cdb4b245e838ca56bfdcaa9a0618ce45e5d4da8ee10f7ae3389ff297325c3d81ba446a6385737cc9b053ecb06a0c829d99ab27dceecfec49ac1591c25c832c46 SHA512 1f427eaf223971b25b56c9f641350e03f5ebeb17a1fc212ce2a0c892de7aba7e53d5e3958b073a122bb344c387c0ff394cf96f542ff046f33de4e1cd27fb9e5c +DIST xcb-proto-1.13.tar.bz2 151981 BLAKE2B 04d90838f8a892103e6d7aa807f1b0b6794f1538c6c986ad3cba67cff3a963ff680e45c2137c5d6330736a3aa1a387d61fc247f23487de9dada2f4013590b4a1 SHA512 002aa2aa0ad503977e03419c6f136f1e3aa8c787916830ce6d6be8f81ca99edc1d8fc5f71ce8c592b490cc767bf6567695f0bafe55fe3f743076bcddbaac07f7 diff --git a/x11-base/xcb-proto/files/xcb-proto-1.12-make-whitespace-usage-consistent.patch b/x11-base/xcb-proto/files/xcb-proto-1.12-make-whitespace-usage-consistent.patch new file mode 100644 index 000000000000..695794864da7 --- /dev/null +++ b/x11-base/xcb-proto/files/xcb-proto-1.12-make-whitespace-usage-consistent.patch @@ -0,0 +1,208 @@ +From ea7a3ac6c658164690e0febb55f4467cb9e0bcac Mon Sep 17 00:00:00 2001 +From: Thomas Klausner <wiz@NetBSD.org> +Date: Thu, 19 May 2016 17:30:04 +0200 +Subject: Make whitespace use consistent. + +At least python-3.5.x complains about this forcefully. + +Signed-off-by: Thomas Klausner <wiz@NetBSD.org> +Signed-off-by: Uli Schlachter <psychon@znc.in> + +diff --git a/xcbgen/align.py b/xcbgen/align.py +index 5e31838..d4c12ee 100644 +--- a/xcbgen/align.py ++++ b/xcbgen/align.py +@@ -16,12 +16,12 @@ class Alignment(object): + return self.align == other.align and self.offset == other.offset + + def __str__(self): +- return "(align=%d, offset=%d)" % (self.align, self.offset) ++ return "(align=%d, offset=%d)" % (self.align, self.offset) + + @staticmethod + def for_primitive_type(size): +- # compute the required start_alignment based on the size of the type +- if size % 8 == 0: ++ # compute the required start_alignment based on the size of the type ++ if size % 8 == 0: + # do 8-byte primitives require 8-byte alignment in X11? + return Alignment(8,0) + elif size % 4 == 0: +@@ -33,7 +33,7 @@ class Alignment(object): + + + def align_after_fixed_size(self, size): +- new_offset = (self.offset + size) % self.align ++ new_offset = (self.offset + size) % self.align + return Alignment(self.align, new_offset) + + +@@ -41,7 +41,7 @@ class Alignment(object): + ''' + Assuming the given external_align, checks whether + self is fulfilled for all cases. +- Returns True if yes, False otherwise. ++ Returns True if yes, False otherwise. + ''' + if self.align == 1 and self.offset == 0: + # alignment 1 with offset 0 is always fulfilled +@@ -55,9 +55,9 @@ class Alignment(object): + # the external align guarantees less alignment -> not guaranteed + return False + +- if external_align.align % self.align != 0: ++ if external_align.align % self.align != 0: + # the external align cannot be divided by our align +- # -> not guaranteed ++ # -> not guaranteed + # (this can only happen if there are alignments that are not + # a power of 2, which is highly discouraged. But better be + # safe and check for it) +@@ -72,7 +72,7 @@ class Alignment(object): + + def combine_with(self, other): + # returns the alignment that is guaranteed when +- # both, self or other, can happen ++ # both, self or other, can happen + new_align = gcd(self.align, other.align) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align +@@ -83,8 +83,8 @@ class Alignment(object): + new_align = gcd(new_align, offset_diff) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align +- assert new_offset_candidate1 == new_offset_candidate2 +- new_offset = new_offset_candidate1 ++ assert new_offset_candidate1 == new_offset_candidate2 ++ new_offset = new_offset_candidate1 + # return the result + return Alignment(new_align, new_offset) + +@@ -92,44 +92,44 @@ class Alignment(object): + class AlignmentLog(object): + + def __init__(self): +- self.ok_list = [] +- self.fail_list = [] +- self.verbosity = 1 ++ self.ok_list = [] ++ self.fail_list = [] ++ self.verbosity = 1 + + def __str__(self): +- result = "" ++ result = "" + +- # output the OK-list +- for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list: +- stacksize = len(callstack) ++ # output the OK-list ++ for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list: ++ stacksize = len(callstack) + indent = ' ' * stacksize +- if self.ok_callstack_is_relevant(callstack): ++ if self.ok_callstack_is_relevant(callstack): + if field_name is None or field_name == "": +- result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n" +- % (indent, str(type_obj), indent, str(align_before), str(align_after))) +- else: +- result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n" +- % (indent, str(field_name), str(type_obj), +- indent, str(align_before), str(align_after))) ++ result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n" ++ % (indent, str(type_obj), indent, str(align_before), str(align_after))) ++ else: ++ result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n" ++ % (indent, str(field_name), str(type_obj), ++ indent, str(align_before), str(align_after))) + if self.verbosity >= 1: +- result += self.callstack_to_str(indent, callstack) ++ result += self.callstack_to_str(indent, callstack) + +- # output the fail-list +- for (align_before, field_name, type_obj, callstack, reason) in self.fail_list: +- stacksize = len(callstack) ++ # output the fail-list ++ for (align_before, field_name, type_obj, callstack, reason) in self.fail_list: ++ stacksize = len(callstack) + indent = ' ' * stacksize +- if field_name is None or field_name == "": +- result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n" +- % (indent, str(align_before), indent, str(type_obj), indent, reason)) +- else: +- result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n" +- % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason)) ++ if field_name is None or field_name == "": ++ result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n" ++ % (indent, str(align_before), indent, str(type_obj), indent, reason)) ++ else: ++ result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n" ++ % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason)) + + if self.verbosity >= 1: +- result += self.callstack_to_str(indent, callstack) ++ result += self.callstack_to_str(indent, callstack) + + +- return result ++ return result + + + def callstack_to_str(self, indent, callstack): +@@ -137,41 +137,41 @@ class AlignmentLog(object): + for stack_elem in callstack: + result += "\t %s%s\n" % (indent, str(stack_elem)) + result += "\t%s]\n" % indent +- return result ++ return result + + + def ok_callstack_is_relevant(self, ok_callstack): + # determine whether an ok callstack is relevant for logging +- if self.verbosity >= 2: +- return True ++ if self.verbosity >= 2: ++ return True + + # empty callstacks are always relevant +- if len(ok_callstack) == 0: ++ if len(ok_callstack) == 0: + return True + +- # check whether the ok_callstack is a subset or equal to a fail_callstack ++ # check whether the ok_callstack is a subset or equal to a fail_callstack + for (align_before, field_name, type_obj, fail_callstack, reason) in self.fail_list: + if len(ok_callstack) <= len(fail_callstack): + zipped = zip(ok_callstack, fail_callstack[:len(ok_callstack)]) +- is_subset = all([i == j for i, j in zipped]) +- if is_subset: ++ is_subset = all([i == j for i, j in zipped]) ++ if is_subset: + return True + + return False + + + def ok(self, align_before, field_name, type_obj, callstack, align_after): +- self.ok_list.append((align_before, field_name, type_obj, callstack, align_after)) ++ self.ok_list.append((align_before, field_name, type_obj, callstack, align_after)) + + def fail(self, align_before, field_name, type_obj, callstack, reason): +- self.fail_list.append((align_before, field_name, type_obj, callstack, reason)) ++ self.fail_list.append((align_before, field_name, type_obj, callstack, reason)) + + def append(self, other): +- self.ok_list.extend(other.ok_list) +- self.fail_list.extend(other.fail_list) ++ self.ok_list.extend(other.ok_list) ++ self.fail_list.extend(other.fail_list) + + def ok_count(self): +- return len(self.ok_list) ++ return len(self.ok_list) + + + +-- +cgit v0.10.2 + diff --git a/x11-base/xcb-proto/files/xcb-proto-1.12-print-is-a-function-and-needs-parentheses.patch b/x11-base/xcb-proto/files/xcb-proto-1.12-print-is-a-function-and-needs-parentheses.patch new file mode 100644 index 000000000000..fed0745a5e9c --- /dev/null +++ b/x11-base/xcb-proto/files/xcb-proto-1.12-print-is-a-function-and-needs-parentheses.patch @@ -0,0 +1,68 @@ +From bea5e1c85bdc0950913790364e18228f20395a3d Mon Sep 17 00:00:00 2001 +From: Thomas Klausner <wiz@NetBSD.org> +Date: Thu, 19 May 2016 17:30:05 +0200 +Subject: print() is a function and needs parentheses. + +Fixes build with python-3.x. + +Signed-off-by: Thomas Klausner <wiz@NetBSD.org> +Signed-off-by: Uli Schlachter <psychon@znc.in> + +diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py +index c3b5758..b83b119 100644 +--- a/xcbgen/xtypes.py ++++ b/xcbgen/xtypes.py +@@ -501,7 +501,7 @@ class ComplexType(Type): + int(required_start_align_element.get('align', "4"), 0), + int(required_start_align_element.get('offset', "0"), 0)) + if verbose_align_log: +- print "Explicit start-align for %s: %s\n" % (self, self.required_start_align) ++ print ("Explicit start-align for %s: %s\n" % (self, self.required_start_align)) + + def resolve(self, module): + if self.resolved: +@@ -592,7 +592,7 @@ class ComplexType(Type): + if verbose_align_log: + print ("calc_required_start_align: %s has start-align %s" + % (str(self), str(self.required_start_align))) +- print "Details:\n" + str(log) ++ print ("Details:\n" + str(log)) + if self.required_start_align.offset != 0: + print (("WARNING: %s\n\thas start-align with non-zero offset: %s" + + "\n\tsuggest to add explicit definition with:" +@@ -619,12 +619,12 @@ class ComplexType(Type): + for offset in range(0,align): + align_candidate = Alignment(align, offset) + if verbose_align_log: +- print "trying %s for %s" % (str(align_candidate), str(self)) ++ print ("trying %s for %s" % (str(align_candidate), str(self))) + my_log = AlignmentLog() + if self.is_possible_start_align(align_candidate, callstack, my_log): + log.append(my_log) + if verbose_align_log: +- print "found start-align %s for %s" % (str(align_candidate), str(self)) ++ print ("found start-align %s for %s" % (str(align_candidate), str(self))) + return align_candidate + else: + my_ok_count = my_log.ok_count() +@@ -641,7 +641,7 @@ class ComplexType(Type): + # none of the candidates applies + # this type has illegal internal aligns for all possible start_aligns + if verbose_align_log: +- print "didn't find start-align for %s" % str(self) ++ print ("didn't find start-align for %s" % str(self)) + log.append(best_log) + return None + +@@ -900,7 +900,7 @@ class SwitchType(ComplexType): + # aux function for unchecked_get_alignment_after + def get_align_for_selected_case_field(self, case_field, start_align, callstack, log): + if verbose_align_log: +- print "get_align_for_selected_case_field: %s, case_field = %s" % (str(self), str(case_field)) ++ print ("get_align_for_selected_case_field: %s, case_field = %s" % (str(self), str(case_field))) + total_align = start_align + for field in self.bitcases: + my_callstack = callstack[:] +-- +cgit v0.10.2 + diff --git a/x11-base/xcb-proto/files/xcb-proto-1.12-update-xml-schema.patch b/x11-base/xcb-proto/files/xcb-proto-1.12-update-xml-schema.patch new file mode 100644 index 000000000000..deb6673fe1eb --- /dev/null +++ b/x11-base/xcb-proto/files/xcb-proto-1.12-update-xml-schema.patch @@ -0,0 +1,120 @@ +From 95a262e0e66cd88b9d7a133917b3ba70ace77301 Mon Sep 17 00:00:00 2001 +From: Jon Turney <jon.turney@dronecode.org.uk> +Date: Wed, 3 Feb 2016 16:41:57 +0000 +Subject: Update XML schema to fix 'make check' + +Here is an attempt at updating the schema to add serialize attribute to pad +element and required_start_align element. + +Not sure if I've added required_start_align element in the right place. The +default case in the switch element is removed as it doesn't seem to be used, and +otherwise makes the schema ambiguous. + +$ make check +Making check in src +make[1]: Entering directory '/jhbuild/x86_64-pc-cygwin/build/xcb/proto/src' +make check-local +make[2]: Entering directory '/jhbuild/x86_64-pc-cygwin/build/xcb/proto/src' +/usr/bin/xmllint --noout --schema /jhbuild/checkout/xcb/proto/src/xcb.xsd +/jhbuild/checkout/xcb/proto/src/*.xml +/jhbuild/checkout/xcb/proto/src/bigreq.xml validates +/jhbuild/checkout/xcb/proto/src/composite.xml validates +/jhbuild/checkout/xcb/proto/src/damage.xml validates +/jhbuild/checkout/xcb/proto/src/dpms.xml validates +/jhbuild/checkout/xcb/proto/src/dri2.xml validates +/jhbuild/checkout/xcb/proto/src/dri3.xml validates +/jhbuild/checkout/xcb/proto/src/ge.xml validates +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd ). +/jhbuild/checkout/xcb/proto/src/glx.xml fails to validate +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd, exprfield, switch, reply, doc ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd, exprfield, switch, reply, doc ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd, doc ). +Element 'required_start_align': This element is not expected. Expected is one of ( pad, field, list, fd, doc ). +/jhbuild/checkout/xcb/proto/src/present.xml fails to validate +/jhbuild/checkout/xcb/proto/src/randr.xml validates +/jhbuild/checkout/xcb/proto/src/record.xml validates +/jhbuild/checkout/xcb/proto/src/render.xml validates +/jhbuild/checkout/xcb/proto/src/res.xml validates +/jhbuild/checkout/xcb/proto/src/screensaver.xml validates +/jhbuild/checkout/xcb/proto/src/shape.xml validates +/jhbuild/checkout/xcb/proto/src/shm.xml validates +/jhbuild/checkout/xcb/proto/src/sync.xml validates +/jhbuild/checkout/xcb/proto/src/xc_misc.xml validates +/jhbuild/checkout/xcb/proto/src/xevie.xml validates +/jhbuild/checkout/xcb/proto/src/xf86dri.xml validates +/jhbuild/checkout/xcb/proto/src/xf86vidmode.xml validates +/jhbuild/checkout/xcb/proto/src/xfixes.xml validates +/jhbuild/checkout/xcb/proto/src/xinerama.xml validates +Element 'required_start_align': This element is not expected. Expected is one of ( bitcase, case, pad, field, list, fd ). +Element 'required_start_align': This element is not expected. Expected is one of ( bitcase, case, pad, field, list, fd ). +Element 'required_start_align': This element is not expected. Expected is one of ( bitcase, case, pad, field, list, fd ). +/jhbuild/checkout/xcb/proto/src/xinput.xml fails to validate +Element 'pad', attribute 'serialize': The attribute 'serialize' is not allowed. +Element 'pad', attribute 'serialize': The attribute 'serialize' is not allowed. +Element 'pad', attribute 'serialize': The attribute 'serialize' is not allowed. +Element 'pad', attribute 'serialize': The attribute 'serialize' is not allowed. +Element 'pad', attribute 'serialize': The attribute 'serialize' is not allowed. +/jhbuild/checkout/xcb/proto/src/xkb.xml fails to validate +/jhbuild/checkout/xcb/proto/src/xprint.xml validates +/jhbuild/checkout/xcb/proto/src/xproto.xml validates +/jhbuild/checkout/xcb/proto/src/xselinux.xml validates +/jhbuild/checkout/xcb/proto/src/xtest.xml validates +/jhbuild/checkout/xcb/proto/src/xv.xml validates +/jhbuild/checkout/xcb/proto/src/xvmc.xml validates +Makefile:534: recipe for target 'check-local' failed + +Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95494 +Reviewd-by: Ran Benita <ran234@gmail.com> +Signed-off-by: Uli Schlachter <psychon@znc.in> + +diff --git a/src/xcb.xsd b/src/xcb.xsd +index c1dce3e..f0c5f44 100644 +--- a/src/xcb.xsd ++++ b/src/xcb.xsd +@@ -44,6 +44,15 @@ authorization from the authors. + <xsd:complexType> + <xsd:attribute name="bytes" type="xsd:integer" use="optional" /> + <xsd:attribute name="align" type="xsd:integer" use="optional" /> ++ <xsd:attribute name="serialize" type="xsd:boolean" use="optional" /> ++ </xsd:complexType> ++ </xsd:element> ++ ++ <!-- Alignment --> ++ <xsd:element name="required_start_align" > ++ <xsd:complexType> ++ <xsd:attribute name="align" type="xsd:integer" use="required" /> ++ <xsd:attribute name="offset" type="xsd:integer" use="optional" /> + </xsd:complexType> + </xsd:element> + +@@ -76,14 +85,13 @@ authorization from the authors. + <xsd:sequence> + <!-- switch(expression) --> + <xsd:group ref="expression" minOccurs="1" maxOccurs="1" /> ++ <xsd:element ref="required_start_align" minOccurs="0" maxOccurs="1" /> + <xsd:choice> + <!-- bitcase expression - bit test --> + <xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> + <!-- case expression - value test --> + <xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> + </xsd:choice> +- <!-- default: --> +- <xsd:group ref="fields" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> +@@ -201,6 +209,7 @@ authorization from the authors. + <xsd:element ref="field" /> + <xsd:element ref="list" /> + <xsd:element ref="fd" /> ++ <xsd:element ref="required_start_align" /> + </xsd:choice> + </xsd:group> + +-- +cgit v0.10.2 + diff --git a/x11-base/xcb-proto/metadata.xml b/x11-base/xcb-proto/metadata.xml new file mode 100644 index 000000000000..e943b72b8a48 --- /dev/null +++ b/x11-base/xcb-proto/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>x11@gentoo.org</email> + <name>X11</name> +</maintainer> +</pkgmetadata> diff --git a/x11-base/xcb-proto/xcb-proto-1.12-r2.ebuild b/x11-base/xcb-proto/xcb-proto-1.12-r2.ebuild new file mode 100644 index 000000000000..a49cbb8e2a4a --- /dev/null +++ b/x11-base/xcb-proto/xcb-proto-1.12-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +XORG_MULTILIB=yes + +inherit python-r1 xorg-2 + +DESCRIPTION="X C-language Bindings protocol headers" +HOMEPAGE="https://xcb.freedesktop.org/" +EGIT_REPO_URI="https://anongit.freedesktop.org/git/xcb/proto.git" +[[ ${PV} != 9999* ]] && \ + SRC_URI="https://xcb.freedesktop.org/dist/${P}.tar.bz2" + +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="${PYTHON_DEPS}" +DEPEND="${RDEPEND} + dev-libs/libxml2" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +PATCHES=( + "${FILESDIR}"/${P}-make-whitespace-usage-consistent.patch + "${FILESDIR}"/${P}-print-is-a-function-and-needs-parentheses.patch + "${FILESDIR}"/${P}-update-xml-schema.patch +) + +src_configure() { + python_setup + xorg-2_src_configure +} + +multilib_src_configure() { + autotools-utils_src_configure + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_configure + fi +} + +multilib_src_compile() { + default + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_compile -C xcbgen \ + top_builddir="${BUILD_DIR}" + fi +} + +src_install() { + xorg-2_src_install + + # pkg-config file hardcodes python sitedir, bug 486512 + sed -i -e '/pythondir/s:=.*$:=/dev/null:' \ + "${ED}"/usr/lib*/pkgconfig/xcb-proto.pc || die +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_install -C xcbgen \ + top_builddir="${BUILD_DIR}" + fi +} diff --git a/x11-base/xcb-proto/xcb-proto-1.13.ebuild b/x11-base/xcb-proto/xcb-proto-1.13.ebuild new file mode 100644 index 000000000000..81add3e7b94f --- /dev/null +++ b/x11-base/xcb-proto/xcb-proto-1.13.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +XORG_MULTILIB=yes + +inherit python-r1 xorg-2 + +DESCRIPTION="X C-language Bindings protocol headers" +HOMEPAGE="https://xcb.freedesktop.org/" +EGIT_REPO_URI="https://anongit.freedesktop.org/git/xcb/proto.git" +[[ ${PV} != 9999* ]] && \ + SRC_URI="https://xcb.freedesktop.org/dist/${P}.tar.bz2" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="${PYTHON_DEPS}" +DEPEND="${RDEPEND} + dev-libs/libxml2" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_configure() { + python_setup + xorg-2_src_configure +} + +multilib_src_configure() { + autotools-utils_src_configure + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_configure + fi +} + +multilib_src_compile() { + default + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_compile -C xcbgen \ + top_builddir="${BUILD_DIR}" + fi +} + +src_install() { + xorg-2_src_install + + # pkg-config file hardcodes python sitedir, bug 486512 + sed -i -e '/pythondir/s:=.*$:=/dev/null:' \ + "${ED}"/usr/lib*/pkgconfig/xcb-proto.pc || die +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + python_foreach_impl autotools-utils_src_install -C xcbgen \ + top_builddir="${BUILD_DIR}" + fi +} |