Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/X11-Protocol/, dev-perl/X11-Protocol/files/
Date: Wed, 28 Mar 2018 11:19:45
Message-Id: 1522235048.1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7.kentnl@gentoo
1 commit: 1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 28 11:03:28 2018 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 28 11:04:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ade029f
7
8 dev-perl/X11-Protocol: EAPI6 + tests
9
10 - EAPI6ify
11 - Enable tests (w/ virtualx)
12 - Patch tests to work without interaction and behave nicely for harness
13
14 Package-Manager: Portage-2.3.24, Repoman-2.3.6
15
16 .../X11-Protocol/X11-Protocol-0.560.0-r2.ebuild | 28 ++++++++++++++++
17 .../files/X11-Protocol-0.56-test-tap.patch | 28 ++++++++++++++++
18 .../files/X11-Protocol-0.56-test-timeout.patch | 38 ++++++++++++++++++++++
19 3 files changed, 94 insertions(+)
20
21 diff --git a/dev-perl/X11-Protocol/X11-Protocol-0.560.0-r2.ebuild b/dev-perl/X11-Protocol/X11-Protocol-0.560.0-r2.ebuild
22 new file mode 100644
23 index 00000000000..c307b6d921d
24 --- /dev/null
25 +++ b/dev-perl/X11-Protocol/X11-Protocol-0.560.0-r2.ebuild
26 @@ -0,0 +1,28 @@
27 +# Copyright 1999-2018 Gentoo Foundation
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=6
31 +
32 +DIST_AUTHOR=SMCCAM
33 +DIST_VERSION=0.56
34 +DIST_EXAMPLES=("eg/*")
35 +inherit perl-module virtualx
36 +
37 +DESCRIPTION="Client-side interface to the X11 Protocol"
38 +
39 +LICENSE="${LICENSE} MIT"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
42 +IUSE=""
43 +
44 +RDEPEND="x11-libs/libXrender
45 + x11-libs/libXext"
46 +DEPEND="${RDEPEND}"
47 +
48 +PATCHES=(
49 + "${FILESDIR}/${PN}-0.56-test-timeout.patch"
50 + "${FILESDIR}/${PN}-0.56-test-tap.patch"
51 +)
52 +src_test() {
53 + virtx perl-module_src_test
54 +}
55
56 diff --git a/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-tap.patch b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-tap.patch
57 new file mode 100644
58 index 00000000000..83c07bebc37
59 --- /dev/null
60 +++ b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-tap.patch
61 @@ -0,0 +1,28 @@
62 +From 663aaa7eefbf9dcad54c8c7f4c463bf289a9b907 Mon Sep 17 00:00:00 2001
63 +From: Kent Fredric <kentnl@g.o>
64 +Date: Wed, 28 Mar 2018 23:46:13 +1300
65 +Subject: Move to a TAP::Harness friendly test layout
66 +
67 +---
68 + MANIFEST | 2 +-
69 + test.pl => t/x11.t | 0
70 + 2 files changed, 1 insertion(+), 1 deletion(-)
71 + rename test.pl => t/x11.t (100%)
72 +
73 +diff --git a/MANIFEST b/MANIFEST
74 +index 24c14b7..8648607 100644
75 +--- a/MANIFEST
76 ++++ b/MANIFEST
77 +@@ -33,4 +33,4 @@ eg/widgets2.pl X11-Motif version of widget example
78 + eg/widgets3.pl Unfinished OO-interface widget example
79 + eg/widgets.c C Xlib version of widget example
80 + eg/wintree.pl Window hierarchy utility example
81 +-test.pl Short test of Protocol.pm et al.
82 ++t/x11.t Short test of Protocol.pm et al.
83 +diff --git a/test.pl b/t/x11.t
84 +similarity index 100%
85 +rename from test.pl
86 +rename to t/x11.t
87 +--
88 +2.16.2
89 +
90
91 diff --git a/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-timeout.patch b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-timeout.patch
92 new file mode 100644
93 index 00000000000..c20ae4d73b9
94 --- /dev/null
95 +++ b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-timeout.patch
96 @@ -0,0 +1,38 @@
97 +From 00202116b49691de109c397f298c55960d2b9896 Mon Sep 17 00:00:00 2001
98 +From: Slaven Rezic <slaven@×××××.de>
99 +Date: Sat, 25 Nov 2017 09:57:00 +0100
100 +Subject: timeout tests on inactivity
101 +
102 +Bug: https://rt.cpan.org/Ticket/Display.html?id=123736
103 +---
104 + test.pl | 12 +++++++++++-
105 + 1 file changed, 11 insertions(+), 1 deletion(-)
106 +
107 +diff --git a/test.pl b/test.pl
108 +index 8436a47..209a6a6 100644
109 +--- a/test.pl
110 ++++ b/test.pl
111 +@@ -91,9 +91,19 @@ $gc = getGC($win, $font);
112 +
113 + $x->MapWindow($win);
114 +
115 ++$SIG{ALRM} = sub { die "Timeout" };
116 ++alarm(5);
117 + while (1)
118 + {
119 +- $x->handle_input until %e = $x->dequeue_event;
120 ++ eval { $x->handle_input until %e = $x->dequeue_event; };
121 ++ if ($@)
122 ++ {
123 ++ if ($@ =~ /Timeout/) {
124 ++ print "ok 3\n";
125 ++ last;
126 ++ }
127 ++ die $@;
128 ++ }
129 + if ($e{name} eq "Expose")
130 + {
131 + next unless $e{count} == 0;
132 +--
133 +2.16.2
134 +