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/CGI-FormBuilder/, dev-perl/CGI-FormBuilder/files/
Date: Sat, 09 Jul 2016 12:57:55
Message-Id: 1468069034.e01367fa6ba7e5418ec7c58ff64c68c0ee65c7d2.kentnl@gentoo
1 commit: e01367fa6ba7e5418ec7c58ff64c68c0ee65c7d2
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 9 12:56:23 2016 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 9 12:57:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e01367fa
7
8 dev-perl/CGI-FormBuilder: Fix tests failing after perl 5.18
9
10 Certian tests relied on implict hash ordering to be predictable.
11
12 This patches those tests to make the data ordered to be predictable.
13
14 Bug: https://rt.cpan.org/Ticket/Display.html?id=81650
15
16 Package-Manager: portage-2.3.0
17 RepoMan-Options: --include-arches="alpha amd64 amd64-fbsd arm arm64 hppa ia64 m68k mips nios2 ppc ppc64 riscv s390 sh sparc sparc-fbsd x86 x86-fbsd"
18
19 .../CGI-FormBuilder/CGI-FormBuilder-3.90.0.ebuild | 5 +-
20 .../files/CGI-FormBuilder-3.90.0-rt81650.patch | 155 +++++++++++++++++++++
21 2 files changed, 159 insertions(+), 1 deletion(-)
22
23 diff --git a/dev-perl/CGI-FormBuilder/CGI-FormBuilder-3.90.0.ebuild b/dev-perl/CGI-FormBuilder/CGI-FormBuilder-3.90.0.ebuild
24 index 0bb4577..1baac2a 100644
25 --- a/dev-perl/CGI-FormBuilder/CGI-FormBuilder-3.90.0.ebuild
26 +++ b/dev-perl/CGI-FormBuilder/CGI-FormBuilder-3.90.0.ebuild
27 @@ -1,4 +1,4 @@
28 -# Copyright 1999-2015 Gentoo Foundation
29 +# Copyright 1999-2016 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 # $Id$
32
33 @@ -16,6 +16,9 @@ SLOT="0"
34 KEYWORDS="~amd64 ~x86"
35 IUSE=""
36
37 +PATCHES=(
38 + "${FILESDIR}/${P}-rt81650.patch"
39 +)
40 # Templates that can be used - but they are optional
41 # >=dev-perl/HTML-Template-2.60.0
42 # >=dev-perl/text-template-1.430.0
43
44 diff --git a/dev-perl/CGI-FormBuilder/files/CGI-FormBuilder-3.90.0-rt81650.patch b/dev-perl/CGI-FormBuilder/files/CGI-FormBuilder-3.90.0-rt81650.patch
45 new file mode 100644
46 index 0000000..08c4f98
47 --- /dev/null
48 +++ b/dev-perl/CGI-FormBuilder/files/CGI-FormBuilder-3.90.0-rt81650.patch
49 @@ -0,0 +1,155 @@
50 +diff -Naur CGI-FormBuilder-3.09/t/1c-validate.t CGI-FormBuilder-3.09b/t/1c-validate.t
51 +--- CGI-FormBuilder-3.09/t/1c-validate.t 2013-11-30 00:10:36.000000000 +0000
52 ++++ CGI-FormBuilder-3.09b/t/1c-validate.t 2016-05-11 13:10:45.680369595 +0000
53 +@@ -174,11 +174,11 @@
54 + for my $t (@test) {
55 +
56 + my $form = CGI::FormBuilder->new( %{ $t->{opt} }, debug => $DEBUG );
57 +- while(my($f,$o) = each %{$t->{mod} || {}}) {
58 +- $o->{name} = $f;
59 +- $form->field(%$o);
60 ++ for my $field ( sort keys %{ $t->{mod} || {} } ) {
61 ++ my $object = $t->{mod}->{$field};
62 ++ $object->{name} = $field;
63 ++ $form->field( %{ $object } );
64 + }
65 +-
66 + # just try to validate
67 + ok($form->validate, $t->{pass} || 0);
68 + }
69 +diff -Naur CGI-FormBuilder-3.09/t/1d-messages.t CGI-FormBuilder-3.09b/t/1d-messages.t
70 +--- CGI-FormBuilder-3.09/t/1d-messages.t 2013-11-30 00:10:36.000000000 +0000
71 ++++ CGI-FormBuilder-3.09b/t/1d-messages.t 2016-05-11 13:08:33.159540213 +0000
72 +@@ -70,8 +70,9 @@
73 + my $locale = "fb_FAKE";
74 + my $messages = "messages.$locale";
75 + open(M, ">$messages") || warn "Can't write $messages: $!";
76 +-while (my($k,$v) = each %messages) {
77 +- print M join(' ', $k, ref($v) ? @$v : $v), "\n";
78 ++for my $k ( sort keys %messages ) {
79 ++ my $v = $messages{$k};
80 ++ print M join(' ', $k, ref($v) ? @$v : $v), "\n";
81 + }
82 + close(M);
83 +
84 +@@ -123,7 +124,7 @@
85 + # Final test set is to just make sure we have all the keys for all modules
86 + require CGI::FormBuilder::Messages::default;
87 + my %need = CGI::FormBuilder::Messages::default->messages;
88 +-my @keys = keys %need;
89 ++my @keys = sort keys %need;
90 + for my $pm (@pm) {
91 + my($lang) = $pm =~ /([a-z]+_[A-Z]+)/;
92 + my $skip = $lang ? undef : "skip: Can't get language from $pm";
93 +diff -Naur CGI-FormBuilder-3.09/t/2a-template-html.t CGI-FormBuilder-3.09b/t/2a-template-html.t
94 +--- CGI-FormBuilder-3.09/t/2a-template-html.t 2013-11-30 00:10:36.000000000 +0000
95 ++++ CGI-FormBuilder-3.09b/t/2a-template-html.t 2016-05-11 13:11:57.438740284 +0000
96 +@@ -102,18 +102,19 @@
97 + my $seq = $ARGV[0] || 1;
98 +
99 + # Cycle thru and try it out
100 +-for (@test) {
101 ++for my $test_item (@test) {
102 + my $form = CGI::FormBuilder->new(
103 + debug => $DEBUG,
104 + action => 'TEST',
105 + title => 'TEST',
106 +- %{ $_->{opt} },
107 ++ %{ $test_item->{opt} },
108 + );
109 +
110 + # the ${mod} key twiddles fields
111 +- while(my($f,$o) = each %{$_->{mod} || {}}) {
112 +- $o->{name} = $f;
113 +- $form->field(%$o);
114 ++ for my $field ( sort keys %{ $test_item->{mod} || {} } ) {
115 ++ my $object = $test_item->{mod}->{$field};
116 ++ $object->{name} = $field;
117 ++ $form->field( %{ $object } );
118 + }
119 +
120 + #
121 +diff -Naur CGI-FormBuilder-3.09/t/2b-template-text.t CGI-FormBuilder-3.09b/t/2b-template-text.t
122 +--- CGI-FormBuilder-3.09/t/2b-template-text.t 2013-11-30 00:10:36.000000000 +0000
123 ++++ CGI-FormBuilder-3.09b/t/2b-template-text.t 2016-05-11 13:11:29.861982062 +0000
124 +@@ -97,18 +97,19 @@
125 + my $seq = $ARGV[0] || 1;
126 +
127 + # Cycle thru and try it out
128 +-for (@test) {
129 ++for my $test_item (@test) {
130 + my $form = CGI::FormBuilder->new(
131 + debug => $DEBUG,
132 + action => 'TEST',
133 + title => 'TEST',
134 +- %{ $_->{opt} },
135 ++ %{ $test_item->{opt} },
136 + );
137 +
138 + # the ${mod} key twiddles fields
139 +- while(my($f,$o) = each %{$_->{mod} || {}}) {
140 +- $o->{name} = $f;
141 +- $form->field(%$o);
142 ++ for my $field ( sort keys %{ $test_item->{mod} || {} } ) {
143 ++ my $object = $test_item->{mod}->{$field};
144 ++ $object->{name} = $field;
145 ++ $form->field( %{ $object } );
146 + }
147 +
148 + #
149 +diff -Naur CGI-FormBuilder-3.09/t/2d-template-fast.t CGI-FormBuilder-3.09b/t/2d-template-fast.t
150 +--- CGI-FormBuilder-3.09/t/2d-template-fast.t 2013-11-30 00:10:36.000000000 +0000
151 ++++ CGI-FormBuilder-3.09b/t/2d-template-fast.t 2016-05-11 13:15:58.497630259 +0000
152 +@@ -135,18 +135,19 @@
153 + my $seq = $ARGV[0] || 1;
154 +
155 + # Cycle thru and try it out
156 +-for (@test) {
157 ++for my $test_item (@test) {
158 + my $form = CGI::FormBuilder->new(
159 + debug => $DEBUG,
160 + action => 'TEST',
161 + title => 'TEST',
162 +- %{ $_->{opt} },
163 ++ %{ $test_item->{opt} },
164 + );
165 +
166 + # the ${mod} key twiddles fields
167 +- while(my($f,$o) = each %{$_->{mod} || {}}) {
168 +- $o->{name} = $f;
169 +- $form->field(%$o);
170 ++ for my $field ( sort keys %{ $test_item->{mod} || {} } ) {
171 ++ my $object = $test_item->{mod}->{$field};
172 ++ $object->{name} = $field;
173 ++ $form->field( %{ $object } );
174 + }
175 +
176 + #
177 +diff -Naur CGI-FormBuilder-3.09/t/2e-template-ssi.t CGI-FormBuilder-3.09b/t/2e-template-ssi.t
178 +--- CGI-FormBuilder-3.09/t/2e-template-ssi.t 2013-11-30 00:10:36.000000000 +0000
179 ++++ CGI-FormBuilder-3.09b/t/2e-template-ssi.t 2016-05-11 13:12:37.526388964 +0000
180 +@@ -102,18 +102,19 @@
181 + my $seq = $ARGV[0] || 1;
182 +
183 + # Cycle thru and try it out
184 +-for (@test) {
185 ++for my $test_item (@test) {
186 + my $form = CGI::FormBuilder->new(
187 + debug => $DEBUG,
188 + action => 'TEST',
189 + title => 'TEST',
190 +- %{ $_->{opt} },
191 ++ %{ $test_item->{opt} },
192 + );
193 +
194 + # the ${mod} key twiddles fields
195 +- while(my($f,$o) = each %{$_->{mod} || {}}) {
196 +- $o->{name} = $f;
197 +- $form->field(%$o);
198 ++ for my $field ( sort keys %{ $test_item->{mod} || {} } ) {
199 ++ my $object = $test_item->{mod}->{$field};
200 ++ $object->{name} = $field;
201 ++ $form->field( %{ $object } );
202 + }
203 +
204 + #