1 |
commit: 51e88d00c1a4a4bb2f675b85fee70e43088a6d23 |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 09:42:48 2018 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 09:52:20 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51e88d00 |
7 |
|
8 |
dev-perl/WordNet-QueryData: EAPI6 + Tests |
9 |
|
10 |
- EAPI6ify |
11 |
- Actually make it work at runtime with paths |
12 |
- Fix tests to not be madness against different wordnet datasets |
13 |
- Fix tests to be TAP::Harness friendly |
14 |
- Enable tests |
15 |
|
16 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
17 |
|
18 |
.../WordNet-QueryData-1.490.0-r2.ebuild | 22 ++++++++++ |
19 |
.../files/WordNet-QueryData-1.49-harness.patch | 31 ++++++++++++++ |
20 |
.../files/WordNet-QueryData-1.49-paths.patch | 48 ++++++++++++++++++++++ |
21 |
.../files/WordNet-QueryData-1.49-test-counts.patch | 43 +++++++++++++++++++ |
22 |
4 files changed, 144 insertions(+) |
23 |
|
24 |
diff --git a/dev-perl/WordNet-QueryData/WordNet-QueryData-1.490.0-r2.ebuild b/dev-perl/WordNet-QueryData/WordNet-QueryData-1.490.0-r2.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..c6ffadef640 |
27 |
--- /dev/null |
28 |
+++ b/dev-perl/WordNet-QueryData/WordNet-QueryData-1.490.0-r2.ebuild |
29 |
@@ -0,0 +1,22 @@ |
30 |
+# Copyright 1999-2018 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+DIST_AUTHOR=JRENNIE |
36 |
+DIST_VERSION=1.49 |
37 |
+inherit perl-module |
38 |
+ |
39 |
+DESCRIPTION="Direct perl interface to WordNet database" |
40 |
+ |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
+IUSE="" |
44 |
+ |
45 |
+DEPEND="app-dicts/wordnet" |
46 |
+RDEPEND="${DEPEND}" |
47 |
+PATCHES=( |
48 |
+ "${FILESDIR}/${PN}-1.49-paths.patch" |
49 |
+ "${FILESDIR}/${PN}-1.49-test-counts.patch" |
50 |
+ "${FILESDIR}/${PN}-1.49-harness.patch" |
51 |
+) |
52 |
|
53 |
diff --git a/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-harness.patch b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-harness.patch |
54 |
new file mode 100644 |
55 |
index 00000000000..c0e4a7ba791 |
56 |
--- /dev/null |
57 |
+++ b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-harness.patch |
58 |
@@ -0,0 +1,31 @@ |
59 |
+From a29056d2dca8cfb27750e391a95dd2f612a02a87 Mon Sep 17 00:00:00 2001 |
60 |
+From: Kent Fredric <kentnl@g.o> |
61 |
+Date: Wed, 21 Mar 2018 22:28:11 +1300 |
62 |
+Subject: Reorganize into proper test structure to make harness work |
63 |
+ |
64 |
+--- |
65 |
+ MANIFEST | 2 +- |
66 |
+ test.pl => t/wnqd.t | 0 |
67 |
+ 2 files changed, 1 insertion(+), 1 deletion(-) |
68 |
+ rename test.pl => t/wnqd.t (100%) |
69 |
+ |
70 |
+diff --git a/MANIFEST b/MANIFEST |
71 |
+index 6b05bf0..3c8aeaa 100644 |
72 |
+--- a/MANIFEST |
73 |
++++ b/MANIFEST |
74 |
+@@ -1,7 +1,7 @@ |
75 |
+ ChangeLog |
76 |
+ Makefile.PL |
77 |
+ README |
78 |
+-test.pl |
79 |
++t/wnqd.t |
80 |
+ QueryData.pm |
81 |
+ MANIFEST |
82 |
+ META.yml Module meta-data (added by MakeMaker) |
83 |
+diff --git a/test.pl b/t/wnqd.t |
84 |
+similarity index 100% |
85 |
+rename from test.pl |
86 |
+rename to t/wnqd.t |
87 |
+-- |
88 |
+2.16.2 |
89 |
+ |
90 |
|
91 |
diff --git a/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-paths.patch b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-paths.patch |
92 |
new file mode 100644 |
93 |
index 00000000000..72cb934ae01 |
94 |
--- /dev/null |
95 |
+++ b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-paths.patch |
96 |
@@ -0,0 +1,48 @@ |
97 |
+From 4efc840a9f8041c3d08de8e06d5b5386fca94e4a Mon Sep 17 00:00:00 2001 |
98 |
+From: Kent Fredric <kentnl@g.o> |
99 |
+Date: Wed, 21 Mar 2018 22:15:30 +1300 |
100 |
+Subject: Use system wordnet path instead of usr/local |
101 |
+ |
102 |
+--- |
103 |
+ Makefile.PL | 2 +- |
104 |
+ QueryData.pm | 4 ++-- |
105 |
+ 2 files changed, 3 insertions(+), 3 deletions(-) |
106 |
+ |
107 |
+diff --git a/Makefile.PL b/Makefile.PL |
108 |
+index d192f6d..1932c8f 100644 |
109 |
+--- a/Makefile.PL |
110 |
++++ b/Makefile.PL |
111 |
+@@ -5,7 +5,7 @@ use ExtUtils::MakeMaker; |
112 |
+ # $wnHomePC). These need to be synchronized. I need to import those |
113 |
+ # variables from QueryData.pm. |
114 |
+ |
115 |
+-die "*** Please set the WNHOME environment variable to the location of your\n*** WordNet installation. QueryData.pm will not work otherwise.\n*** Alternatively, you can make the installation in the default\n*** location, C:\\Program Files\\WordNet\\3.0 on Windows, or /usr/local/WordNet-3.0 on unix.\n" unless exists $ENV{WNHOME} or exists $ENV{WNSEARCHDIR} or -d "C:\\Program Files\\WordNet\\3.0" or -d "/usr/local/WordNet-3.0"; |
116 |
++die "*** Please set the WNHOME environment variable to the location of your\n*** WordNet installation. QueryData.pm will not work otherwise.\n*** Alternatively, you can make the installation in the default\n*** location, C:\\Program Files\\WordNet\\3.0 on Windows, or /usr/share/wordnet on unix.\n" unless exists $ENV{WNHOME} or exists $ENV{WNSEARCHDIR} or -d "C:\\Program Files\\WordNet\\3.0" or -d "/usr/share/wordnet"; |
117 |
+ |
118 |
+ WriteMakefile( |
119 |
+ 'dist' => { 'COMPRESS' => 'gzip', 'SUFFIX' => '.gz', }, |
120 |
+diff --git a/QueryData.pm b/QueryData.pm |
121 |
+index ee27ee6..fc6168a 100644 |
122 |
+--- a/QueryData.pm |
123 |
++++ b/QueryData.pm |
124 |
+@@ -201,7 +201,7 @@ my @excFile = ("", "noun.exc", "verb.exc", "adj.exc", "adv.exc"); |
125 |
+ my @indexFile = ("", "index.noun", "index.verb", "index.adj", "index.adv"); |
126 |
+ my @dataFile = ("", "data.noun", "data.verb", "data.adj", "data.adv"); |
127 |
+ |
128 |
+-my $wnHomeUnix = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "/usr/local/WordNet-3.0"; |
129 |
++my $wnHomeUnix = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "/usr/share/wordnet"; |
130 |
+ my $wnHomePC = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "C:\\Program Files\\WordNet\\3.0"; |
131 |
+ my $wnPrefixUnix = defined($ENV{"WNSEARCHDIR"}) ? $ENV{"WNSEARCHDIR"} : "$wnHomeUnix/dict"; |
132 |
+ my $wnPrefixPC = defined($ENV{"WNSEARCHDIR"}) ? $ENV{"WNSEARCHDIR"} : "$wnHomePC\\dict"; |
133 |
+@@ -1113,7 +1113,7 @@ QueryData knows about two environment variables, WNHOME and |
134 |
+ WNSEARCHDIR. If WNSEARCHDIR is set, QueryData looks for WordNet data |
135 |
+ files there. Otherwise, QueryData looks for WordNet data files in |
136 |
+ WNHOME/dict (WNHOME\dict on a PC). If WNHOME is not set, it defaults |
137 |
+-to "/usr/local/WordNet-3.0" on Unix and "C:\Program Files\WordNet\3.0" |
138 |
++to "/usr/share/wordnet" on Unix and "C:\Program Files\WordNet\3.0" |
139 |
+ on a PC. Normally, all you have to do is to set the WNHOME variable |
140 |
+ to the location where you unpacked your WordNet distribution. The |
141 |
+ database files are normally unpacked to the "dict" subdirectory. |
142 |
+-- |
143 |
+2.16.2 |
144 |
+ |
145 |
|
146 |
diff --git a/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-test-counts.patch b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-test-counts.patch |
147 |
new file mode 100644 |
148 |
index 00000000000..e06c872e012 |
149 |
--- /dev/null |
150 |
+++ b/dev-perl/WordNet-QueryData/files/WordNet-QueryData-1.49-test-counts.patch |
151 |
@@ -0,0 +1,43 @@ |
152 |
+From fe7f10589ee4da4a834e1f6355bb203de644920e Mon Sep 17 00:00:00 2001 |
153 |
+From: Kent Fredric <kentnl@g.o> |
154 |
+Date: Wed, 21 Mar 2018 22:24:09 +1300 |
155 |
+Subject: Remove tests dependent on specific counts of dictionary terms |
156 |
+ |
157 |
+This was never going to be portable against newer wordnet data releases |
158 |
+--- |
159 |
+ test.pl | 10 +++------- |
160 |
+ 1 file changed, 3 insertions(+), 7 deletions(-) |
161 |
+ |
162 |
+diff --git a/test.pl b/test.pl |
163 |
+index 537aa7b..386c66c 100644 |
164 |
+--- a/test.pl |
165 |
++++ b/test.pl |
166 |
+@@ -5,7 +5,8 @@ |
167 |
+ # $Id: test.pl,v 1.40 2007/05/07 01:08:31 jrennie Exp $ |
168 |
+ |
169 |
+ my $i = 1; |
170 |
+-BEGIN { |
171 |
++BEGIN { |
172 |
++ print "1..103\n"; |
173 |
+ $| = 1; |
174 |
+ } |
175 |
+ END { print "not ok 1\n" unless $loaded; } |
176 |
+@@ -162,14 +163,9 @@ $foo[1] == 2 |
177 |
+ ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
178 |
+ ($wn->querySense('acropetal#a#1', 'dmnc'))[0] eq 'botany#n#2' |
179 |
+ ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
180 |
+-scalar $wn->offset("0#n#1") == 13742358 |
181 |
+- ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
182 |
+ |
183 |
+-scalar $wn->listAllWords("noun") == 117798 |
184 |
+- ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
185 |
+-$wn->offset("child#n#1") == 9917593 |
186 |
+- ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
187 |
+ my ($foo) = $wn->querySense ("cat#n#1", "glos"); |
188 |
+ ($foo eq "feline mammal usually having thick soft fur and no ability to roar: domestic cats; wildcats ") ? print "ok ", $i++, "\n" : print "not ok ", $i++, "\n"; |
189 |
+ |
190 |
+ } |
191 |
++print "0..$i\n"; |
192 |
+-- |
193 |
+2.16.2 |
194 |
+ |