Gentoo Archives: gentoo-commits

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/perl-overlay:master commit in: dev-perl/CGI-Application-Dispatch/
Date: Wed, 29 Apr 2015 18:02:13
Message-Id: 1430324630.c43eed8679ce98131b983607e5da2d4d03fd0193.kent@gentoo
1 commit: c43eed8679ce98131b983607e5da2d4d03fd0193
2 Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
3 AuthorDate: Wed Apr 29 16:23:10 2015 +0000
4 Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
5 CommitDate: Wed Apr 29 16:23:50 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=c43eed86
7
8 [fixup] CGI-Application-Dispatch: EAPI5, Fixup deps, make depending on apache for testing optional
9
10 Package-Manager: portage-2.2.17
11
12 .../CGI-Application-Dispatch-3.120.0-r1.ebuild | 53 ++++++++++++++++
13 .../CGI-Application-Dispatch-3.120.0.ebuild | 74 ----------------------
14 dev-perl/CGI-Application-Dispatch/metadata.xml | 5 +-
15 3 files changed, 57 insertions(+), 75 deletions(-)
16
17 diff --git a/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0-r1.ebuild b/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0-r1.ebuild
18 new file mode 100644
19 index 0000000..19ee4bf
20 --- /dev/null
21 +++ b/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0-r1.ebuild
22 @@ -0,0 +1,53 @@
23 +# Copyright 1999-2015 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Header: $
26 +EAPI=5
27 +MODULE_AUTHOR=MARKSTOS
28 +MODULE_VERSION=3.12
29 +inherit perl-module
30 +
31 +DESCRIPTION='Dispatch requests to CGI::Application based objects'
32 +SLOT="0"
33 +KEYWORDS="~amd64 ~x86"
34 +IUSE="test apache_test"
35 +
36 +# Test::More -> Test-Simple
37 +TEST_DEPEND_APACHE="dev-perl/Apache-Test"
38 +RDEPEND="
39 + >=virtual/perl-version-0.820.0
40 + >=dev-perl/CGI-Application-4.500.0
41 + dev-perl/HTTP-Exception
42 + >=dev-perl/Exception-Class-1.200.0
43 + dev-perl/Try-Tiny
44 +"
45 +DEPEND="${RDEPEND}
46 + >=virtual/perl-Module-Build-0.380.0
47 + test? (
48 + apache_test? (
49 + ${TEST_DEPEND_APACHE}
50 + )
51 + dev-perl/CGI-PSGI
52 + virtual/perl-Test-Simple
53 + dev-perl/Test-LongString
54 + >=dev-perl/Plack-0.995.600
55 + )
56 +"
57 +apache_env() {
58 + # This jiggerypokery appears to be required if Apache::Test
59 + # is present. If it is not present or not use test? then we're ok,
60 + # but otherwise, we need to specify where apache is, or it will
61 + # for some reason, get stuck in a death loop and fill your log file
62 + # and your hard drive. JOY! http://gist.github.com/447135
63 + APACHE_TEST_HTTPD=/usr/sbin/apache2
64 + export APACHE_TEST_HTTPD
65 +}
66 +src_prepare() {
67 + if ! use apache_test || ! use test; then
68 + PERL_RM_FILES=( "t/handler.t" )
69 + fi
70 + perl-module_src_prepare
71 +}
72 +src_test() {
73 + use apache_test && apache_env;
74 + perl-module_src_test;
75 +}
76
77 diff --git a/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0.ebuild b/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0.ebuild
78 deleted file mode 100644
79 index 12ee796..0000000
80 --- a/dev-perl/CGI-Application-Dispatch/CGI-Application-Dispatch-3.120.0.ebuild
81 +++ /dev/null
82 @@ -1,74 +0,0 @@
83 -# Copyright 1999-2012 Gentoo Foundation
84 -# Distributed under the terms of the GNU General Public License v2
85 -# $Header: $
86 -EAPI=4
87 -MODULE_AUTHOR=MARKSTOS
88 -MODULE_VERSION=3.12
89 -inherit perl-module
90 -
91 -DESCRIPTION='Dispatch requests to CGI::Application based objects'
92 -LICENSE=" || ( Artistic GPL-2 )"
93 -SLOT="0"
94 -KEYWORDS="~amd64 ~x86"
95 -IUSE="test"
96 -apache_test_deps() {
97 - echo "dev-perl/Apache-Test"
98 -}
99 -apache_test_code() {
100 - # This jiggerypokery appears to be required if Apache::Test
101 - # is present. If it is not present or not use test? then we're ok,
102 - # but otherwise, we need to specify where apache is, or it will
103 - # for some reason, get stuck in a death loop and fill your log file
104 - # and your hard drive. JOY! http://gist.github.com/447135
105 -
106 - # NB. Because I have no way of conditionally triggering this code
107 - # whether or not Apache-Test is installed ( like the code does )
108 - # I have test-depped on it basically forcing a known circuit.
109 -
110 - APACHE_TEST_HTTPD=/usr/sbin/apache2
111 - export APACHE_TEST_HTTPD
112 - perl-module_src_test
113 -}
114 -perl_meta_configure() {
115 - # Module::Build 0.38 ( 0.380.0 )
116 - echo \>=virtual/perl-Module-Build-0.380.0
117 -
118 -}
119 -perl_meta_build() {
120 - # CGI::PSGI
121 - echo dev-perl/CGI-PSGI
122 - # Plack 0.9956 ( 0.995.600 )
123 - echo \>=dev-perl/Plack-0.995.600
124 - # Test::LongString
125 - echo dev-perl/Test-LongString
126 - # Test::More
127 - echo virtual/perl-Test-Simple
128 -}
129 -perl_meta_runtime() {
130 - # CGI::Application 4.50 ( 4.500.0 )
131 - echo \>=dev-perl/CGI-Application-4.500.0
132 - # Exception::Class 1.2 ( 1.200.0 )
133 - echo \>=dev-perl/Exception-Class-1.200.0
134 - # HTTP::Exception
135 - echo dev-perl/HTTP-Exception
136 - # Try::Tiny
137 - echo dev-perl/Try-Tiny
138 - # perl v5.6.0 ( 5.6.0 )
139 - echo \>=dev-lang/perl-5.6.0
140 - # version 0.82 ( 0.820.0 )
141 - echo \>=virtual/perl-version-0.820.0
142 -}
143 -DEPEND="
144 - $(perl_meta_configure)
145 - $(perl_meta_build)
146 - $(perl_meta_runtime)
147 -"
148 -RDEPEND="
149 - $(perl_meta_runtime)
150 -"
151 -SRC_TEST="do"
152 -
153 -DEPEND="${DEPEND} test? ( $(apache_test_deps) )"
154 -src_test() {
155 - apache_test_code;
156 -}
157
158 diff --git a/dev-perl/CGI-Application-Dispatch/metadata.xml b/dev-perl/CGI-Application-Dispatch/metadata.xml
159 index 748bae6..ce4526d 100644
160 --- a/dev-perl/CGI-Application-Dispatch/metadata.xml
161 +++ b/dev-perl/CGI-Application-Dispatch/metadata.xml
162 @@ -11,5 +11,8 @@
163 <remote-id type="cpan-module">CGI::Application::Dispatch</remote-id>
164 <remote-id type="cpan-module">CGI::Application::Dispatch::PSGI</remote-id>
165 <remote-id type="cpan-module">CGI::Application::Dispatch::Regexp</remote-id>
166 - </upstream>
167 + </upstream>
168 + <use>
169 + <flag name="apache_test">With FEATURES=test, do tests using Apache</flag>
170 + </use>
171 </pkgmetadata>