summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentnl@gentoo.org>2018-03-29 00:03:28 +1300
committerKent Fredric <kentnl@gentoo.org>2018-03-29 00:04:08 +1300
commit1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7 (patch)
tree47f0f35dbe4297bbcd299bba91341e6eb828fad1 /dev-perl/X11-Protocol
parentdev-perl/X-Osd: EAPI6 + tests (diff)
downloadgentoo-1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7.tar.gz
gentoo-1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7.tar.bz2
gentoo-1ade029f4e18dfa0b6d49fce0786ad4e95d3e8b7.zip
dev-perl/X11-Protocol: EAPI6 + tests
- EAPI6ify - Enable tests (w/ virtualx) - Patch tests to work without interaction and behave nicely for harness Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-perl/X11-Protocol')
-rw-r--r--dev-perl/X11-Protocol/X11-Protocol-0.560.0-r2.ebuild28
-rw-r--r--dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-tap.patch28
-rw-r--r--dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-timeout.patch38
3 files changed, 94 insertions, 0 deletions
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
new file mode 100644
index 000000000000..c307b6d921d4
--- /dev/null
+++ b/dev-perl/X11-Protocol/X11-Protocol-0.560.0-r2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=SMCCAM
+DIST_VERSION=0.56
+DIST_EXAMPLES=("eg/*")
+inherit perl-module virtualx
+
+DESCRIPTION="Client-side interface to the X11 Protocol"
+
+LICENSE="${LICENSE} MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="x11-libs/libXrender
+ x11-libs/libXext"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.56-test-timeout.patch"
+ "${FILESDIR}/${PN}-0.56-test-tap.patch"
+)
+src_test() {
+ virtx perl-module_src_test
+}
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
new file mode 100644
index 000000000000..83c07bebc37a
--- /dev/null
+++ b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-tap.patch
@@ -0,0 +1,28 @@
+From 663aaa7eefbf9dcad54c8c7f4c463bf289a9b907 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 28 Mar 2018 23:46:13 +1300
+Subject: Move to a TAP::Harness friendly test layout
+
+---
+ MANIFEST | 2 +-
+ test.pl => t/x11.t | 0
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+ rename test.pl => t/x11.t (100%)
+
+diff --git a/MANIFEST b/MANIFEST
+index 24c14b7..8648607 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -33,4 +33,4 @@ eg/widgets2.pl X11-Motif version of widget example
+ eg/widgets3.pl Unfinished OO-interface widget example
+ eg/widgets.c C Xlib version of widget example
+ eg/wintree.pl Window hierarchy utility example
+-test.pl Short test of Protocol.pm et al.
++t/x11.t Short test of Protocol.pm et al.
+diff --git a/test.pl b/t/x11.t
+similarity index 100%
+rename from test.pl
+rename to t/x11.t
+--
+2.16.2
+
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
new file mode 100644
index 000000000000..c20ae4d73b91
--- /dev/null
+++ b/dev-perl/X11-Protocol/files/X11-Protocol-0.56-test-timeout.patch
@@ -0,0 +1,38 @@
+From 00202116b49691de109c397f298c55960d2b9896 Mon Sep 17 00:00:00 2001
+From: Slaven Rezic <slaven@rezic.de>
+Date: Sat, 25 Nov 2017 09:57:00 +0100
+Subject: timeout tests on inactivity
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123736
+---
+ test.pl | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/test.pl b/test.pl
+index 8436a47..209a6a6 100644
+--- a/test.pl
++++ b/test.pl
+@@ -91,9 +91,19 @@ $gc = getGC($win, $font);
+
+ $x->MapWindow($win);
+
++$SIG{ALRM} = sub { die "Timeout" };
++alarm(5);
+ while (1)
+ {
+- $x->handle_input until %e = $x->dequeue_event;
++ eval { $x->handle_input until %e = $x->dequeue_event; };
++ if ($@)
++ {
++ if ($@ =~ /Timeout/) {
++ print "ok 3\n";
++ last;
++ }
++ die $@;
++ }
+ if ($e{name} eq "Expose")
+ {
+ next unless $e{count} == 0;
+--
+2.16.2
+