summaryrefslogtreecommitdiff
blob: 068d6a315209ca9553e7939fe871997924d60843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DIST_AUTHOR=MLEHMANN
DIST_VERSION=7.17
inherit perl-module eutils virtualx

DESCRIPTION="Provides a uniform interface to various event loops"

SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris"

BDEPEND="
	>=virtual/perl-ExtUtils-MakeMaker-6.520.0
	dev-perl/Canary-Stability
"
PERL_RM_FILES=(
	# Requires AnyEvent::AIO form AnyEvent-AIO, not in ::gentoo
	t/12_io_ioaio.t
	# Requires Fltk from Fl, not in ::gentoo
	t/61_fltk_0{1_basic,2_signals,3_child,4_condvar,5_dns,7_io,9_multi}.t
	# Requires Cocoa::EventLoop, not in ::gentoo
	t/62_cocoa_0{1_basic,2_signals,3_child,4_condvar,5_dns,7_io,9_multi}.t
	# Requires IO::Async, not in ::gentoo
	t/66_ioasync_0{1_basic,2_signals,3_child,4_condvar,5_dns,7_io,9_multi}.t
	# Requires UV, not in ::gentoo
	t/70_uv_0{1_basic,2_signals,3_child,4_condvar,5_dns,7_io,9_multi}.t

)
pkg_postinst() {
	optfeature "improved event-loop performance" 		'>=dev-perl/EV-4.0.0'
	optfeature "improved performance of Guard objects"	'>=dev-perl/Guard-1.20.0'
	optfeature "JSON relays over AnyEvent::Handle" 		'>=dev-perl/JSON-2.90.0' '>=dev-perl/JSON-XS-2.200.0'
	optfeature "SSL support for AnyEvent::Handle" 		'>=dev-perl/Net-SSLeay-1.330.0'
	# AnyEvent::AIO
	# Async::Interrupts
}
src_test() {
	# optional:
	# - install dev-perl/glib-perl for Glib for AnyEvent::Impl::Glib
	# - install dev-perl/Event for AnyEvent::Impl::Event
	# - install dev-perl/Tk for AnyEvent::Impl::Tk
	# - install dev-perl/POE for AnyEvent::Impl::POE
	# - install dev-perl/EV for AnyEvent::Impl::EV
	if ! has "network" ${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}} ||
	   ! has_version "dev-perl/glib-perl" ||
	   ! has_version "dev-perl/Event" ||
	   ! has_version "dev-perl/Tk" ||
	   ! has_version "dev-perl/POE" ||
	   ! has_version "dev-perl/EV"; then
		ewarn "This package needs network access and manually installed dependencies"
		ewarn "for comprehensive testing. For details, see:"
		ewarn "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
	fi
	( # export leak guard
		export PERL_ANYEVENT_LOOP_TESTS=1

		if has "network" ${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}; then
			einfo "Network Tests Enabled"
			export PERL_ANYEVENT_NET_TESTS=1
		fi
		# This loop requires a display to even load the module
		if has_version dev-perl/Tk; then
			virtx perl-module_src_test
		else
			perl-module_src_test
		fi
	)
}