summaryrefslogtreecommitdiff
path: root/textproc/aspell/patches/patch-al
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/aspell/patches/patch-al')
-rw-r--r--textproc/aspell/patches/patch-al79
1 files changed, 79 insertions, 0 deletions
diff --git a/textproc/aspell/patches/patch-al b/textproc/aspell/patches/patch-al
new file mode 100644
index 00000000000..d4467f31cf1
--- /dev/null
+++ b/textproc/aspell/patches/patch-al
@@ -0,0 +1,79 @@
+$NetBSD: patch-al,v 1.1 2005/10/27 01:08:06 rillig Exp $
+
+The SunPro compiler does not like empty arrays, so let's not create C++
+source files that have them.
+
+--- gen/mk-static-filter.pl.orig 2004-06-29 02:18:17.000000000 +0200
++++ gen/mk-static-filter.pl 2005-10-27 02:45:45.784646500 +0200
+@@ -130,38 +130,44 @@ printf STATICFILTERS "\n };\n";
+ printf STATICFILTERS "\n const unsigned int standard_filters_size = ".
+ "sizeof(standard_filters)/sizeof(FilterEntry);\n";
+
++my %empty_filters = ();
+
+ #create KeyInfo structures for each static filter
+ while ($filter = shift @filterhashes) {
+- printf STATICFILTERS "\n static KeyInfo ".${$filter}{"NAME"}."_options[] = {\n";
++ my $txt = "\n static KeyInfo ".${$filter}{"NAME"}."_options[] = {\n";
+
+ #create KeyInfo structs and begin end handles
+ $firstopt = 1;
+ while (($name,$option)=each %{$filter}) {
+ ($name=~/(?:NAME|(?:DE|EN)CODER|FILTER|DESCRIPTION)/) && next;
+- ( $firstopt != 1 ) && ( printf STATICFILTERS ",\n" );
++ ( $firstopt != 1 ) && ( $txt .= ",\n" );
+ $firstopt = 0;
+- printf STATICFILTERS " {\n".
++ $txt .= " {\n".
+ " \"f-${$filter}{NAME}-$name\",\n";
+ ( (lc ${$option}{"TYPE"}) eq "bool") &&
+- printf STATICFILTERS " KeyInfoBool,\n";
++ ($txt .= " KeyInfoBool,\n");
+ ( (lc ${$option}{"TYPE"}) eq "int") &&
+- printf STATICFILTERS " KeyInfoInt,\n";
++ ($txt .= " KeyInfoInt,\n");
+ ( (lc ${$option}{"TYPE"}) eq "string") &&
+- printf STATICFILTERS " KeyInfoString,\n";
++ ($txt .= " KeyInfoString,\n");
+ ( (lc ${$option}{"TYPE"}) eq "list") &&
+- printf STATICFILTERS " KeyInfoList,\n";
+- print STATICFILTERS " \"".${$option}{"DEFAULT"}."\",\n".
++ ($txt .= " KeyInfoList,\n");
++ $txt .= " \"".${$option}{"DEFAULT"}."\",\n".
+ " \"".${$option}{"DESCRIPTION"}."\"\n".
+ " }";
+ }
+- printf STATICFILTERS "\n };\n";
+- printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
++ $txt .= "\n };\n";
++ $txt .= "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
+ ${$filter}{"NAME"}."_options;\n";
+- printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_end = ".
++ $txt .= "\n const KeyInfo * ".${$filter}{"NAME"}."_options_end = ".
+ ${$filter}{"NAME"}."_options+sizeof(".
+ ${$filter}{"NAME"}."_options)/".
+ "sizeof(KeyInfo);\n";
++ if ($firstopt != 1) {
++ print STATICFILTERS $txt;
++ } else {
++ $empty_filters{$filter->{"NAME"}} = 1;
++ }
+ }
+
+ #finally create filter modules list.
+@@ -170,6 +176,7 @@ printf STATICFILTERS "\n\n static Conf
+ #printf STATICFILTERS " {\"fm\",0,modes_module_begin,modes_module_end}";
+ $firstopt = 1;
+ while ($filter = shift @rallfilters) {
++ if (!exists($empty_filters{$filter})) {
+ ( $firstopt != 1 ) && ( printf STATICFILTERS ",\n" );
+ $firstopt = 0;
+ printf STATICFILTERS " {\n".
+@@ -177,6 +184,7 @@ while ($filter = shift @rallfilters) {
+ " \"".${${filters}{$filter}}{DESCRIPTION}."\",\n" .
+ " ${filter}_options_begin,${filter}_options_end\n" .
+ " }";
++ }
+ }
+ printf STATICFILTERS "\n };\n";
+ printf STATICFILTERS "\n const ConfigModule * filter_modules_begin = ".