summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff636
-rw-r--r--meta/recipes-support/gnutls/gnutls_2.12.23.bb1
2 files changed, 637 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff b/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
new file mode 100644
index 0000000000..76108a09fc
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/25_updatedgdocfrommaster.diff
@@ -0,0 +1,636 @@
1Description: Update gdoc script from gnutls master.
2 This includes bef38b98c0536d81c0e4b2e78a9182e1df1d451c among other fixes:
3 .
4 [PATCH] Avoid depending on hash order in gdoc.
5 .
6 Previously, gdoc had a hash of regexp replacements for each output
7 format, and applied the replacements in the order that "keys" returned
8 for the hash. However, not all orders are safe -- and now that Perl 5.18
9 randomises hash order per-process, it only worked sometimes!
10
11Bug-Debian: http://bugs.debian.org/724167
12
13Upstream-Status: Backport
14
15Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
16
17--- gnutls26-2.12.23.orig/doc/scripts/gdoc
18+++ gnutls26-2.12.23/doc/scripts/gdoc
19@@ -1,4 +1,6 @@
20-#!/usr/bin/perl
21+eval '(exit $?0)' && eval 'exec perl "$0" ${1+"$@"}'
22+ & eval 'exec perl "$0" $argv:q'
23+ if 0;
24
25 ## Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson
26 ## added -texinfo, -listfunc, -pkg-name
27@@ -7,6 +9,8 @@
28 ## Copyright (c) 2001, 2002 Nikos Mavrogiannopoulos
29 ## added -tex
30 ## Copyright (c) 1998 Michael Zucchi
31+## Copyright (c) 2013 Adam Sampson
32+## made highlighting not depend on hash order, for Perl 5.18
33
34 # This program is free software: you can redistribute it and/or modify
35 # it under the terms of the GNU General Public License as published by
36@@ -132,57 +136,59 @@
37 use POSIX qw(strftime);
38
39 # match expressions used to find embedded type information
40-$type_constant = "((?<!\")\\\%(\\w+))";
41-$type_func = "(\\w+\\(\\))";
42-$type_param = "\\\@(\\w+)";
43-$type_struct = "\\\#(\\w+)";
44-$type_env = "(\\\$\\w+)";
45+$type_constant = "\\\%([A-Za-z0-9_]+)";
46+$type_func = "([A-Za-z0-9_]+\\(\\))";
47+$type_param = '\@([A-Za-z0-9_]+)\s*';
48+$type_struct = "\\\#([A-Za-z0-9_]+)";
49+$type_env = "(\\\$[A-Za-z0-9_]+)";
50
51
52 # Output conversion substitutions.
53 # One for each output format
54
55 # these work fairly well
56-%highlights_html = ( $type_constant, "<i>\$2</i>",
57- $type_func, "<b>\$1</b>",
58- $type_struct, "<i>\$1</i>",
59- $type_param, "<tt><b>\$1</b></tt>" );
60+@highlights_html = ( [$type_constant, '"<i>$1</i>"'],
61+ [$type_func, '"<b>$1</b>"'],
62+ [$type_struct, '"<i>$1</i>"'],
63+ [$type_param, '" <tt><b>$1</b></tt> "'] );
64 $blankline_html = "<p>";
65
66-%highlights_texinfo = ( $type_constant, "\\\@code{\$2}",
67- $type_func, "\\\@code{\$1}",
68- $type_struct, "\\\@code{\$1}",
69- $type_param, "\\\@code{\$1}" );
70+@highlights_texinfo = ( [$type_param, '" \@code{$1} "'],
71+ [$type_constant, '"\@code{$1} "'],
72+ [$type_func, '"\@code{$1} "'],
73+ [$type_struct, '"\@code{$1} "'],
74+ );
75 $blankline_texinfo = "";
76
77-%highlights_tex = ( $type_constant, "{\\\\it \$2}",
78- $type_func, "{\\\\bf \$1}",
79- $type_struct, "{\\\\it \$1}",
80- $type_param, "{\\\\bf \$1}" );
81+@highlights_tex = ( [$type_param, '" {\\\bf $1} "'],
82+ [$type_constant, '"{\\\it $1}"'],
83+ [$type_func, '"{\\\bf $1}"'],
84+ [$type_struct, '"{\\\it $1}"'],
85+ );
86 $blankline_tex = "\\\\";
87
88 # sgml, docbook format
89-%highlights_sgml = ( $type_constant, "<replaceable class=\"option\">\$2</replaceable>",
90- $type_func, "<function>\$1</function>",
91- $type_struct, "<structname>\$1</structname>",
92- $type_env, "<envar>\$1</envar>",
93- $type_param, "<parameter>\$1</parameter>" );
94+@highlights_sgml = ( [$type_constant, '"<replaceable class=\"option\">$1</replaceable>"'],
95+ [$type_func, '"<function>$1</function>"'],
96+ [$type_struct, '"<structname>$1</structname>"'],
97+ [$type_env, '"<envar>$1</envar>"'],
98+ [$type_param, '" <parameter>$1</parameter> "'] );
99 $blankline_sgml = "</para><para>\n";
100
101 # these are pretty rough
102-%highlights_man = ( $type_constant, "\\\\fB\$2\\\\fP",
103- $type_func, "\\\\fB\$1\\\\fP",
104- $type_struct, "\\\\fB\$1\\\\fP",
105- $type_param, "\\\\fI\$1\\\\fP" );
106+@highlights_man = ( [$type_constant, '"\\\fB$1\\\fP"'],
107+ [$type_func, '"\\\fB$1\\\fP"'],
108+ [$type_struct, '"\\\fB$1\\\fP"'],
109+ [$type_param, '" \\\fI$1\\\fP "'] );
110 $blankline_man = "";
111
112 # text-mode
113-%highlights_text = ( $type_constant, "\$2",
114- $type_func, "\$1",
115- $type_struct, "\$1",
116- $type_param, "\$1" );
117+@highlights_text = ( [$type_constant, '"$1"'],
118+ [$type_func, '"$1"'],
119+ [$type_struct, '"$1"'],
120+ [$type_param, '"$1 "'] );
121 $blankline_text = "";
122-
123+my $lineprefix = "";
124
125 sub usage {
126 print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -tex | -texinfo -listfunc ]\n";
127@@ -201,7 +207,7 @@ if ($#ARGV==-1) {
128
129 $verbose = 0;
130 $output_mode = "man";
131-%highlights = %highlights_man;
132+@highlights = @highlights_man;
133 $blankline = $blankline_man;
134 $modulename = "API Documentation";
135 $sourceversion = strftime "%Y-%m-%d", localtime;
136@@ -210,27 +216,27 @@ while ($ARGV[0] =~ m/^-(.*)/) {
137 $cmd = shift @ARGV;
138 if ($cmd eq "-html") {
139 $output_mode = "html";
140- %highlights = %highlights_html;
141+ @highlights = @highlights_html;
142 $blankline = $blankline_html;
143 } elsif ($cmd eq "-man") {
144 $output_mode = "man";
145- %highlights = %highlights_man;
146+ @highlights = @highlights_man;
147 $blankline = $blankline_man;
148 } elsif ($cmd eq "-tex") {
149 $output_mode = "tex";
150- %highlights = %highlights_tex;
151+ @highlights = @highlights_tex;
152 $blankline = $blankline_tex;
153 } elsif ($cmd eq "-texinfo") {
154 $output_mode = "texinfo";
155- %highlights = %highlights_texinfo;
156+ @highlights = @highlights_texinfo;
157 $blankline = $blankline_texinfo;
158 } elsif ($cmd eq "-text") {
159 $output_mode = "text";
160- %highlights = %highlights_text;
161+ @highlights = @highlights_text;
162 $blankline = $blankline_text;
163 } elsif ($cmd eq "-docbook") {
164 $output_mode = "sgml";
165- %highlights = %highlights_sgml;
166+ @highlights = @highlights_sgml;
167 $blankline = $blankline_sgml;
168 } elsif ($cmd eq "-listfunc") {
169 $output_mode = "listfunc";
170@@ -270,6 +276,8 @@ sub dump_section {
171 my $name = shift @_;
172 my $contents = join "\n", @_;
173
174+ $name = " $name";
175+
176 if ($name =~ m/$type_constant/) {
177 $name = $1;
178 # print STDERR "constant section '$1' = '$contents'\n";
179@@ -280,6 +288,7 @@ sub dump_section {
180 $parameters{$name} = $contents;
181 } else {
182 # print STDERR "other section '$name' = '$contents'\n";
183+ $name =~ tr/ //d;
184 $sections{$name} = $contents;
185 push @sectionlist, $name;
186 }
187@@ -296,35 +305,15 @@ sub dump_section {
188 # sections => %descriont descriptions
189 #
190
191-sub repstr {
192- $pattern = shift;
193- $repl = shift;
194- $match1 = shift;
195- $match2 = shift;
196- $match3 = shift;
197- $match4 = shift;
198-
199- $output = $repl;
200- $output =~ s,\$1,$match1,g;
201- $output =~ s,\$2,$match2,g;
202- $output =~ s,\$3,$match3,g;
203- $output =~ s,\$4,$match4,g;
204-
205- eval "\$return = qq/$output/";
206-
207-# print "pattern $pattern matched 1=$match1 2=$match2 3=$match3 4=$match4 replace $repl yielded $output interpolated $return\n";
208-
209- $return;
210-}
211-
212 sub just_highlight {
213 my $contents = join "\n", @_;
214 my $line;
215 my $ret = "";
216
217- foreach $pattern (keys %highlights) {
218-# print "scanning pattern $pattern ($highlights{$pattern})\n";
219- $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2, $3, $4):gse;
220+ foreach $highlight (@highlights) {
221+ my ($pattern, $replace) = @$highlight;
222+ #print "scanning pattern $pattern ($replace)\n";
223+ $contents =~ s/$pattern/$replace/gees;
224 }
225 foreach $line (split "\n", $contents) {
226 if ($line eq ""){
227@@ -370,13 +359,45 @@ sub output_texinfo {
228 }
229 }
230 foreach $section (@{$args{'sectionlist'}}) {
231+ $section =~ s/\@//g;
232 print "\n\@strong{$section:} " if $section ne $section_default;
233- $args{'sections'}{$section} =~ s:([{}]):\@\1:gs;
234+ $args{'sections'}{$section} =~ s:([{}]):\@$1:gs;
235 output_highlight($args{'sections'}{$section});
236 }
237 print "\@end deftypefun\n\n";
238 }
239
240+sub output_enum_texinfo {
241+ my %args = %{$_[0]};
242+ my ($parameter, $section);
243+ my $count;
244+ my $name = $args{'enum'};
245+ my $param;
246+ my $param2;
247+ my $sec;
248+ my $check;
249+ my $type;
250+
251+ print "\n\@c $name\n";
252+ print "\@table \@code\n";
253+
254+ $check=0;
255+ foreach $parameter (@{$args{'parameterlist'}}) {
256+ $param1 = $parameter;
257+ $param1 =~ s/_/_\@-/g;
258+
259+ $check = 1;
260+ print "\@item ".$param1."\n";
261+# print "\n";
262+
263+ $param2 = $args{'parameters'}{$parameter};
264+ $out = just_highlight($param2);
265+ chomp $out;
266+ print $out . "\n";
267+ }
268+ print "\@end table\n";
269+}
270+
271 # output in html
272 sub output_html {
273 my %args = %{$_[0]};
274@@ -428,7 +449,9 @@ sub output_tex {
275
276 $func =~ s/_/\\_/g;
277
278- print "\n\n\\subsection{". $func . "}\n\\label{" . $args{'function'} . "}\n";
279+ print "\n\n\\begin{function}\n";
280+ print "\\functionTitle{". $func . "}\n";
281+ print "\\index{". $func . "}\n";
282
283 $type = $args{'functiontype'};
284 $type =~ s/_/\\_/g;
285@@ -451,9 +474,8 @@ sub output_tex {
286 }
287 print ")\n";
288
289- print "\n{\\large{Arguments}}\n";
290+ print "\n\\begin{functionArguments}\n";
291
292- print "\\begin{itemize}\n";
293 $check=0;
294 foreach $parameter (@{$args{'parameterlist'}}) {
295 $param1 = $args{'parametertypes'}{$parameter};
296@@ -462,11 +484,12 @@ sub output_tex {
297 $param2 =~ s/_/\\_/g;
298
299 $check = 1;
300- print "\\item {\\it ".$param1."} {\\bf ".$param2."}: \n";
301+ print "\\functionArgument {\\it ".$param1."} {\\bf ".$param2."}: \n";
302 # print "\n";
303
304 $param3 = $args{'parameters'}{$parameter};
305- $param3 =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
306+ $param3 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
307+ $param3 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
308
309 $out = just_highlight($param3);
310 $out =~ s/_/\\_/g;
311@@ -475,31 +498,72 @@ sub output_tex {
312 if ($check==0) {
313 print "\\item void\n";
314 }
315- print "\\end{itemize}\n";
316+ print "\\end{functionArguments}\n";
317
318 foreach $section (@{$args{'sectionlist'}}) {
319 $sec = $section;
320 $sec =~ s/_/\\_/g;
321- $sec =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
322+ $sec =~ s/#([a-zA-Z\_]+)/{\\it $1}/g;
323
324- print "\n{\\large{$sec}}\\\\\n";
325- print "\\begin{rmfamily}\n";
326+ print "\n\\begin{function${sec}}\n";
327+ $out = $args{'sections'}{$section};
328
329- $sec = $args{'sections'}{$section};
330- $sec =~ s/\\:/:/g;
331- $sec =~ s/#([a-zA-Z\_]+)/{\\it \1}/g;
332- $sec =~ s/->/\$\\rightarrow\$/g;
333- $sec =~ s/([0-9]+)\^([0-9]+)/\$\{\1\}\^\{\2\}\$/g;
334-
335- $out = just_highlight($sec);
336- $out =~ s/_/\\_/g;
337+ $out =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
338+ $out =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
339+ $out =~ s/\@([a-zA-Z\_]+)/{\\bf $1}/g;
340+ $out =~ s/_/\\_\\-/g;
341+ $out =~ s/\$/\\\$/g;
342+ $out =~ s/#/\\#/g;
343+ $out =~ s/\n\n/\n/g;
344+ $out =~ s/\\:/:/g;
345+ $out =~ s/\-\>/\$\\rightarrow\$/g;
346+ $out =~ s/([0-9]+)\^([0-9]+)/\$\{$1\}\^\{$2\}\$/g;
347
348 print $out;
349- print "\\end{rmfamily}\n";
350+ print "\\end{function${sec}}\n";
351 }
352- print "\n";
353+ print "\\end{function}\n\n";
354 }
355
356+sub output_enum_tex {
357+ my %args = %{$_[0]};
358+ my ($parameter, $section);
359+ my $count;
360+ my $name = $args{'enum'};
361+ my $param;
362+ my $param2;
363+ my $sec;
364+ my $check;
365+ my $type;
366+
367+ print "\n\n\\begin{enum}\n";
368+ $name =~ s/_/\\_/g;
369+ print "\\enumTitle{". $name . "}\n";
370+ print "\\index{". $name . "}\n";
371+
372+ print "\n\\begin{enumList}\n";
373+
374+ $check=0;
375+ foreach $parameter (@{$args{'parameterlist'}}) {
376+ $param1 = $parameter;
377+ $param1 =~ s/_/\\_\\-/g;
378+
379+ $check = 1;
380+ print "\\enumElement{".$param1."}{";
381+# print "\n";
382+
383+ $param2 = $args{'parameters'}{$parameter};
384+ $param2 =~ s/\#([a-zA-Z\_]+)/{\\it $1}/g;
385+ $param2 =~ s/\%([a-zA-Z\_]+)/{\\bf $1}/g;
386+ $out = just_highlight($param2);
387+ $out =~ s/_/\\_/g;
388+ chomp $out;
389+ print $out . "}\n";
390+ }
391+ print "\\end{enumList}\n";
392+
393+ print "\\end{enum}\n\n";
394+}
395
396 # output in sgml DocBook
397 sub output_sgml {
398@@ -639,11 +703,14 @@ sub output_man {
399 if ($args{'bugsto'}) {
400 print ".SH \"REPORTING BUGS\"\n";
401 print "Report bugs to <". $args{'bugsto'} . ">.\n";
402+ print ".br\n";
403+ print "General guidelines for reporting bugs: http://www.gnu.org/gethelp/\n";
404+ print ".br\n";
405 if ($args{'pkgname'}) {
406 print $args{'pkgname'} . " home page: " .
407 "http://www.gnu.org/software/" . $args{'module'} . "/\n";
408 }
409- print "General help using GNU software: http://www.gnu.org/gethelp/\n";
410+ print "\n";
411 }
412
413 if ($args{'copyright'}) {
414@@ -670,6 +737,10 @@ sub output_man {
415 print ".B info " . $args{'seeinfo'} . "\n";
416 print ".PP\n";
417 print "should give you access to the complete manual.\n";
418+ print "As an alternative you may obtain the manual from:\n";
419+ print ".IP\n";
420+ print ".B http://www.gnu.org/software/" . $args{'module'} . "/manual/\n";
421+ print ".PP\n";
422 }
423 }
424
425@@ -705,6 +776,10 @@ sub output_function {
426 eval "output_".$output_mode."(\@_);";
427 }
428
429+sub output_enum {
430+ eval "output_enum_".$output_mode."(\@_);";
431+}
432+
433
434 ##
435 # takes a function prototype and spits out all the details
436@@ -744,7 +819,7 @@ sub dump_function {
437 # print STDERR " :> @args\n";
438 $type = join " ", @args;
439
440- if ($parameters{$param} eq "" && $param != "void") {
441+ if ((!defined($parameters{$param}) || $parameters{$param} eq "") && $param ne "void") {
442 $parameters{$param} = "-- undescribed --";
443 print STDERR "warning: $lineno: Function parameter '$param' not described in '$function_name'\n";
444 }
445@@ -781,6 +856,56 @@ sub dump_function {
446 }
447 }
448
449+sub dump_enum {
450+ my $prototype = shift @_;
451+
452+ if (($prototype =~ m/^\s*typedef\s+enum\s*[a-zA-Z0-9_~:]*\s*\{([\-a-zA-Z0-9_~=,:\s\(\)\<]+)\s*\}\s*([a-zA-Z0-9_]+);.*/)) {
453+# || $prototype =~ m/^\s*enum\s+([a-zA-Z0-9_~:]+).*/) {
454+ $args = $1;
455+ $name = $2;
456+
457+ foreach $arg (split ',', $args) {
458+ # strip leading/trailing spaces
459+ $arg =~ s/^\s*//;
460+ $arg =~ s/\s*$//;
461+ $arg =~ s/([A-Za-z0-9_]+)\s*=.*/$1/g;
462+# print STDERR "SCAN ARG: '$arg'\n";
463+
464+ next if $arg eq '';
465+ if ((!defined($parameters{$arg}) || $parameters{$arg} eq "")) {
466+ $parameters{$arg} = "-- undescribed --";
467+ print STDERR "warning: $lineno: Enumeration parameter '$arg' not described in '$name'\n";
468+ }
469+
470+ push @parameterlist, $arg;
471+
472+# print STDERR "param = '$arg'\n";
473+ }
474+ } else {
475+# print STDERR "warning: $lineno: Cannot understand enumeration: '$prototype'\n";
476+ return;
477+ }
478+
479+ output_enum({'enum' => $name,
480+ 'module' => $modulename,
481+ 'sourceversion' => $sourceversion,
482+ 'include' => $include,
483+ 'includefuncprefix' => $includefuncprefix,
484+ 'bugsto' => $bugsto,
485+ 'pkgname' => $pkgname,
486+ 'copyright' => $copyright,
487+ 'verbatimcopying' => $verbatimcopying,
488+ 'seeinfo' => $seeinfo,
489+ 'functiontype' => $return_type,
490+ 'parameterlist' => \@parameterlist,
491+ 'parameters' => \%parameters,
492+ 'parametertypes' => \%parametertypes,
493+ 'sectionlist' => \@sectionlist,
494+ 'sections' => \%sections,
495+ 'purpose' => $function_purpose
496+ });
497+}
498+
499 ######################################################################
500 # main
501 # states
502@@ -797,7 +922,7 @@ $doc_start = "^/\\*\\*\$";
503 $doc_end = "\\*/";
504 $doc_com = "\\s*\\*\\s*";
505 $doc_func = $doc_com."(\\w+):?";
506-$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w ]+):\\s*(.*)";
507+$doc_sect = $doc_com."([".$doc_special."[:upper:]][\\w]+):\\s*(.*)";
508 $doc_content = $doc_com."(.*)";
509
510 %constants = ();
511@@ -809,6 +934,7 @@ $doc_content = $doc_com."(.*)";
512 $contents = "";
513 $section_default = "Description"; # default section
514 $section = $section_default;
515+$enum = 0;
516
517 $lineno = 0;
518 foreach $file (@ARGV) {
519@@ -816,18 +942,21 @@ foreach $file (@ARGV) {
520 print STDERR "Error: Cannot open file $file\n";
521 next;
522 }
523- while (<IN>) {
524+ while ($line = <IN>) {
525 $lineno++;
526
527 if ($state == 0) {
528- if (/$doc_start/o) {
529+ if ($line =~ /$doc_start/o) {
530 $state = 1; # next line is always the function name
531+# print STDERR "XXX: start of doc comment\n";
532 }
533 } elsif ($state == 1) { # this line is the function name (always)
534- if (/$doc_func/o) {
535+ if ($line =~ /$doc_func/o) {
536 $function = $1;
537 $state = 2;
538- if (/-\s*(.*)/) {
539+# print STDERR "XXX: start of doc comment, looking for prototype\n";
540+
541+ if ($line =~ /-\s*(.*)/) {
542 $function_purpose = $1;
543 } else {
544 $function_purpose = "";
545@@ -841,11 +970,11 @@ foreach $file (@ARGV) {
546 $state = 0;
547 }
548 } elsif ($state == 2) { # look for head: lines, and include content
549- if (/$doc_sect/o) {
550+ if ($line =~ /$doc_sect/o) {
551 $newsection = $1;
552 $newcontents = $2;
553
554- if ($contents ne "") {
555+ if ($contents ne '') {
556 dump_section($section, $contents);
557 $section = $section_default;
558 }
559@@ -855,7 +984,7 @@ foreach $file (@ARGV) {
560 $contents .= "\n";
561 }
562 $section = $newsection;
563- } elsif (/$doc_end/) {
564+ } elsif ($line =~ /$doc_end/) {
565
566 if ($contents ne "") {
567 dump_section($section, $contents);
568@@ -863,13 +992,12 @@ foreach $file (@ARGV) {
569 $contents = "";
570 }
571
572-# print STDERR "end of doc comment, looking for prototype\n";
573 $prototype = "";
574 $state = 3;
575- } elsif (/$doc_content/) {
576+ } elsif ($line =~ /$doc_content/) {
577 # miguel-style comment kludge, look for blank lines after
578 # @parameter line to signify start of description
579- if ($1 eq "" && $section =~ m/^@/) {
580+ if ($1 eq '' && $section =~ m/^@/) {
581 dump_section($section, $contents);
582 $section = $section_default;
583 $contents = "";
584@@ -881,13 +1009,16 @@ foreach $file (@ARGV) {
585 print STDERR "warning: $lineno: Bad line: $_";
586 }
587 } elsif ($state == 3) { # scanning for function { (end of prototype)
588- if (m#\s*/\*\s+MACDOC\s*#io) {
589+ if ($line =~ m#\s*/\*\s+MACDOC\s*#io) {
590 # do nothing
591 }
592- elsif (/([^\{]*)/) {
593+ elsif ($enum == 1 && $line =~ /(^\s*\{).*/) {
594+ $prototype .= "{";
595+ }
596+ elsif ($line =~ /([^\{]*)/) {
597 $prototype .= $1;
598 }
599- if (/\{/) {
600+ if ($enum == 0 && $line =~ /\{/) {
601 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
602 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
603 $prototype =~ s@^ +@@gos; # strip leading spaces
604@@ -901,9 +1032,32 @@ foreach $file (@ARGV) {
605 %sections = ();
606 @sectionlist = ();
607 $prototype = "";
608+ $enum = 0;
609
610 $state = 0;
611 }
612+ elsif ($enum == 1 && $line =~ /\}/) {
613+ $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
614+ $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
615+ $prototype =~ s@^ +@@gos; # strip leading spaces
616+ dump_enum($prototype);
617+
618+ $function = "";
619+ %constants = ();
620+ %parameters = ();
621+ %parametertypes = ();
622+ @parameterlist = ();
623+ %sections = ();
624+ @sectionlist = ();
625+ $prototype = "";
626+ $enum = 0;
627+
628+ $state = 0;
629+ }
630+ elsif ($line =~ /([a-zA-Z\s]+)enum(.*)$/) {
631+ $enum = 1;
632+ }
633+
634 }
635 }
636 }
diff --git a/meta/recipes-support/gnutls/gnutls_2.12.23.bb b/meta/recipes-support/gnutls/gnutls_2.12.23.bb
index 04605dd7b4..22182426ee 100644
--- a/meta/recipes-support/gnutls/gnutls_2.12.23.bb
+++ b/meta/recipes-support/gnutls/gnutls_2.12.23.bb
@@ -8,6 +8,7 @@ SRC_URI += "file://gnutls-openssl.patch \
8 file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ 8 file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
9 file://CVE-2014-1959-rejection-of-v1-intermediate-cert.patch \ 9 file://CVE-2014-1959-rejection-of-v1-intermediate-cert.patch \
10 file://CVE-2014-0092-corrected-return-codes.patch \ 10 file://CVE-2014-0092-corrected-return-codes.patch \
11 file://25_updatedgdocfrommaster.diff \
11 ${@['', 'file://fix-gettext-version.patch'][bb.data.inherits_class('native', d) or (not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1))]} \ 12 ${@['', 'file://fix-gettext-version.patch'][bb.data.inherits_class('native', d) or (not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1))]} \
12 " 13 "
13 14