summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/sgmlspl/files/combined.patch457
-rw-r--r--meta/recipes-devtools/sgmlspl/sgmlspl-native_1.03ii.bb17
2 files changed, 474 insertions, 0 deletions
diff --git a/meta/recipes-devtools/sgmlspl/files/combined.patch b/meta/recipes-devtools/sgmlspl/files/combined.patch
new file mode 100644
index 0000000000..31536f53e6
--- /dev/null
+++ b/meta/recipes-devtools/sgmlspl/files/combined.patch
@@ -0,0 +1,457 @@
1Patch obtained from OpenEmbedded.
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4--- libsgmls-perl-1.03ii.orig/Makefile
5+++ libsgmls-perl-1.03ii/Makefile
6@@ -94,5 +94,5 @@
7 mv /tmp/${DIST} SGMLSpm
8
9 clean:
10- cd DOC; make clean
11+ #cd DOC; make clean
12 rm -f *~ core *.tar *.tar.gz
13--- libsgmls-perl-1.03ii.orig/Makefile.PL
14+++ libsgmls-perl-1.03ii/Makefile.PL
15@@ -0,0 +1,17 @@
16+use ExtUtils::MakeMaker;
17+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
18+# the contents of the Makefile that is written.
19+WriteMakefile(
20+ 'NAME' => 'SGMLS',
21+ 'VERSION' => '1.03ii',
22+ 'PM' => { 'SGMLS.pm' => '$(INST_LIBDIR)/SGMLS.pm',
23+ 'Output.pm' => '$(INST_LIBDIR)/SGMLS/Output.pm',
24+ 'Refs.pm' => '$(INST_LIBDIR)/SGMLS/Refs.pm',
25+ 'skel.pl' => '$(INST_LIBDIR)/sgmlspl-specs/skel.pl',
26+ },
27+ 'MAN3PODS'=> { 'SGMLS.pm' => '$(INST_MAN3DIR)/SGMLS.3pm',
28+ 'Output.pm' => '$(INST_MAN3DIR)/SGMLS::Output.3pm',
29+ 'Refs.pm' => '$(INST_MAN3DIR)/SGMLS::Refs.3pm',
30+ },
31+ 'EXE_FILES' => [ 'sgmlspl', ],
32+);
33--- libsgmls-perl-1.03ii.orig/Output.pm
34+++ libsgmls-perl-1.03ii/Output.pm
35@@ -5,7 +5,7 @@
36 @ISA = Exporter;
37 @EXPORT = qw(output push_output pop_output);
38
39-$version = '$Id: Output.pm,v 1.6 1995/12/05 12:21:51 david Exp $';
40+$version = '$Id: Output.pm,v 1.1 1999/10/26 19:30:45 ardo Exp $';
41
42 =head1 NAME
43
44--- libsgmls-perl-1.03ii.orig/Refs.pm
45+++ libsgmls-perl-1.03ii/Refs.pm
46@@ -2,11 +2,11 @@
47
48 use Carp;
49
50-$version = '$Id: Refs.pm,v 1.5 1995/12/03 21:28:36 david Exp $';
51+$version = '$Id: Refs.pm,v 1.1 1999/10/26 19:30:45 ardo Exp $';
52
53 =head1 NAME
54
55-SGMLS::Refs
56+SGMLS::Refs - Forward refeence handling
57
58 =head1 SYNOPSIS
59
60--- libsgmls-perl-1.03ii.orig/sgmlspl.1
61+++ libsgmls-perl-1.03ii/sgmlspl.1
62@@ -0,0 +1,47 @@
63+.\" -*- nroff -*-
64+.\" ----------------------------------------------------------------------
65+.TH SGMLSPL 1 "October 26, 1999" "SGMLSPL" "SGMLSPL"
66+.\"
67+.\" ----------------------------------------------------------------------
68+.SH "NAME"
69+sgmlspl \- a simple post-processor for nsgmls
70+.\"
71+.\" ----------------------------------------------------------------------
72+.SH "SYNOPSIS"
73+.B sgmlspl
74+.I "spec file"
75+.\"
76+.\" ----------------------------------------------------------------------
77+.SH "DESCRIPTION"
78+sgmlspl is a sample application to convert SGML documents to other
79+formats by providing a specification file detailing exactly how to
80+handle each element, external data entity, subdocument entity, CDATA
81+string, record end, SDATA string, and processing instruction.
82+
83+To use sgmlspl, prepare a specification file containing regular perl5
84+code. If the SGML document were named doc.sgml, the sgmlspl
85+specification file were named, spec.pl, and the name of the new file
86+were doc.latex, then use the following command in a Unix shell to
87+convert the SGML document:
88+
89+nsgmls doc.sgml | sgmlspl spec.pl > doc.latex
90+
91+sgmlspl will pass any additional arguments on to the specification
92+file, which can then process them in the regular perl5 fashion.
93+.\"
94+.\" ----------------------------------------------------------------------
95+.SH "SEE ALSO"
96+.TP
97+.BR /usr/share/doc/sgmls-doc/sgmlspl/sgmlspl.html
98+sgmlspl documentation in HTML format
99+.TP
100+.BR /usr/share/doc/sgmls-doc/SGMLSpm/sgmls.html
101+SGMLS documentation in HTML format
102+.TP
103+.BR nsgmls (1)
104+.\"
105+.\" ----------------------------------------------------------------------
106+.SH "AUTHOR"
107+Ardo van Rangelrooij <ardo@debian.org>
108+.\"
109+.\" ----------------------------------------------------------------------
110--- libsgmls-perl-1.03ii.orig/sgmlspl
111+++ libsgmls-perl-1.03ii/sgmlspl
112@@ -0,0 +1,323 @@
113+#!/usr/bin/perl
114+########################################################################
115+# sgmlspl: a simple SGML postprocesser for the SGMLS and NSGMLS
116+# parsers (requires SGMLS.pm library).
117+#
118+# Copyright (c) 1995 by David Megginson <dmeggins@aix1.uottawa.ca>
119+#
120+# This program is free software; you can redistribute it and/or modify
121+# it under the terms of the GNU General Public License as published by
122+# the Free Software Foundation; either version 2 of the License, or
123+# (at your option) any later version.
124+#
125+# This program is distributed in the hope that it will be useful,
126+# but WITHOUT ANY WARRANTY; without even the implied warranty of
127+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128+# GNU General Public License for more details.
129+#
130+# You should have received a copy of the GNU General Public License
131+# along with this program; if not, write to the Free Software
132+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
133+#
134+# $Log: sgmlspl,v $
135+# Revision 1.1 2004/02/23 01:23:07 ardo
136+# Added debian changes for version 1.03ii-27.
137+#
138+# Revision 1.1 2001/04/15 14:42:01 ardo
139+# *** empty log message ***
140+#
141+# Revision 1.8 1995/12/03 21:46:31 david
142+# Eliminated all use of the SGMLS_Event::key method.
143+#
144+# Revision 1.7 1995/11/15 20:22:24 david
145+# Changed "use Output" to "use SGMLS::Output". Qualified the STDIN
146+# filehandle for the SGMLS object with the main:: package name.
147+#
148+# Revision 1.6 1995/08/12 16:15:14 david
149+# Revised version for 1.01 distribution.
150+#
151+# Revision 1.5 1995/04/27 11:52:25 david
152+# Changed 'print' to 'main::output' for re handler; empty string
153+# translates into an empty sub {} rather than a sub printing an empty
154+# string; instead of evaluating every argument as a perl script, take
155+# only the first as a perl script and the rest as its arguments; allow
156+# empty scripts or scripts which do not end with '1;'; pass the event
157+# itself as the second argument to each handler, after the event data.
158+#
159+# Revision 1.4 1995/04/23 14:44:58 david
160+# Use the Output package. Fixed the $version variable.
161+#
162+# Revision 1.3 1995/04/22 21:02:49 david
163+# Added some missing 'last SWITCH;' statements in the sgmls function.
164+#
165+# Revision 1.2 1995/04/22 20:58:48 david
166+# Added $SGMLS_PL::version variable and changed SDATA notation from
167+# [SDATA] to |SDATA|.
168+#
169+# Revision 1.1 1995/04/22 14:40:50 david
170+# Initial revision
171+#
172+########################################################################
173+
174+use SGMLS::Output;
175+
176+package SGMLS_PL;
177+use SGMLS;
178+
179+$version = '$Id: sgmlspl,v 1.1 2004/02/23 01:23:07 ardo Exp $';
180+
181+#
182+# Set up handler defaults.
183+#
184+$start_document_handler = sub {};
185+$end_document_handler = sub {};
186+$start_element_handlers = { '' => sub {} };
187+$end_element_handlers = { '' => sub {} };
188+$cdata_handler = sub { main::output($_[0]); };
189+$sdata_handlers = { '' => sub { main::output($_[0]);} };
190+$re_handler = sub { main::output("\n"); };
191+$pi_handler = sub { '' => sub {} };
192+$entity_handlers = { '' => sub {} };
193+$start_subdoc_handlers = { '' => sub {} };
194+$end_subdoc_handlers = { '' => sub {} };
195+$conforming_handler = sub {};
196+
197+#
198+# Main access point: declare handlers for different SGML events.
199+#
200+# Usage: sgml(event, handler);
201+#
202+# The event may be one of the following strings, or a special pattern.
203+# The generic events are as follow:
204+#
205+# 'start' The beginning of the document.
206+# 'end' The end of the document.
207+# 'start_element' The beginning of an element.
208+# 'end_element' The end of an element.
209+# 'cdata' Regular character data.
210+# 'sdata' Special system-specific data.
211+# 're' A record-end.
212+# 'pi' A processing instruction.
213+# 'entity' An external-entity reference.
214+# 'start_subdoc' The beginning of a subdocument entity.
215+# 'end_subdoc' The end of a subdocument entity.
216+# 'conforming' The document is conforming.
217+#
218+# In addition to these generic events, it is possible to handlers
219+# for certain specific, named events, as follow:
220+#
221+# '<GI>' The beginning of element GI.
222+# '</GI>' The end of element GI.
223+# '[SDATA]' The system-specific data SDATA.
224+# '&ENAME;' A reference to the external entity ENAME.
225+# '{ENAME}' The beginning of the subdocument-entity ENAME.
226+# '{/ENAME}' The end of the subdocument-entity ENAME.
227+#
228+#
229+# The handler may be a string, which will simply be printed when the
230+# event occurs (this is usually useful only for the specific, named
231+# events), or a reference to an anonymous subroutine, which will
232+# receive two arguments: the event data and the event itself. For
233+# example,
234+#
235+# sgml('<FOO>', "\n\\begin{foo}\n");
236+#
237+# and
238+#
239+# sgml('<FOO>', sub { output("\n\\begin{foo}\n"); });
240+#
241+# will have identical results.
242+#
243+sub main::sgml {
244+ my ($spec,$handler) = (@_);
245+ if (ref($handler) ne 'CODE') {
246+ $handler =~ s/\\/\\\\/g;
247+ $handler =~ s/'/\\'/g;
248+ if ($handler eq '') {
249+ $handler = sub {};
250+ } else {
251+ $handler = eval "sub { main::output('$handler'); };";
252+ }
253+ }
254+ SWITCH: {
255+ # start-document handler
256+ $spec eq 'start' && do {
257+ $start_document_handler = $handler;
258+ last SWITCH;
259+ };
260+ # end-document handler
261+ $spec eq 'end' && do {
262+ $end_document_handler = $handler;
263+ last SWITCH;
264+ };
265+ # start-element handler
266+ $spec =~ /^<([^\/].*|)>$/ && do {
267+ $start_element_handlers->{$1} = $handler;
268+ last SWITCH;
269+ };
270+ # generic start-element handler
271+ $spec eq 'start_element' && do {
272+ $start_element_handlers->{''} = $handler;
273+ last SWITCH;
274+ };
275+ # end-element handler
276+ $spec =~ /^<\/(.*)>$/ && do {
277+ $end_element_handlers->{$1} = $handler;
278+ last SWITCH;
279+ };
280+ # generic end-element handler
281+ $spec =~ 'end_element' && do {
282+ $end_element_handlers->{''} = $handler;
283+ last SWITCH;
284+ };
285+ # cdata handler
286+ $spec eq 'cdata' && do {
287+ $cdata_handler = $handler;
288+ last SWITCH;
289+ };
290+ # sdata handler
291+ $spec =~ /^\|(.*)\|$/ && do {
292+ $sdata_handlers->{$1} = $handler;
293+ last SWITCH;
294+ };
295+ # generic sdata handler
296+ $spec eq 'sdata' && do {
297+ $sdata_handlers->{''} = $handler;
298+ last SWITCH;
299+ };
300+ # record-end handler
301+ $spec eq 're' && do {
302+ $re_handler = $handler;
303+ last SWITCH;
304+ };
305+ # processing-instruction handler
306+ $spec eq 'pi' && do {
307+ $pi_handler = $handler;
308+ last SWITCH;
309+ };
310+ # entity-reference handler
311+ $spec =~ /^\&(.*);$/ && do {
312+ $entity_handlers->{$1} = $handler;
313+ last SWITCH;
314+ };
315+ # generic entity-reference handler
316+ $spec eq 'entity' && do {
317+ $entity_handlers->{''} = $handler;
318+ last SWITCH;
319+ };
320+ # start-subdoc handler
321+ $spec =~ /^\{([^\/].*|)\}$/ && do {
322+ $start_subdoc_handlers->{$1} = $handler;
323+ last SWITCH;
324+ };
325+ # generic start-subdoc handler
326+ $spec eq 'start_subdoc' && do {
327+ $start_subdoc_handlers->{''} = $handler;
328+ last SWITCH;
329+ };
330+ # end-subdoc handler
331+ $spec =~ /^\{\/(.*)\}$/ && do {
332+ $end_subdoc_handlers->{$1} = $handler;
333+ last SWITCH;
334+ };
335+ # generic end-subdoc handler
336+ $spec eq 'end_subdoc' && do {
337+ $end_subdoc_handlers->{''} = $handler;
338+ last SWITCH;
339+ };
340+ # conforming handler
341+ $spec eq 'conforming' && do {
342+ $conforming_handler = $handler;
343+ last SWITCH;
344+ };
345+
346+ die "Bad SGML handler pattern: $spec\n";
347+ }
348+}
349+
350+
351+#
352+# The first argument on the command line is a perl module which will be
353+# read here and evaluated in the 'main' package -- everything else will
354+# be an argument to it.
355+#
356+package main;
357+
358+$ARGV = shift;
359+unless ($ARGV eq '' || do 'sgmlspl-specs/' . $ARGV || do $ARGV) {
360+ if (!-e $ARGV) {
361+ die "FATAL: $ARGV does not exist.\n";
362+ } elsif (!-r $ARGV) {
363+ die "FATAL: $ARGV exists but is read-protected.\n";
364+ } elsif ($@) {
365+ die "FATAL: $@\n";
366+ }
367+}
368+
369+
370+#
371+# Do the actual work, using the SGMLS package.
372+#
373+package SGMLS_PL;
374+
375+$parse = new SGMLS(main::STDIN); # a new parse object
376+
377+&{$start_document_handler}(); # run the start handler.
378+
379+ # run the appropriate handler for each
380+ # event
381+while ($event = $parse->next_event) {
382+ my $type = $event->type;
383+ SWITCH: {
384+ $type eq 'start_element' && do {
385+ &{($start_element_handlers->{$event->data->name}||
386+ $start_element_handlers->{''} || sub {})}($event->data,$event);
387+ last SWITCH;
388+ };
389+ $type eq 'end_element' && do {
390+ &{($end_element_handlers->{$event->data->name}||
391+ $end_element_handlers->{''} || sub {})}($event->data,$event);
392+ last SWITCH;
393+ };
394+ $type eq 'cdata' && do {
395+ &{$cdata_handler}($event->data,$event);
396+ last SWITCH;
397+ };
398+ $type eq 'sdata' && do {
399+ &{($sdata_handlers->{$event->data}||
400+ $sdata_handlers->{''} || sub {})}($event->data,$event);
401+ last SWITCH;
402+ };
403+ $type eq 're' && do {
404+ &{$re_handler}($event->data,$event);
405+ last SWITCH;
406+ };
407+ $type eq 'pi' && do {
408+ &{$pi_handler}($event->data,$event);
409+ last SWITCH;
410+ };
411+ $type eq 'entity' && do {
412+ &{($entity_handlers->{$event->data->name}||
413+ $entity_handlers->{''} || sub {})}($event->data,$event);
414+ last SWITCH;
415+ };
416+ $type eq 'start_subdoc' && do {
417+ &{($start_subdoc_handlers->{$event->data->name}||
418+ $start_subdoc_handlers->{''} || sub {})}($event->data,$event);
419+ last SWITCH;
420+ };
421+ $type eq 'end_subdoc' && do {
422+ &{($end_subdoc_handlers->{$event->data->name}||
423+ $end_subdoc_handlers->{''} || sub {})}($event->data,$event);
424+ last SWITCH;
425+ };
426+ $type eq 'conforming' && do {
427+ &{$conforming_handler}($event->data,$event);
428+ last SWITCH;
429+ };
430+
431+ die "Unknown SGML event type: $type\n";
432+ }
433+}
434+
435+&{$end_document_handler}(); # run the end handler
436--- libsgmls-perl-1.03ii.orig/sgmlspl.pl
437+++ libsgmls-perl-1.03ii/sgmlspl.pl
438@@ -238,7 +238,7 @@
439 package main;
440
441 $ARGV = shift;
442-unless ($ARGV eq '' || do $ARGV) {
443+unless ($ARGV eq '' || do 'sgmlspl-specs/' . $ARGV || do $ARGV) {
444 if (!-e $ARGV) {
445 die "FATAL: $ARGV does not exist.\n";
446 } elsif (!-r $ARGV) {
447--- libsgmls-perl-1.03ii.orig/SGMLS.pm
448+++ libsgmls-perl-1.03ii/SGMLS.pm
449@@ -1,7 +1,7 @@
450 package SGMLS;
451 use Carp;
452
453-$version = '$Revision: 1.14 $';
454+$version = '$Revision: 1.1 $';
455
456 =head1 NAME
457
diff --git a/meta/recipes-devtools/sgmlspl/sgmlspl-native_1.03ii.bb b/meta/recipes-devtools/sgmlspl/sgmlspl-native_1.03ii.bb
new file mode 100644
index 0000000000..1fab417f94
--- /dev/null
+++ b/meta/recipes-devtools/sgmlspl/sgmlspl-native_1.03ii.bb
@@ -0,0 +1,17 @@
1SUMMARY = "A simple post-processor for SGMLS and NSGMLS"
2DESCRIPTION = "A simple post-processor for SGMLS and NSGMLS"
3HOMEPAGE = "http://search.cpan.org/src/DMEGG/SGMLSpm-1.03ii/DOC/HTML/SGMLSpm/sgmlspm.html"
4SECTION = "libs"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
7PR = "r0"
8
9SRC_URI = "http://www.cpan.org/authors/id/D/DM/DMEGG/SGMLSpm-${PV}.tar.gz \
10 file://combined.patch"
11
12SRC_URI[md5sum] = "5bcb197fd42e67d51c739b1414d514a7"
13SRC_URI[sha256sum] = "f06895c0206dada9f9e7f07ecaeb6a3651fd648f4820f49c1f76bfeaec2f2913"
14
15S = "${WORKDIR}/SGMLSpm"
16
17inherit native cpan