summaryrefslogtreecommitdiff
path: root/dev-perl/Coro/files/6.514.0-ev-config.patch
blob: 7b775b557eda8c0b8339a36c3deb3105f0e96cb5 (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
72
73
74
From bada194851e0a6839f78e811bfc63c2d5e8877dc Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentnl@gentoo.org>
Date: Thu, 5 Oct 2017 22:02:38 +1300
Subject: Make EV/Event not auto-compiled, but rely on configuration

---
 Makefile.PL | 51 ++++++++++-----------------------------------------
 1 file changed, 10 insertions(+), 41 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index e58e210..25243ff 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -17,47 +17,16 @@ EOF
 
 print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n";
 
-if (eval { require Event }) {
-   if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) {
-      print <<EOF
-
-***
-*** WARNING: Event version $Event::VERSION found, NOT building Event support.
-***
-*** This version of Event is broken. The only currently known non-broken
-*** versions of Event are 0.87 and 0.89+. Please install one of those
-*** versions.
-***
-
-EOF
-   } else {
-      $EVENT = 1;
-      $DEFINE .= " -DHAVE_EVENT=1";
-      print "\nEvent version $Event::VERSION found, building Event support.\n\n";
-   }
-} else {
-   print "\n*** Event not found, not building Event support.\n\n";
-}
-
-if (eval { require EV }) {
-   if ($EV::VERSION < 4.0) {
-      print <<EOF
-
-***
-*** WARNING: EV version $EV::VERSION found, NOT building EV support.
-***
-*** This version is ABI-incompatible with Coro, please upgrade to at least 4.0.
-***
-
-EOF
-   } else {
-      $EV = 1;
-      $DEFINE .= " -DHAVE_EV=1";
-      print "\nEV version $EV::VERSION found, building EV support.\n\n";
-   }
-} else {
-   print "\n*** EV not found, not building EV support.\n\n";
-}
+$EVENT = ( $ENV{GENTOO_OPTS} =~ /\bEvent\b/ );
+$EV    = ( $ENV{GENTOO_OPTS} =~ /\bEV\b/ );
+$EVENT and do {
+  require Event;
+  Event->VERSION(0.89);
+};
+$EV and do {
+  require EV;
+  EV->VERSION(4.0);
+};
 
 WriteMakefile(
     dist         => {
-- 
2.14.1