3 ################################################################
5 # Aspell Word List Package proc script
6 # Copyright 2001,2002,2004 under the GNU Lesser General Public License (LGPL)
14 use Encode
qw(is_utf8 decode_utf8 encode_utf8 decode encode resolve_alias);
21 no warnings
qw(uninitialized utf8);
24 my $VERSION = "0.60.3";
26 my $action = 'create';
27 my $check_mode = 'safe';
29 my $UTF8 = resolve_alias
'utf-8';
31 foreach my $arg (@ARGV) {
33 if ($arg eq 'check' || $arg eq 'create') {
35 } elsif ($arg eq 'unsafe') {
36 $check_mode = 'unsafe';
40 ################################################################
52 my ($line_length,$error_count,$multi_errors);
53 sub line_length
() {75}
54 sub error_message
($;$) {
57 my $warn = defined $parms->{warn} ?
$parms->{warn} : false
;
58 $error .= $warn ?
"Warning" : "Error";
59 $error .= " line $parms->{lineno}" if defined $parms->{lineno
};
60 $error .= ": $_[0]\n";
63 my $print_line = sub {print STDERR
"$line\n" unless $line =~ /^\s*$/};
64 while (s/(\s*?)(\S+|\n)//) {
66 my $len = length($line) + length($a) + length($b);
67 if (($line !~ /^\s*$/ && $len > line_length
) || $b eq "\n") {
70 $b = "" if $b eq "\n";
79 $multi_errors++ if defined $multi_errors;
82 sub handle_error
(;$) {
85 error_message
$ {$@
}, {lineno
=> $_[0]};
92 sub memberof
( $ $ ) {
93 foreach (@
{$_[1]}) {return true
if $_[0] eq $_;}
97 sub indented_list
( @
) {
98 return join '', map {" $_\n"} @_;
103 my $res = open $IN, "$_[0]";
105 error_message
("Unable to read the file $_[0]") unless $res;
109 ################################################################
111 # insr initialization
114 my ($key,$val,$info,$insr,@authors,%alt_encodings,%dicts,%copying,%files);
119 sub lower
() {["[a-z]+",
120 "must consist of only lowercase ASCII characters"]}
121 sub upper
() {["[A-Z]+",
122 "must consist of only uppercase ASCII characters"]}
123 sub alpha
() {["[A-Za-z]+",
124 "must consist of only alpha ASCII characters"]}
125 sub alphanum
() {["[A-Za-z0-9-]+",
126 "must consist of only alphanumeric ASCII characters or '-'"]}
127 sub ascii
() {["[\x20-\x7E]+",
128 "must consist of only ASCII characters"]}
129 sub any
() {[".+","ERROR"]}
130 sub generic
() {"is not in the proper format"}
132 sub dict
() {return ["$lang(_[A-Z]{2}|)(|-[a-z0-9_-]+)(-[0-9]{2}|)",
135 sub split_dict
( $ ) {my $dict = dict
->[0];
136 my @data = $_[0] =~ /^$dict$/;
137 foreach (@data) {next unless $_;
140 sub form_dict
( @
) {my $name = $lang;
141 $name .= "_$_[0]" if $_[0];
142 $name .= "-$_[1]" if $_[1];
143 $name .= "-$_[2]" if $_[2];
147 sub make_alias
( $ $ $ );
154 (default_fill_order
=> [qw
(name_ascii name_native strip_accents doc_encoding mode
)],
155 mode
=> {required
=>false
,
156 oneof
=>['aspell5', 'aspell6'],
161 name
=> {check
=>any
},
162 name_native
=> {check
=>any
, required
=>false
},
163 email
=> {required
=>false
, check
=>[".+ at .+",generic
]},
164 maintainer
=> {required
=>false
,
165 oneof
=>['true', 'false'], default=>'false'},
168 push @authors, $info;
171 copyright
=> {oneof
=> ["LGPL", "GPL", "FDL", "LGPL/GPL", # FSF Licenses
172 "Artistic", # Perl Artistic Licence
173 "Copyrighted", # Copyright message must remain
174 "Open Source", # Meets OSI defination
175 "Public Domain", # ie none
176 "Other", "Unknown"] },
178 check
=> ['\d[a-z\d\.-]+', generic
],
179 code
=> sub {$version="$val"},
182 date
=> {required
=>false
, check
=>['\d\d\d\d-\d\d-\d\d', 'YYYY-MM-DD']},
183 url
=> {required
=>false
},
184 source_url
=> {required
=>false
},
185 source_version
=> {required
=>false
},
186 name_english
=> {check
=>["[A-Z][a-z]+([ -]+[A-Z][a-z]+)*",generic
]},
187 name_ascii
=> {default => "=name_english"},
188 name_native
=> {default => "=name_ascii", check
=>any
},
189 lang
=> {check
=> ["[a-z]{2,3}(|_[A-Z]{2})(|-[a-z0-9]+)",
190 "must consist of two or three lowercase ASCII characters"],
193 try_read
"$lang.dat";
194 push @
{$files{data
}}, "$lang.dat";
198 doc_encoding
=> {default => $UTF8, store
=>true
,
200 my $enc = resolve_alias
$val;
201 error
"The encoding \"$val\" is not known" unless $enc;
203 alt_encoding
=> {required
=> false
,
204 check
=> ['\S+ \S+', generic
],
206 $val =~ /^(\S+) (\S+)/ or die;
207 my $enc = resolve_alias
$1;
208 error
"The encoding \"$1\" is not known" unless $enc;
209 $alt_encodings{$enc} = $2;
211 data_file
=> {required
=> false
,
214 push @
{$files{data
}}, $val;
216 readme_file
=> {required
=> false
, check
=> upper
,
217 normal
=>"README", generate
=> sub {README
}},
218 readme_extra
=> {required
=> false
, store
=> true
,
220 my ($file) = $val =~ /^(.+?)(| .+)$/;
221 try_read
"doc/$file";
223 copying_file
=> {required
=>false
, check
=> upper
, normal
=>"COPYING",
224 generate
=> sub {$copying{$info->{copyright
}}}},
225 copyright_file
=> {required
=>false
, check
=> upper
,
226 normal
=>"Copyright"},
227 complete
=> {oneof
=> [qw(true almost false unknown)]},
228 accurate
=> {oneof
=> [qw(true false unknown)]},
229 notes
=> {required
=> false
},
233 error
"The \"lang\" entry must be defined before any global aliases."
234 unless exists $global_info{lang
};
235 my @d = split /\s+/, $val;
236 foreach (@d[1..$#d]) {
237 my $awli = s/:awli$// ? true
: false
;
238 error
("The alias $_ already exits in the \"$aliases_to{$_}\" "
240 if exists $aliases_to{$_};
241 $aliases_to{$_} = $d[0];
242 $_ = {name
=> $_, awli
=> $awli};
244 push @
{$aliases_from{$d[0]}}, @d[1..$#d];
249 default_fill_order
=> ['awli'],
250 singular
=> false
, name
=> {check
=>\
&dict
},
251 awli
=> {default=>'true', oneof
=>['true','false']},
254 oneof
=> ["true", "false"],
255 code
=> sub {push @
{$info->{insr
}}, "strip-accents $val";}
262 my ($inf, $v) = @_ ?
@_ : ($info, $val);
263 push @
{$inf->{insr
}}, "add $v";
264 push @
{$inf->{dicts
}}, {name
=> $v, add
=> \
$inf->{insr
}->[-1]};
272 error
"The name entry must be defined before any aliases or defined"
273 unless exists $info->{name
};
274 my $awli = $val =~ s/:awli$//;
275 &{$insr->{post
}}( make_alias
$val, $info->{name
}, $awli );
280 my ($inf) = @_ ?
@_ : ($info);
283 error
"The \"lang\" entry must be defined before any dicts."
284 unless exists $global_info{lang
};
288 my ($inf) = @_ ?
@_ : ($info);
289 error
"Must provide at least one word list for \"$info->{name}\" dict entry."
290 if (@
{$inf->{dicts
}} == 0);
291 error
"The dict or alias \"$info->{name}\" is already defined."
292 if exists $dicts{$inf->{name
}};
293 $dicts{$inf->{name
}} = $inf;
299 sub doc_entries
() {qw
(readme_file copying_file copyright_file
)}
301 ################################################################
303 # Add default values to insr
306 my @defaults = (["singular", true
],
310 sub add_defaults
( $ ) {
312 foreach my $d (@defaults) {
313 $v->{$d->[0]} = $d->[1] unless exists $v->{$d->[0]};
315 $v->{required
} = false
if exists $v->{code
} || !$v->{singular
};
316 $v->{store
} = true
unless exists $v->{store
} || exists $v->{code
};
317 $v->{store
} = false
unless exists $v->{store
};
319 foreach my $v (values %global_insr) {
320 next unless ref $v eq 'HASH';
322 if (!$v->{singular
}) {
323 foreach my $vv (values %$v) {
324 next unless ref $vv eq 'HASH';
330 ################################################################
335 open IN
, "info" or die "Unable to open info file\n";
339 sub possibly_end_multi
();
340 sub add_defaults_and_check_mandatory
();
342 my ($key_insr,$multi_val,$multi_line,$multi_message);
343 $info = \
%global_info;
344 $insr = \
%global_insr;
358 ($lsp, $key, $col, $val)
359 = /^(\s*)([\w-]*)\s*(:?)\s*(.*)$/ or error
"Syntax Error.";
361 if ($col eq ':' && $lsp ne '') {
362 error_message
"This line should not be indented. Assuming its not."
371 $key_insr = $insr->{$key} or error
"Unknown Key: $key";
372 error
"Expecting value after $key"
373 if $key_insr->{singular
} && ($col ne '' || $val eq '');
374 error
"Expecting \":\" after $key"
375 if !$key_insr->{singular
} && $col ne ':';
377 if ($key_insr->{singular
}) {
389 error
"This line is indented yet I can not find a line of the form "
390 ."\"<key>:\" before it" if !defined $multi_val;
392 $key_insr = $insr->{$key} or error
"Unknown Key \"$key\"$multi_message.";
393 error
"Expecting value after $key$multi_message." if $col ne '' || $val eq '';
407 die "There were $error_count errors with the info file, aborting.\n" if $error_count > 0;
410 my $check = $key_insr->{check
};
411 error
"The value \"$val\" for $key is not valid UTF-8."
412 unless is_utf8
($val, 1);
413 $check = &$check if ref $check eq 'CODE';
414 error
"The value for $key $check->[1]$multi_message."
415 if $val !~ /^$check->[0]$/;
416 error
"The value for $key is not one of: ".join(', ',@
{$key_insr->{oneof
}})
417 if exists $key_insr->{oneof
} && !memberof
($val, $key_insr->{oneof
});
418 if ($key_insr->{store
}) {
419 error
"A value for $key already defined$multi_message."
420 if exists $info->{$key};
421 $info->{$key} = $val;
423 if (exists $key_insr->{code
}) {
424 &{$key_insr->{code
}};
435 $multi_message = " for the group \"$multi_val\" which starts at line $multi_line";
440 sub possibly_end_multi
() {
441 return unless defined $multi_val;
443 if ($multi_errors == 0) {
444 add_defaults_and_check_mandatory
;
447 if ($multi_errors == 0) {
451 handle_error
$multi_line;
454 $info = \
%global_info;
455 $insr = \
%global_insr;
458 $multi_errors = undef;
462 ################################################################
464 # Add defaults and check for mandatory fields
467 add_defaults_and_check_mandatory
;
469 sub add_defaults_and_check_mandatory
() {
474 foreach my $key (@
{$insr->{default_fill_order
}}) {
475 next if exists $info->{$key};
476 my $def = $insr->{$key}->{default};
477 if ($def =~ /^\=(.+)$/) {
478 $info->{$key} = $info->{$1};
480 $info->{$key} = $def;
484 # check mandatory fields
486 while (my ($key,$val) = each %$insr) {
487 next unless ref $val eq 'HASH';
488 next unless $val->{required
};
489 next if exists $info->{$key};
490 error_message
"The required field $key is missing$multi_message.";
494 $info = \
%global_info;
495 $insr = \
%global_insr;
497 error_message
"You must provide at least one author."
502 if (exists $info->{date
}) {
503 $date = $info->{date
};
504 ($date{year
}, $date{month
}, $date{day
}) = $info->{date
} =~ /(....)-(..)-(..)/ or die;
506 (undef,undef,undef,$date{day
},$date{month
},$date{year
}) = localtime(time);
508 $date = sprintf "%04d-%02d-%02d",$date{year
},$date{month
}+1,$date{day
};
511 $mode = $info->{mode
};
513 my ($prezip, $prezip_c, $prezip_d, $aspell_version, $cwl_note);
514 if ($mode eq 'aspell5') {
515 $prezip = "word-list-compress";
518 $aspell_version = '0.50';
520 The individual word lists have an extension of
".cwl" and are
521 compressed to save space
. To uncompress a word list
use
522 "word-list-compress < BASE.cwl > BASE.wl" or simply
523 "word-list-compress < BASE.cwl" to
dump it to standard output
.
526 $prezip = "prezip-bin";
529 $aspell_version = '0.60';
531 The individual word lists have an extension of
".cwl" and are
532 compressed to save space
. To uncompress a word list
use
533 "preunzip BASE.cwl" which will uncompress it
and rename the file
534 to
"BASE.wl". To
dump a compressed word list to standard output
use
535 "precat BASE.cwl". To uncompress all word lists
in the current
536 directory
use "preunzip *.cwl". For more help on
"preunzip" use
542 ################################################################
548 my (%already_warned);
550 sub make_alias
( $ $ $ ) {
551 my ($from, $to, $awli) = @_;
553 my $insr = $global_insr{dict
};
554 &{$insr->{pre
}}($inf);
555 $inf->{name
} = $from;
556 $inf->{awli
} = $awli ?
'true' : 'false';
557 &{$insr->{add
}{code
}}($inf, $to);
562 # Traverse performs a depth first circle looking for cycles and information
565 # 1st (array reference) The list of all nodes
566 # 2nd (sub ( $ )) A function which returnes all the children of a given node
567 sub traverse
( $ $ );
570 [keys %aliases_from],
572 my $r = $aliases_from{$_[0]};
573 return () unless defined $r;
574 return map {$_->{name
}} @
$r;
577 my @toproc = keys %dicts;
578 while (my $key = shift @toproc) {
579 my $val = $dicts{$key};
581 my @d = split_dict
$key;
585 $d[0] = $lang . ($d[0] ?
'_' : ''). $d[0];
587 my $get_aliases = sub {
589 @a = @
{$aliases_from{$_[0]}} if exists $aliases_from{$_[0]};
590 return ({name
=>$_[0], awli
=>$val->{awli
}}, @a);
593 foreach my $l0 (&$get_aliases($d[0])) {
594 foreach my $l1 (&$get_aliases($d[1])) {
595 foreach my $l2 (&$get_aliases($d[2])) {
596 my $dict = $l0->{name
};
597 $dict .= '-'.$l1->{name
} if $l1->{name
};
598 $dict .= '-'.$l2->{name
} if $l2->{name
};
599 next if exists $dicts{$dict};
600 my $awli = $l0->{awli
} && $l1->{awli
} && $l2->{awli
};
601 $dicts{$dict} = make_alias
$dict, $key, $awli;
602 $dicts{$dict}->{auto
} = true
;
608 next unless $val->{awli
};
610 # If the dictionaries have a size associated with it than find
611 # the size closest to the default size and make an awli alias for
612 # that dictionary without the size in its name
614 @d = split_dict
$key;
616 my $n = form_dict
@d;
619 if (exists $dicts{$n} && ! exists $dicts{$n}{auto
}) {
620 if (!$already_warned{$n}) {
622 $error .= "Since the awli-dict \"$key\" exists ";
623 $error .= "the dict $n should also have a size.";
624 error_message
$error;
625 $already_warned{$n} = true
;
628 # create a special alias
637 push @toproc,$n unless exists $dicts{$n};
638 my $old_rank = $dicts{$n}->{rank
};
639 if (! defined $old_rank || $rank < $old_rank) {
640 my $inf = make_alias
$n, $key, true
;
641 $inf->{rank
} = $rank;
649 foreach my $key (sort keys %dicts) {
650 # sorting it guarantees that the more general dictionaries are
652 my $val = $dicts{$key};
654 if ($val->{awli
} eq 'true') {
656 my @d = split_dict
$key;
657 pop @d; # ignore the size part as it is already handled above
659 my $n = form_dict
@d;
664 next if exists $dicts{$n}{rank
};
665 next if exists $already_warned{$n};
667 if (!exists $dicts{$n} || $dicts{$n}{awli
} eq 'false') {
668 $error .= "The more specific awli-dict \"$key\" exists yet ";
669 if (!exists $dicts{$n}) {
670 $error .= "\"$n\" does not."
671 } elsif ($dicts{$n}->{awli
} eq 'false') {
672 $error .= "the \"$n\" dict has the awli entry set to false."
675 error_message
$error if defined $error;
676 $already_warned{$n} = true
;
680 foreach my $n (@
{$val->{dicts
}}) {
681 if ($n->{name
} eq $key && @
{$val->{insr
}} != 1) {
684 $error .= "The $key dictionary can not add a word list ";
685 $error .= "of the same name unless it is the only entry.";
686 error_message
$error;
690 if ($n->{name
} eq $key || !exists $dicts{$n->{name
}}) {
692 push @
{$word_lists{$n->{name
}}}, $key;
694 $n->{type
} = 'multi';
695 #$n->{link} = $dicts{$n->{name}};
697 $ {$n->{add
}} .= ".$n->{type}";
701 $val->{is_alias
} = (@
{$val->{insr
}} == 1
702 && $val->{dicts
}[0]{type
} eq 'multi');
704 $val->{ext
} = $val->{awli
} eq 'true' ?
'multi' : 'alias';
705 #$val->{ext} = ($mode eq 'aspell5'
706 # ? ($val->{awli} eq 'true' ? 'multi' : 'alias')
707 # : $val->{is_alias} ? 'alias' : 'multi');
710 unshift @
{$val->{insr
}}, "strip-accents true"
711 if $global_info{strip_accents
} eq 'true' && $val->{insr
}->[0] !~ /^strip-accents /;
714 sub find_equivalent_to
{
715 my $val = $dicts{$_[0]};
716 return $val->{equivalent_to
} if exists $val->{equivalent_to
};
717 if (@
{$val->{insr
}} == 1 && $val->{dicts
}[0]{type
} eq 'multi') {
718 $val->{equivalent_to
} = &find_equivalent_to
($val->{dicts
}[0]{name
});
719 push @
{$val->{equivalent_to
}}, $_[0];
721 $val->{equivalent_to
} = [];
723 return $val->{equivalent_to
};
725 foreach my $key (sort keys %dicts) {
726 &find_equivalent_to
($key);
731 [map {"$_->{name}.$_->{ext}"} values %dicts],
734 my ($name,$type) = $id =~ /^(.+)\.(.+)$/;
735 return () unless $type eq 'multi';
736 return map {"$_->{name}.$_->{type}"} @
{$dicts{$name}->{dicts
}};
739 my $word_list_compress_working =
740 system("$prezip > /dev/null 2> /dev/null") != -1 ? true
: false
;
741 error_message
("Unable to execute prezip-bin. I will not be able "
742 ."to check the integrity of the *.cwl files.")
743 unless $word_list_compress_working;
745 if ($check_mode ne 'unsafe' && $word_list_compress_working) {
746 foreach my $wl (keys %word_lists) {
747 next unless -e
"$wl.cwl";
748 open IN
, "$prezip$prezip_d < $wl.cwl|" or die;
750 error_message
"No data received from $prezip.";
757 error_message
("The file $wl.cwl is not in the proper format. "
758 ."Did you remember to set LC_COLLATE to C before sorting "
759 ."and compressing with \"$prezip\".");
761 } elsif ($prev eq $_) {
762 print "'$prev' eq '$_'";
763 error_message
("The file $wl.cwl contains duplicates. "
764 ."Sort with \"sort -u\" to remove them.");
772 foreach my $key (doc_entries
) {
774 if (exists $info->{$key}) {
775 $file = $info->{$key};
776 } elsif (!exists $insr->{$key}->{generate
}) {
777 $file = $insr->{$key}->{normal
};
786 die "$error_count Error(s), aborting\n" if $error_count != 0;
788 exit 0 if $action eq 'check';
790 sub traverse
( $ $ ) {
791 my ($nodes, $get_children) = @_;
796 my ($id,$visited) = @_;
798 my %paths = ($id => [$id]);
800 return \
%paths if exists $visited->{$id};
802 #print STDERR " $id\n";
804 $visited->{$id} = true
;
806 if ($processed{$id}) {
807 foreach (@
{$processed{$id}->{visited
}}) {
808 $visited->{$_} = true
;
810 return $processed{$id}->{paths
};
813 foreach my $val (&$get_children( $id ) ) {
815 my $child_paths = &$t( $val, $visited );
817 while (my ($k,$v) = each %$child_paths) {
820 "Ciculer dependence found: ".join(" -> ", $id, @
$v);
821 } elsif (exists $paths{$k}) {
823 ("$v->[-1] is included twice by $id via the following paths:\n"
824 ." ".join(" -> ", $id, @
$v)."\n"
825 ." ".join(" -> ", @
{$paths{$k}})
828 $paths{$k} = [$id, @
$v];
833 $processed{$id} = {visited
=> [keys %$visited],
838 foreach my $k (@
$nodes) {
839 #print STDERR "$k:\n";
844 ################################################################
851 $files{extra
} = ['configure', 'info', 'Makefile.pre'];
853 $info->{name
} = $lang;
855 my $doc_encoding = resolve_alias
$info->{doc_encoding
};
856 die unless $doc_encoding; # FIXME
857 delete $alt_encodings{$doc_encoding};
858 $alt_encodings{$UTF8}='utf8' if $doc_encoding ne $UTF8;
860 foreach my $key (doc_entries
) {
862 my $specific = $info->{$key};
863 my $normal = $insr->{$key}{normal
};
865 if (defined $specific && $specific ne $normal) {
867 system "cp $specific $normal" or die;
869 push @
{$files{doc
}}, $specific, $normal;
871 } elsif (defined $specific) {
873 push @
{$files{doc
}}, $normal;
875 } elsif (exists $insr->{$key}{generate
}) {
877 my $data = &{$insr->{$key}{generate
}};
879 next unless defined $data;
881 open OUT
, ">:encoding($doc_encoding)", "$normal";
884 push @
{$files{doc
}}, $normal;
886 while (my ($enc, $ext) = each %alt_encodings) {
887 my $d = encode
($enc, $data);
888 my $d2 = encode
($doc_encoding, $data);
890 open OUT
, ">:bytes", "$normal.$ext";
893 push @
{$files{doc
}}, "$normal.$ext";
898 push @
{$files{doc
}}, $normal;
904 foreach my $key (sort keys %dicts) {
905 my $val = $dicts{$key};
907 open OUT
, ">$val->{name}.$val->{ext}\n";
908 print OUT
"# Generated with Aspell Dicts \"proc\" script version $VERSION\n";
909 foreach (@
{$val->{insr
}}) {
913 push @
{$files{multi
}}, "$val->{name}.$val->{ext}";
916 foreach my $key (sort keys %word_lists) {
917 $make .= "$key.rws: $key.cwl\n\n";
918 push @
{$files{cwl
}}, "$key.cwl";
919 push @
{$files{rws
}}, "$key.rws";
924 .SUFFIXES
: .cwl
.rws
.wl
927 \
${PREZIP
}$prezip_d < \
$< | \
${ASPELL
} \
${ASPELL_FLAGS
} --lang
=$lang create master
./\
$@
930 cat \
$< | LC_COLLATE
=C
sort -u
| \
${PREZIP
}$prezip_c > \
$@
933 \
${PREZIP
}$prezip_d < \
$< > \
$@
937 open OUT
, ">Makefile.pre";
939 # Generated with Aspell Dicts "proc" script version $VERSION
945 foreach (sort keys %files) {
946 print OUT
"${_}_files = ", join(' ', @
{$files{$_}}), "\n";
949 print OUT
"distdir=$mode-\${lang}-\${version}\n\n";
952 all
: ${rws_files
} ${data_files
}
955 mkdir -p
${DESTDIR
}${dictdir
}/
956 cp
${rws_files
} ${multi_files
} ${DESTDIR
}${dictdir
}/
957 cd
${DESTDIR
}${dictdir
}/ && chmod 644 ${rws_files
} ${multi_files
}
958 mkdir -p
${DESTDIR
}${datadir
}/
959 cp
${data_files
} ${DESTDIR
}${datadir
}/
960 cd
${DESTDIR
}${datadir
}/ && chmod 644 ${data_files
}
968 maintainer
-clean
: distclean
969 rm
-f
${multi_files
} configure Makefile
.pre
972 -cd
${DESTDIR
}${dictdir
}/ && rm
${rws_files
} ${multi_files
} ${link_files
}
973 -cd
${DESTDIR
}${datadir
}/ && rm
${data_files
}
981 -rm
-r
${distdir
}.tar
.bz2
${distdir
}
983 cp
-p
${extra_files
} ${cwl_files
} ${multi_files
} ${doc_files
} ${data_files
} ${distdir
}/
984 -test
-e doc
&& mkdir ${distdir
}/doc && chmod 755 ${distdir}/doc && cp
-pr doc
/* ${distdir}/doc/
985 -test
-e misc
&& mkdir ${distdir
}/misc && chmod 755 ${distdir}/misc && cp
-pr misc
/* ${distdir}/misc/
986 tar cf
${distdir
}.tar
${distdir
}/
987 bzip2
-9 ${distdir
}.tar
991 tar xfj
${distdir
}.tar
.bz2
992 cd
${distdir
} && ./configure
&& make
995 mv
${distdir
}.tar
.bz2
../rel
1002 open OUT
, ">configure";
1007 # Note: future version will have a syntax something like
1008 # ./configure [OPTIONS]
1009 # Where OPTIONS is any of:
1013 # --jargons JARGON1 ...
1014 # --extras EXTRA1 ...
1015 # --vars VAR1=VAL1 ...
1016 # which is why I warn when --vars is not used before VAR1=VAL1
1018 # Avoid depending upon Character Ranges.
1019 # Taken from autoconf 2.50
1020 cr_az
='abcdefghijklmnopqrstuvwxyz'
1021 cr_AZ
='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
1023 cr_alnum
=\
$cr_az\
$cr_AZ\
$cr_09
1025 # also taken form autoconf
1026 case
`echo "testing\\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1027 *c
*,-n
*) ECHO_N
= ECHO_C
='
1029 *c
*,* ) ECHO_N
=-n ECHO_C
= ECHO_T
= ;;
1030 *) ECHO_N
= ECHO_C
='\\c' ECHO_T
= ;;
1042 if test \
$mode != vars
; then
1043 echo
"Warning: future versions will require --vars before variables are set"
1046 # Taken from autoconf 2.50
1047 envvar
=`expr "x\$option" : 'x\\([^=]*\\)='`
1048 optarg
=`expr "x\$option" : 'x[^=]*=\\(.*\\)'`
1049 # Reject names that are not valid shell variable names.
1050 expr
"x\$envvar" : ".*[^_\$cr_alnum]" >/dev/null
&&
1051 { echo
"\$as_me: error: invalid variable name: \$envvar" >&2
1052 { (exit 1); exit 1; }; }
1053 #echo \$envvar \$optarg
1054 optarg
=`echo "\$optarg" | sed "s/'/'\\\\\\\\\\\\\\\\''/g"`
1055 eval "\$envvar='\$optarg'"
1059 echo
"Usage: ./configure [--help | --vars VAR1=VAL1 ...]"
1060 echo
" Note: Variables may also be set in the environment brefore running config"
1061 echo
" Useful vars: ASPELL ASPELL_PARMS PREZIP DESTDIR"
1065 echo
"Error: unrecognized option \$option";
1072 if test x
= "x\$ASPELL"
1073 then ASPELL
=aspell
; fi
1074 if test x
= "x\$PREZIP"
1075 then PREZIP
=$prezip; fi
1078 echo \
$ECHO_N "Finding Dictionary file location ... \$ECHO_C"
1079 dictdir
=`\$ASPELL dump config dict-dir`
1082 echo \
$ECHO_N "Finding Data file location ... \$ECHO_C"
1083 datadir
=`\$ASPELL dump config data-dir`
1086 echo
"ASPELL = `which \$ASPELL`" > Makefile
1087 echo
"ASPELL_FLAGS = \$ASPELL_FLAGS" >> Makefile
1088 echo
"PREZIP = `which \$PREZIP`" >> Makefile
1089 echo
"DESTDIR = \$DESTDIR" >> Makefile
1090 echo
"dictdir = \$dictdir" >> Makefile
1091 echo
"datadir = \$datadir" >> Makefile
1093 cat Makefile
.pre
>> Makefile
1097 chmod 0755, 'configure';
1101 my $lang_name = $info->{name_english
};
1102 $lang_name .= " ($info->{name_native})" if $info->{name_native
} ne $info->{name_english
};
1103 my $maintainer_list;
1105 foreach (@authors) {
1106 my $which = $_->{maintainer
} eq 'true' ? \
$maintainer_list : \
$author_list;
1107 $$which .= " $_->{name}";
1108 $$which .= " ($_->{name_native})" if exists $_->{name_native
};
1109 $$which .= " <$_->{email}>" if exists $_->{email
};
1113 if ($maintainer_list) {
1114 $author_info = "Maintained By:\n$maintainer_list";
1115 $author_info .= "Original Word List Also By:\n$author_list" if $author_list;
1117 $author_info = "Original Word List By:\n$author_list";
1121 foreach my $key (sort keys %dicts) {
1122 my $val = $dicts{$key};
1123 next if $val->{is_alias
};
1124 $dict_list .= " $key";
1125 if (@
{$val->{equivalent_to
}}) {
1127 my $len = length($key) + 4;
1129 foreach (sort @
{$val->{equivalent_to
}}) {
1130 if ($len + length($_) > 70 && $len != $indent) {
1132 $dict_list .= ' 'x
$indent;
1135 $dict_list .= "$_ ";
1136 $len += length($_) + 1;
1145 $extra_info .= "Wordlist URL: $info->{url}\n" if exists $info->{url
};
1146 $extra_info .= "Source Verson: $info->{source_version}\n" if exists $info->{source_version
};
1147 $extra_info .= "Source URL: $info->{source_url}\n" if exists $info->{source_url
};
1149 if ($info->{complete
} eq 'true' && $info->{accurate
} eq 'true') {
1150 $extra_info .= "This word list is considered both complete and accurate.\n";
1151 } elsif ($info->{complete
} eq 'true' && $info->{accurate
} eq 'false') {
1152 $extra_info .= "This word list is considered complete but inaccurate.\n";
1153 } elsif ($info->{complete
} eq 'false' && $info->{accurate
} eq 'true') {
1154 $extra_info .= "This word list is considered accurate but incomplete.\n";
1155 } elsif ($info->{complete
} eq 'true') {
1156 $extra_info .= "This word list is considered complete.\n";
1157 } elsif ($info->{accurate
} eq 'true') {
1158 $extra_info .= "This word list is considered accurate.\n";
1161 my $readme = <<"---";
1162 GNU Aspell
$aspell_version $lang_name Dictionary Package
1166 Copyright Terms
: $info->{copyright
} (see the file Copyright
for the exact terms
)
1168 This is the
$info->{name_english
} dictionary
for Aspell
. It requires Aspell
1169 version
$aspell_version or better
.
1171 If Aspell is installed
and aspell
and $prezip are all
1172 in the path first
do a
:
1176 Which should output something like
:
1178 Finding Dictionary file location
... /usr/local/lib/aspell
1179 Finding Data file location
... /usr/local/share/aspell
1181 if it did
not something likely went wrong
.
1183 After that build the
package with
:
1185 and then install it with
1188 If any of the above mentioned programs are
not in your path than the
1189 variables
, ASPELL
and/or PREZIP need to be set to the
1190 commands
(with path
) to run the utilities
. These variables may be set
1191 in the environment before configure is run
or specified at the command
1192 line using the following syntax
1193 ./configure
--vars VAR1
=VAL1
...
1194 Other useful variables configure recognizes are ASPELL_PARMS
, and DESTDIR
.
1196 To clean up after the build
:
1199 To uninstall the files
:
1202 After the dictionaries are installed you can
use the main one
($lang) by
1203 setting the LANG environmental variable to
$lang or running Aspell
1204 with
"--lang=$lang". You may also chose the dictionary directly
1205 with the
"-d" or "--master" option of Aspell
. You can chose from any of
1206 the following dictionaries
:
1208 Whereas the names
in parentheses are alternate names
for the
1209 dictionary preceding the parentheses
.
1213 If you have any problem with installing
or using the word lists please
1214 let the Aspell maintainer
, Kevin Atkinson
, know at kevina\
@gnu.org
.
1216 If you have problems with the actual word lists please contact one of
1217 the Word lists authors as the Aspell maintainer does
not maintain the
1220 Any additional documentation that came with the original word list can
1221 be found
in the doc
/ directory
.
1224 if (exists $info->{readme_extra
}) {
1225 #$readme .= "A $info->{name_english} version of the above follows ";
1226 #$readme .= "with any special instructions:\n\n";
1227 my ($file, $enc) = $info->{readme_extra
} =~ /^(.+?)(?:| (.+))$/;
1228 $enc = $UTF8 unless length $enc > 0;
1229 open RF
, '<:bytes', "doc/$file";
1231 if ($enc eq $UTF8) {
1232 if (!is_utf8
($_, 1)) {
1233 error_message
"The file $file contains an invalid UTF-8 sequence.";
1238 $readme .= decode
($enc, $_);
1250 GNU GENERAL PUBLIC LICENSE
1251 Version
2, June
1991
1253 Copyright
(C
) 1989, 1991 Free Software Foundation
, Inc
.
1254 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
1255 Everyone is permitted to copy
and distribute verbatim copies
1256 of this license document
, but changing it is
not allowed
.
1260 The licenses
for most software are designed to take away your
1261 freedom to share
and change it
. By contrast
, the GNU General Public
1262 License is intended to guarantee your freedom to share
and change free
1263 software
--to make sure the software is free
for all its users
. This
1264 General Public License applies to most of the Free Software
1265 Foundation
's software and to any other program whose authors commit to
1266 using it. (Some other Free Software Foundation software is covered by
1267 the GNU Library General Public License instead.) You can apply it to
1270 When we speak of free software, we are referring to freedom, not
1271 price. Our General Public Licenses are designed to make sure that you
1272 have the freedom to distribute copies of free software (and charge for
1273 this service if you wish), that you receive source code or can get it
1274 if you want it, that you can change the software or use pieces of it
1275 in new free programs; and that you know you can do these things.
1277 To protect your rights, we need to make restrictions that forbid
1278 anyone to deny you these rights or to ask you to surrender the rights.
1279 These restrictions translate to certain responsibilities for you if you
1280 distribute copies of the software, or if you modify it.
1282 For example, if you distribute copies of such a program, whether
1283 gratis or for a fee, you must give the recipients all the rights that
1284 you have. You must make sure that they, too, receive or can get the
1285 source code. And you must show them these terms so they know their
1288 We protect your rights with two steps: (1) copyright the software, and
1289 (2) offer you this license which gives you legal permission to copy,
1290 distribute and/or modify the software.
1292 Also, for each author's protection
and ours
, we want to make certain
1293 that everyone understands that there is
no warranty
for this free
1294 software
. If the software is modified by someone
else and passed on
, we
1295 want its recipients to know that what they have is
not the original
, so
1296 that any problems introduced by others will
not reflect on the original
1297 authors
' reputations.
1299 Finally, any free program is threatened constantly by software
1300 patents. We wish to avoid the danger that redistributors of a free
1301 program will individually obtain patent licenses, in effect making the
1302 program proprietary. To prevent this, we have made it clear that any
1303 patent must be licensed for everyone's free
use or not licensed at all
.
1305 The precise terms
and conditions
for copying
, distribution
and
1306 modification follow
.
1308 GNU GENERAL PUBLIC LICENSE
1309 TERMS AND CONDITIONS FOR COPYING
, DISTRIBUTION AND MODIFICATION
1311 0. This License applies to any program
or other work which contains
1312 a notice placed by the copyright holder saying it may be distributed
1313 under the terms of this General Public License
. The
"Program", below
,
1314 refers to any such program
or work
, and a
"work based on the Program"
1315 means either the Program
or any derivative work under copyright law
:
1316 that is to
say, a work containing the Program
or a portion of it
,
1317 either verbatim
or with modifications
and/or translated into another
1318 language
. (Hereinafter
, translation is included without limitation
in
1319 the term
"modification".) Each licensee is addressed as
"you".
1321 Activities other than copying
, distribution
and modification are
not
1322 covered by this License
; they are outside its scope
. The act of
1323 running the Program is
not restricted
, and the output from the Program
1324 is covered only
if its contents constitute a work based on the
1325 Program
(independent of having been made by running the Program
).
1326 Whether that is true depends on what the Program does
.
1328 1. You may copy
and distribute verbatim copies of the Program
's
1329 source code as you receive it, in any medium, provided that you
1330 conspicuously and appropriately publish on each copy an appropriate
1331 copyright notice and disclaimer of warranty; keep intact all the
1332 notices that refer to this License and to the absence of any warranty;
1333 and give any other recipients of the Program a copy of this License
1334 along with the Program.
1336 You may charge a fee for the physical act of transferring a copy, and
1337 you may at your option offer warranty protection in exchange for a fee.
1339 2. You may modify your copy or copies of the Program or any portion
1340 of it, thus forming a work based on the Program, and copy and
1341 distribute such modifications or work under the terms of Section 1
1342 above, provided that you also meet all of these conditions:
1344 a) You must cause the modified files to carry prominent notices
1345 stating that you changed the files and the date of any change.
1347 b) You must cause any work that you distribute or publish, that in
1348 whole or in part contains or is derived from the Program or any
1349 part thereof, to be licensed as a whole at no charge to all third
1350 parties under the terms of this License.
1352 c) If the modified program normally reads commands interactively
1353 when run, you must cause it, when started running for such
1354 interactive use in the most ordinary way, to print or display an
1355 announcement including an appropriate copyright notice and a
1356 notice that there is no warranty (or else, saying that you provide
1357 a warranty) and that users may redistribute the program under
1358 these conditions, and telling the user how to view a copy of this
1359 License. (Exception: if the Program itself is interactive but
1360 does not normally print such an announcement, your work based on
1361 the Program is not required to print an announcement.)
1363 These requirements apply to the modified work as a whole. If
1364 identifiable sections of that work are not derived from the Program,
1365 and can be reasonably considered independent and separate works in
1366 themselves, then this License, and its terms, do not apply to those
1367 sections when you distribute them as separate works. But when you
1368 distribute the same sections as part of a whole which is a work based
1369 on the Program, the distribution of the whole must be on the terms of
1370 this License, whose permissions for other licensees extend to the
1371 entire whole, and thus to each and every part regardless of who wrote it.
1373 Thus, it is not the intent of this section to claim rights or contest
1374 your rights to work written entirely by you; rather, the intent is to
1375 exercise the right to control the distribution of derivative or
1376 collective works based on the Program.
1378 In addition, mere aggregation of another work not based on the Program
1379 with the Program (or with a work based on the Program) on a volume of
1380 a storage or distribution medium does not bring the other work under
1381 the scope of this License.
1383 3. You may copy and distribute the Program (or a work based on it,
1384 under Section 2) in object code or executable form under the terms of
1385 Sections 1 and 2 above provided that you also do one of the following:
1387 a) Accompany it with the complete corresponding machine-readable
1388 source code, which must be distributed under the terms of Sections
1389 1 and 2 above on a medium customarily used for software interchange; or,
1391 b) Accompany it with a written offer, valid for at least three
1392 years, to give any third party, for a charge no more than your
1393 cost of physically performing source distribution, a complete
1394 machine-readable copy of the corresponding source code, to be
1395 distributed under the terms of Sections 1 and 2 above on a medium
1396 customarily used for software interchange; or,
1398 c) Accompany it with the information you received as to the offer
1399 to distribute corresponding source code. (This alternative is
1400 allowed only for noncommercial distribution and only if you
1401 received the program in object code or executable form with such
1402 an offer, in accord with Subsection b above.)
1404 The source code for a work means the preferred form of the work for
1405 making modifications to it. For an executable work, complete source
1406 code means all the source code for all modules it contains, plus any
1407 associated interface definition files, plus the scripts used to
1408 control compilation and installation of the executable. However, as a
1409 special exception, the source code distributed need not include
1410 anything that is normally distributed (in either source or binary
1411 form) with the major components (compiler, kernel, and so on) of the
1412 operating system on which the executable runs, unless that component
1413 itself accompanies the executable.
1415 If distribution of executable or object code is made by offering
1416 access to copy from a designated place, then offering equivalent
1417 access to copy the source code from the same place counts as
1418 distribution of the source code, even though third parties are not
1419 compelled to copy the source along with the object code.
1421 4. You may not copy, modify, sublicense, or distribute the Program
1422 except as expressly provided under this License. Any attempt
1423 otherwise to copy, modify, sublicense or distribute the Program is
1424 void, and will automatically terminate your rights under this License.
1425 However, parties who have received copies, or rights, from you under
1426 this License will not have their licenses terminated so long as such
1427 parties remain in full compliance.
1429 5. You are not required to accept this License, since you have not
1430 signed it. However, nothing else grants you permission to modify or
1431 distribute the Program or its derivative works. These actions are
1432 prohibited by law if you do not accept this License. Therefore, by
1433 modifying or distributing the Program (or any work based on the
1434 Program), you indicate your acceptance of this License to do so, and
1435 all its terms and conditions for copying, distributing or modifying
1436 the Program or works based on it.
1438 6. Each time you redistribute the Program (or any work based on the
1439 Program), the recipient automatically receives a license from the
1440 original licensor to copy, distribute or modify the Program subject to
1441 these terms and conditions. You may not impose any further
1442 restrictions on the recipients' exercise of the rights granted herein
.
1443 You are
not responsible
for enforcing compliance by third parties to
1446 7. If
, as a consequence of a court judgment
or allegation of patent
1447 infringement
or for any other reason
(not limited to patent issues
),
1448 conditions are imposed on you
(whether by court order
, agreement
or
1449 otherwise
) that contradict the conditions of this License
, they
do not
1450 excuse you from the conditions of this License
. If you cannot
1451 distribute so as to satisfy simultaneously your obligations under this
1452 License
and any other pertinent obligations
, then as a consequence you
1453 may
not distribute the Program at all
. For example
, if a patent
1454 license would
not permit royalty
-free redistribution of the Program by
1455 all those who receive copies directly
or indirectly through you
, then
1456 the only way you could satisfy both it
and this License would be to
1457 refrain entirely from distribution of the Program
.
1459 If any portion of this section is held invalid
or unenforceable under
1460 any particular circumstance
, the balance of the section is intended to
1461 apply
and the section as a whole is intended to apply
in other
1464 It is
not the purpose of this section to induce you to infringe any
1465 patents
or other property right claims
or to contest validity of any
1466 such claims
; this section has the sole purpose of protecting the
1467 integrity of the free software distribution
system, which is
1468 implemented by public license practices
. Many people have made
1469 generous contributions to the wide range of software distributed
1470 through that
system in reliance on consistent application of that
1471 system; it is up to the author
/donor to decide
if he
or she is willing
1472 to distribute software through any other
system and a licensee cannot
1475 This section is intended to make thoroughly clear what is believed to
1476 be a consequence of the rest of this License
.
1478 8. If the distribution
and/or use of the Program is restricted
in
1479 certain countries either by patents
or by copyrighted interfaces
, the
1480 original copyright holder who places the Program under this License
1481 may add an explicit geographical distribution limitation excluding
1482 those countries
, so that distribution is permitted only
in or among
1483 countries
not thus excluded
. In such case
, this License incorporates
1484 the limitation as
if written
in the body of this License
.
1486 9. The Free Software Foundation may publish revised
and/or new versions
1487 of the General Public License from
time to
time. Such new versions will
1488 be similar
in spirit to the present version
, but may differ
in detail to
1489 address new problems
or concerns
.
1491 Each version is
given a distinguishing version number
. If the Program
1492 specifies a version number of this License which applies to it
and "any
1493 later version", you have the option of following the terms
and conditions
1494 either of that version
or of any later version published by the Free
1495 Software Foundation
. If the Program does
not specify a version number of
1496 this License
, you may choose any version ever published by the Free Software
1499 10. If you wish to incorporate parts of the Program into other free
1500 programs whose distribution conditions are different
, write to the author
1501 to ask
for permission
. For software which is copyrighted by the Free
1502 Software Foundation
, write to the Free Software Foundation
; we sometimes
1503 make exceptions
for this
. Our decision will be guided by the two goals
1504 of preserving the free status of all derivatives of
our free software
and
1505 of promoting the sharing
and reuse of software generally
.
1509 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE
, THERE IS NO WARRANTY
1510 FOR THE PROGRAM
, TO THE EXTENT PERMITTED BY APPLICABLE LAW
. EXCEPT WHEN
1511 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND
/OR OTHER PARTIES
1512 PROVIDE THE PROGRAM
"AS IS" WITHOUT WARRANTY OF ANY KIND
, EITHER EXPRESSED
1513 OR IMPLIED
, INCLUDING
, BUT NOT LIMITED TO
, THE IMPLIED WARRANTIES OF
1514 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
. THE ENTIRE RISK AS
1515 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU
. SHOULD THE
1516 PROGRAM PROVE DEFECTIVE
, YOU ASSUME THE COST OF ALL NECESSARY SERVICING
,
1517 REPAIR OR CORRECTION
.
1519 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1520 WILL ANY COPYRIGHT HOLDER
, OR ANY OTHER PARTY WHO MAY MODIFY AND
/OR
1521 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE
, BE LIABLE TO YOU FOR DAMAGES
,
1522 INCLUDING ANY GENERAL
, SPECIAL
, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1523 OUT OF THE USE OR INABILITY TO USE THE PROGRAM
(INCLUDING BUT NOT LIMITED
1524 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1525 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1526 PROGRAMS
), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1527 POSSIBILITY OF SUCH DAMAGES
.
1529 END OF TERMS AND CONDITIONS
1531 How to Apply These Terms to Your New Programs
1533 If you develop a new program
, and you want it to be of the greatest
1534 possible
use to the public
, the best way to achieve this is to make it
1535 free software which everyone can redistribute
and change under these terms
.
1537 To
do so
, attach the following notices to the program
. It is safest
1538 to attach them to the start of
each source file to most effectively
1539 convey the exclusion of warranty
; and each file should have at least
1540 the
"copyright" line
and a pointer to where the full notice is found
.
1542 <one line to give the program
's name and a brief idea of what it does.>
1543 Copyright (C) <year> <name of author>
1545 This program is free software; you can redistribute it and/or modify
1546 it under the terms of the GNU General Public License as published by
1547 the Free Software Foundation; either version 2 of the License, or
1548 (at your option) any later version.
1550 This program is distributed in the hope that it will be useful,
1551 but WITHOUT ANY WARRANTY; without even the implied warranty of
1552 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1553 GNU General Public License for more details.
1555 You should have received a copy of the GNU General Public License
1556 along with this program; if not, write to the Free Software
1557 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1560 Also add information on how to contact you by electronic and paper mail.
1562 If the program is interactive, make it output a short notice like this
1563 when it starts in an interactive mode:
1565 Gnomovision version 69, Copyright (C) year name of author
1566 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1567 This is free software
, and you are welcome to redistribute it
1568 under certain conditions
; type
`show c' for details.
1570 The hypothetical commands `show w
' and `show c' should show the appropriate
1571 parts of the General Public License
. Of course
, the commands you
use may
1572 be called something other than
`show w' and `show c
'; they could even be
1573 mouse-clicks or menu items--whatever suits your program.
1575 You should also get your employer (if you work as a programmer) or your
1576 school, if any, to sign a "copyright disclaimer" for the program, if
1577 necessary. Here is a sample; alter the names:
1579 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
1580 `Gnomovision' (which makes passes at compilers
) written by James Hacker
.
1582 <signature of Ty Coon
>, 1 April
1989
1583 Ty Coon
, President of Vice
1585 This General Public License does
not permit incorporating your program into
1586 proprietary programs
. If your program is a subroutine library
, you may
1587 consider it more useful to permit linking proprietary applications with the
1588 library
. If this is what you want to
do, use the GNU Library General
1589 Public License instead of this License
.
1592 GNU LESSER GENERAL PUBLIC LICENSE
1593 Version
2.1, February
1999
1595 Copyright
(C
) 1991, 1999 Free Software Foundation
, Inc
.
1596 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
1597 Everyone is permitted to copy
and distribute verbatim copies
1598 of this license document
, but changing it is
not allowed
.
1600 [This is the first released version of the Lesser GPL
. It also counts
1601 as the successor of the GNU Library Public License
, version
2, hence
1602 the version number
2.1.]
1606 The licenses
for most software are designed to take away your
1607 freedom to share
and change it
. By contrast
, the GNU General Public
1608 Licenses are intended to guarantee your freedom to share
and change
1609 free software
--to make sure the software is free
for all its users
.
1611 This license
, the Lesser General Public License
, applies to some
1612 specially designated software packages
--typically libraries
--of the
1613 Free Software Foundation
and other authors who decide to
use it
. You
1614 can
use it too
, but we suggest you first think carefully about whether
1615 this license
or the ordinary General Public License is the better
1616 strategy to
use in any particular case
, based on the explanations below
.
1618 When we speak of free software
, we are referring to freedom of
use,
1619 not price
. Our General Public Licenses are designed to make sure that
1620 you have the freedom to distribute copies of free software
(and charge
1621 for this service
if you wish
); that you receive source code
or can get
1622 it
if you want it
; that you can change the software
and use pieces of
1623 it
in new free programs
; and that you are informed that you can
do
1626 To protect your rights
, we need to make restrictions that forbid
1627 distributors to deny you these rights
or to ask you to surrender these
1628 rights
. These restrictions translate to certain responsibilities
for
1629 you
if you distribute copies of the library
or if you modify it
.
1631 For example
, if you distribute copies of the library
, whether gratis
1632 or for a fee
, you must give the recipients all the rights that we gave
1633 you
. You must make sure that they
, too
, receive
or can get the source
1634 code
. If you
link other code with the library
, you must provide
1635 complete object files to the recipients
, so that they can relink them
1636 with the library after making changes to the library
and recompiling
1637 it
. And you must show them these terms so they know their rights
.
1639 We protect your rights with a two
-step method
: (1) we copyright the
1640 library
, and (2) we offer you this license
, which gives you legal
1641 permission to copy
, distribute
and/or modify the library
.
1643 To protect
each distributor
, we want to make it very clear that
1644 there is
no warranty
for the free library
. Also
, if the library is
1645 modified by someone
else and passed on
, the recipients should know
1646 that what they have is
not the original version
, so that the original
1647 author
's reputation will not be affected by problems that might be
1648 introduced by others.
1650 Finally, software patents pose a constant threat to the existence of
1651 any free program. We wish to make sure that a company cannot
1652 effectively restrict the users of a free program by obtaining a
1653 restrictive license from a patent holder. Therefore, we insist that
1654 any patent license obtained for a version of the library must be
1655 consistent with the full freedom of use specified in this license.
1657 Most GNU software, including some libraries, is covered by the
1658 ordinary GNU General Public License. This license, the GNU Lesser
1659 General Public License, applies to certain designated libraries, and
1660 is quite different from the ordinary General Public License. We use
1661 this license for certain libraries in order to permit linking those
1662 libraries into non-free programs.
1664 When a program is linked with a library, whether statically or using
1665 a shared library, the combination of the two is legally speaking a
1666 combined work, a derivative of the original library. The ordinary
1667 General Public License therefore permits such linking only if the
1668 entire combination fits its criteria of freedom. The Lesser General
1669 Public License permits more lax criteria for linking other code with
1672 We call this license the "Lesser" General Public License because it
1673 does Less to protect the user's freedom than the ordinary General
1674 Public License
. It also provides other free software developers Less
1675 of an advantage over competing non
-free programs
. These disadvantages
1676 are the reason we
use the ordinary General Public License
for many
1677 libraries
. However
, the Lesser license provides advantages
in certain
1678 special circumstances
.
1680 For example
, on rare occasions
, there may be a special need to
1681 encourage the widest possible
use of a certain library
, so that it becomes
1682 a de
-facto standard
. To achieve this
, non
-free programs must be
1683 allowed to
use the library
. A more frequent case is that a free
1684 library does the same job as widely used non
-free libraries
. In this
1685 case
, there is little to gain by limiting the free library to free
1686 software only
, so we
use the Lesser General Public License
.
1688 In other cases
, permission to
use a particular library
in non
-free
1689 programs enables a greater number of people to
use a large body of
1690 free software
. For example
, permission to
use the GNU C Library
in
1691 non
-free programs enables many more people to
use the whole GNU
1692 operating
system, as well as its variant
, the GNU
/Linux operating
1695 Although the Lesser General Public License is Less protective of the
1696 users
' freedom, it does ensure that the user of a program that is
1697 linked with the Library has the freedom and the wherewithal to run
1698 that program using a modified version of the Library.
1700 The precise terms and conditions for copying, distribution and
1701 modification follow. Pay close attention to the difference between a
1702 "work based on the library" and a "work that uses the library". The
1703 former contains code derived from the library, whereas the latter must
1704 be combined with the library in order to run.
1706 GNU LESSER GENERAL PUBLIC LICENSE
1707 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1709 0. This License Agreement applies to any software library or other
1710 program which contains a notice placed by the copyright holder or
1711 other authorized party saying it may be distributed under the terms of
1712 this Lesser General Public License (also called "this License").
1713 Each licensee is addressed as "you".
1715 A "library" means a collection of software functions and/or data
1716 prepared so as to be conveniently linked with application programs
1717 (which use some of those functions and data) to form executables.
1719 The "Library", below, refers to any such software library or work
1720 which has been distributed under these terms. A "work based on the
1721 Library" means either the Library or any derivative work under
1722 copyright law: that is to say, a work containing the Library or a
1723 portion of it, either verbatim or with modifications and/or translated
1724 straightforwardly into another language. (Hereinafter, translation is
1725 included without limitation in the term "modification".)
1727 "Source code" for a work means the preferred form of the work for
1728 making modifications to it. For a library, complete source code means
1729 all the source code for all modules it contains, plus any associated
1730 interface definition files, plus the scripts used to control compilation
1731 and installation of the library.
1733 Activities other than copying, distribution and modification are not
1734 covered by this License; they are outside its scope. The act of
1735 running a program using the Library is not restricted, and output from
1736 such a program is covered only if its contents constitute a work based
1737 on the Library (independent of the use of the Library in a tool for
1738 writing it). Whether that is true depends on what the Library does
1739 and what the program that uses the Library does.
1741 1. You may copy and distribute verbatim copies of the Library's
1742 complete source code as you receive it
, in any medium
, provided that
1743 you conspicuously
and appropriately publish on
each copy an
1744 appropriate copyright notice
and disclaimer of warranty
; keep intact
1745 all the notices that refer to this License
and to the absence of any
1746 warranty
; and distribute a copy of this License along with the
1749 You may charge a fee
for the physical act of transferring a copy
,
1750 and you may at your option offer warranty protection
in exchange
for a
1753 2. You may modify your copy
or copies of the Library
or any portion
1754 of it
, thus forming a work based on the Library
, and copy
and
1755 distribute such modifications
or work under the terms of Section
1
1756 above
, provided that you also meet all of these conditions
:
1758 a
) The modified work must itself be a software library
.
1760 b
) You must cause the files modified to carry prominent notices
1761 stating that you changed the files
and the date of any change
.
1763 c
) You must cause the whole of the work to be licensed at
no
1764 charge to all third parties under the terms of this License
.
1766 d
) If a facility
in the modified Library refers to a function
or a
1767 table of data to be supplied by an application program that uses
1768 the facility
, other than as an argument passed
when the facility
1769 is invoked
, then you must make a good faith effort to ensure that
,
1770 in the event an application does
not supply such function
or
1771 table
, the facility still operates
, and performs whatever part of
1772 its purpose remains meaningful
.
1774 (For example
, a function
in a library to compute square roots has
1775 a purpose that is entirely well
-defined independent of the
1776 application
. Therefore
, Subsection
2d requires that any
1777 application
-supplied function
or table used by this function must
1778 be optional
: if the application does
not supply it
, the square
1779 root function must still compute square roots
.)
1781 These requirements apply to the modified work as a whole
. If
1782 identifiable sections of that work are
not derived from the Library
,
1783 and can be reasonably considered independent
and separate works
in
1784 themselves
, then this License
, and its terms
, do not apply to those
1785 sections
when you distribute them as separate works
. But
when you
1786 distribute the same sections as part of a whole which is a work based
1787 on the Library
, the distribution of the whole must be on the terms of
1788 this License
, whose permissions
for other licensees extend to the
1789 entire whole
, and thus to
each and every part regardless of who wrote
1792 Thus
, it is
not the intent of this section to claim rights
or contest
1793 your rights to work written entirely by you
; rather
, the intent is to
1794 exercise the right to control the distribution of derivative
or
1795 collective works based on the Library
.
1797 In addition
, mere aggregation of another work
not based on the Library
1798 with the Library
(or with a work based on the Library
) on a volume of
1799 a storage
or distribution medium does
not bring the other work under
1800 the scope of this License
.
1802 3. You may opt to apply the terms of the ordinary GNU General Public
1803 License instead of this License to a
given copy of the Library
. To
do
1804 this
, you must alter all the notices that refer to this License
, so
1805 that they refer to the ordinary GNU General Public License
, version
2,
1806 instead of to this License
. (If a newer version than version
2 of the
1807 ordinary GNU General Public License has appeared
, then you can specify
1808 that version instead
if you wish
.) Do
not make any other change
in
1811 Once this change is made
in a
given copy
, it is irreversible
for
1812 that copy
, so the ordinary GNU General Public License applies to all
1813 subsequent copies
and derivative works made from that copy
.
1815 This option is useful
when you wish to copy part of the code of
1816 the Library into a program that is
not a library
.
1818 4. You may copy
and distribute the Library
(or a portion
or
1819 derivative of it
, under Section
2) in object code
or executable form
1820 under the terms of Sections
1 and 2 above provided that you accompany
1821 it with the complete corresponding machine
-readable source code
, which
1822 must be distributed under the terms of Sections
1 and 2 above on a
1823 medium customarily used
for software interchange
.
1825 If distribution of object code is made by offering access to copy
1826 from a designated place
, then offering equivalent access to copy the
1827 source code from the same place satisfies the requirement to
1828 distribute the source code
, even though third parties are
not
1829 compelled to copy the source along with the object code
.
1831 5. A program that contains
no derivative of any portion of the
1832 Library
, but is designed to work with the Library by being compiled
or
1833 linked with it
, is called a
"work that uses the Library". Such a
1834 work
, in isolation
, is
not a derivative work of the Library
, and
1835 therefore falls outside the scope of this License
.
1837 However
, linking a
"work that uses the Library" with the Library
1838 creates an executable that is a derivative of the Library
(because it
1839 contains portions of the Library
), rather than a
"work that uses the
1840 library". The executable is therefore covered by this License
.
1841 Section
6 states terms
for distribution of such executables
.
1843 When a
"work that uses the Library" uses material from a header file
1844 that is part of the Library
, the object code
for the work may be a
1845 derivative work of the Library even though the source code is
not.
1846 Whether this is true is especially significant
if the work can be
1847 linked without the Library
, or if the work is itself a library
. The
1848 threshold
for this to be true is
not precisely
defined by law
.
1850 If such an object file uses only numerical parameters
, data
1851 structure layouts
and accessors
, and small macros
and small inline
1852 functions
(ten lines
or less
in length), then the
use of the object
1853 file is unrestricted
, regardless of whether it is legally a derivative
1854 work
. (Executables containing this object code plus portions of the
1855 Library will still fall under Section
6.)
1857 Otherwise
, if the work is a derivative of the Library
, you may
1858 distribute the object code
for the work under the terms of Section
6.
1859 Any executables containing that work also fall under Section
6,
1860 whether
or not they are linked directly with the Library itself
.
1862 6. As an exception to the Sections above
, you may also combine
or
1863 link a
"work that uses the Library" with the Library to produce a
1864 work containing portions of the Library
, and distribute that work
1865 under terms of your choice
, provided that the terms permit
1866 modification of the work
for the customer
's own use and reverse
1867 engineering for debugging such modifications.
1869 You must give prominent notice with each copy of the work that the
1870 Library is used in it and that the Library and its use are covered by
1871 this License. You must supply a copy of this License. If the work
1872 during execution displays copyright notices, you must include the
1873 copyright notice for the Library among them, as well as a reference
1874 directing the user to the copy of this License. Also, you must do one
1877 a) Accompany the work with the complete corresponding
1878 machine-readable source code for the Library including whatever
1879 changes were used in the work (which must be distributed under
1880 Sections 1 and 2 above); and, if the work is an executable linked
1881 with the Library, with the complete machine-readable "work that
1882 uses the Library", as object code and/or source code, so that the
1883 user can modify the Library and then relink to produce a modified
1884 executable containing the modified Library. (It is understood
1885 that the user who changes the contents of definitions files in the
1886 Library will not necessarily be able to recompile the application
1887 to use the modified definitions.)
1889 b) Use a suitable shared library mechanism for linking with the
1890 Library. A suitable mechanism is one that (1) uses at run time a
1891 copy of the library already present on the user's computer
system,
1892 rather than copying library functions into the executable
, and (2)
1893 will operate properly with a modified version of the library
, if
1894 the user installs one
, as long as the modified version is
1895 interface
-compatible with the version that the work was made with
.
1897 c
) Accompany the work with a written offer
, valid
for at
1898 least three years
, to give the same user the materials
1899 specified
in Subsection
6a
, above
, for a charge
no more
1900 than the cost of performing this distribution
.
1902 d
) If distribution of the work is made by offering access to copy
1903 from a designated place
, offer equivalent access to copy the above
1904 specified materials from the same place
.
1906 e
) Verify that the user has already received a copy of these
1907 materials
or that you have already sent this user a copy
.
1909 For an executable
, the required form of the
"work that uses the
1910 Library" must include any data
and utility programs needed
for
1911 reproducing the executable from it
. However
, as a special exception
,
1912 the materials to be distributed need
not include anything that is
1913 normally distributed
(in either source
or binary form
) with the major
1914 components
(compiler
, kernel
, and so on
) of the operating
system on
1915 which the executable runs
, unless that component itself accompanies
1918 It may happen that this requirement contradicts the license
1919 restrictions of other proprietary libraries that
do not normally
1920 accompany the operating
system. Such a contradiction means you cannot
1921 use both them
and the Library together
in an executable that you
1924 7. You may place library facilities that are a work based on the
1925 Library side
-by
-side
in a single library together with other library
1926 facilities
not covered by this License
, and distribute such a combined
1927 library
, provided that the separate distribution of the work based on
1928 the Library
and of the other library facilities is otherwise
1929 permitted
, and provided that you
do these two things
:
1931 a
) Accompany the combined library with a copy of the same work
1932 based on the Library
, uncombined with any other library
1933 facilities
. This must be distributed under the terms of the
1936 b
) Give prominent notice with the combined library of the fact
1937 that part of it is a work based on the Library
, and explaining
1938 where to find the accompanying uncombined form of the same work
.
1940 8. You may
not copy
, modify
, sublicense
, link with
, or distribute
1941 the Library except as expressly provided under this License
. Any
1942 attempt otherwise to copy
, modify
, sublicense
, link with
, or
1943 distribute the Library is void
, and will automatically terminate your
1944 rights under this License
. However
, parties who have received copies
,
1945 or rights
, from you under this License will
not have their licenses
1946 terminated so long as such parties remain
in full compliance
.
1948 9. You are
not required to
accept this License
, since you have
not
1949 signed it
. However
, nothing
else grants you permission to modify
or
1950 distribute the Library
or its derivative works
. These actions are
1951 prohibited by law
if you
do not accept this License
. Therefore
, by
1952 modifying
or distributing the Library
(or any work based on the
1953 Library
), you indicate your acceptance of this License to
do so
, and
1954 all its terms
and conditions
for copying
, distributing
or modifying
1955 the Library
or works based on it
.
1957 10. Each
time you redistribute the Library
(or any work based on the
1958 Library
), the recipient automatically receives a license from the
1959 original licensor to copy
, distribute
, link with
or modify the Library
1960 subject to these terms
and conditions
. You may
not impose any further
1961 restrictions on the recipients
' exercise of the rights granted herein.
1962 You are not responsible for enforcing compliance by third parties with
1965 11. If, as a consequence of a court judgment or allegation of patent
1966 infringement or for any other reason (not limited to patent issues),
1967 conditions are imposed on you (whether by court order, agreement or
1968 otherwise) that contradict the conditions of this License, they do not
1969 excuse you from the conditions of this License. If you cannot
1970 distribute so as to satisfy simultaneously your obligations under this
1971 License and any other pertinent obligations, then as a consequence you
1972 may not distribute the Library at all. For example, if a patent
1973 license would not permit royalty-free redistribution of the Library by
1974 all those who receive copies directly or indirectly through you, then
1975 the only way you could satisfy both it and this License would be to
1976 refrain entirely from distribution of the Library.
1978 If any portion of this section is held invalid or unenforceable under any
1979 particular circumstance, the balance of the section is intended to apply,
1980 and the section as a whole is intended to apply in other circumstances.
1982 It is not the purpose of this section to induce you to infringe any
1983 patents or other property right claims or to contest validity of any
1984 such claims; this section has the sole purpose of protecting the
1985 integrity of the free software distribution system which is
1986 implemented by public license practices. Many people have made
1987 generous contributions to the wide range of software distributed
1988 through that system in reliance on consistent application of that
1989 system; it is up to the author/donor to decide if he or she is willing
1990 to distribute software through any other system and a licensee cannot
1993 This section is intended to make thoroughly clear what is believed to
1994 be a consequence of the rest of this License.
1996 12. If the distribution and/or use of the Library is restricted in
1997 certain countries either by patents or by copyrighted interfaces, the
1998 original copyright holder who places the Library under this License may add
1999 an explicit geographical distribution limitation excluding those countries,
2000 so that distribution is permitted only in or among countries not thus
2001 excluded. In such case, this License incorporates the limitation as if
2002 written in the body of this License.
2004 13. The Free Software Foundation may publish revised and/or new
2005 versions of the Lesser General Public License from time to time.
2006 Such new versions will be similar in spirit to the present version,
2007 but may differ in detail to address new problems or concerns.
2009 Each version is given a distinguishing version number. If the Library
2010 specifies a version number of this License which applies to it and
2011 "any later version", you have the option of following the terms and
2012 conditions either of that version or of any later version published by
2013 the Free Software Foundation. If the Library does not specify a
2014 license version number, you may choose any version ever published by
2015 the Free Software Foundation.
2017 14. If you wish to incorporate parts of the Library into other free
2018 programs whose distribution conditions are incompatible with these,
2019 write to the author to ask for permission. For software which is
2020 copyrighted by the Free Software Foundation, write to the Free
2021 Software Foundation; we sometimes make exceptions for this. Our
2022 decision will be guided by the two goals of preserving the free status
2023 of all derivatives of our free software and of promoting the sharing
2024 and reuse of software generally.
2028 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
2029 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
2030 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
2031 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
2032 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
2033 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2034 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
2035 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
2036 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
2038 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
2039 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
2040 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
2041 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
2042 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
2043 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
2044 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
2045 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
2046 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
2049 END OF TERMS AND CONDITIONS
2051 How to Apply These Terms to Your New Libraries
2053 If you develop a new library, and you want it to be of the greatest
2054 possible use to the public, we recommend making it free software that
2055 everyone can redistribute and change. You can do so by permitting
2056 redistribution under these terms (or, alternatively, under the terms of the
2057 ordinary General Public License).
2059 To apply these terms, attach the following notices to the library. It is
2060 safest to attach them to the start of each source file to most effectively
2061 convey the exclusion of warranty; and each file should have at least the
2062 "copyright" line and a pointer to where the full notice is found.
2064 <one line to give the library's name
and a brief idea of what it does
.>
2065 Copyright
(C
) <year
> <name of author
>
2067 This library is free software
; you can redistribute it
and/or
2068 modify it under the terms of the GNU Lesser General Public
2069 License as published by the Free Software Foundation
; either
2070 version
2.1 of the License
, or (at your option
) any later version
.
2072 This library is distributed
in the hope that it will be useful
,
2073 but WITHOUT ANY WARRANTY
; without even the implied warranty of
2074 MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE
. See the GNU
2075 Lesser General Public License
for more details
.
2077 You should have received a copy of the GNU Lesser General Public
2078 License along with this library
; if not, write to the Free Software
2079 Foundation
, Inc
., 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
2081 Also add information on how to contact you by electronic
and paper mail
.
2083 You should also get your employer
(if you work as a programmer
) or your
2084 school
, if any
, to sign a
"copyright disclaimer" for the library
, if
2085 necessary
. Here is a sample
; alter the names
:
2087 Yoyodyne
, Inc
., hereby disclaims all copyright interest
in the
2088 library
`Frob' (a library for tweaking knobs) written by James Random Hacker.
2090 <signature of Ty Coon>, 1 April 1990
2091 Ty Coon, President of Vice
2093 That's all there is to it!
2096 GNU Free Documentation License
2097 Version 1.1, March 2000
2099 Copyright (C) 2000 Free Software Foundation, Inc.
2100 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2101 Everyone is permitted to copy and distribute verbatim copies
2102 of this license document, but changing it is not allowed.
2107 The purpose of this License is to make a manual, textbook, or other
2108 written document "free" in the sense of freedom: to assure everyone
2109 the effective freedom to copy and redistribute it, with or without
2110 modifying it, either commercially or noncommercially. Secondarily,
2111 this License preserves for the author and publisher a way to get
2112 credit for their work, while not being considered responsible for
2113 modifications made by others.
2115 This License is a kind of "copyleft", which means that derivative
2116 works of the document must themselves be free in the same sense. It
2117 complements the GNU General Public License, which is a copyleft
2118 license designed for free software.
2120 We have designed this License in order to use it for manuals for free
2121 software, because free software needs free documentation: a free
2122 program should come with manuals providing the same freedoms that the
2123 software does. But this License is not limited to software manuals;
2124 it can be used for any textual work, regardless of subject matter or
2125 whether it is published as a printed book. We recommend this License
2126 principally for works whose purpose is instruction or reference.
2129 1. APPLICABILITY AND DEFINITIONS
2131 This License applies to any manual or other work that contains a
2132 notice placed by the copyright holder saying it can be distributed
2133 under the terms of this License. The "Document", below, refers to any
2134 such manual or work. Any member of the public is a licensee, and is
2137 A "Modified Version" of the Document means any work containing the
2138 Document or a portion of it, either copied verbatim, or with
2139 modifications and/or translated into another language.
2141 A "Secondary Section" is a named appendix or a front-matter section of
2142 the Document that deals exclusively with the relationship of the
2143 publishers or authors of the Document to the Document's overall subject
2144 (or to related matters) and contains nothing that could fall directly
2145 within that overall subject. (For example, if the Document is in part a
2146 textbook of mathematics, a Secondary Section may not explain any
2147 mathematics.) The relationship could be a matter of historical
2148 connection with the subject or with related matters, or of legal,
2149 commercial, philosophical, ethical or political position regarding
2152 The "Invariant Sections" are certain Secondary Sections whose titles
2153 are designated, as being those of Invariant Sections, in the notice
2154 that says that the Document is released under this License.
2156 The "Cover Texts" are certain short passages of text that are listed,
2157 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
2158 the Document is released under this License.
2160 A "Transparent" copy of the Document means a machine-readable copy,
2161 represented in a format whose specification is available to the
2162 general public, whose contents can be viewed and edited directly and
2163 straightforwardly with generic text editors or (for images composed of
2164 pixels) generic paint programs or (for drawings) some widely available
2165 drawing editor, and that is suitable for input to text formatters or
2166 for automatic translation to a variety of formats suitable for input
2167 to text formatters. A copy made in an otherwise Transparent file
2168 format whose markup has been designed to thwart or discourage
2169 subsequent modification by readers is not Transparent. A copy that is
2170 not "Transparent" is called "Opaque".
2172 Examples of suitable formats for Transparent copies include plain
2173 ASCII without markup, Texinfo input format, LaTeX input format, SGML
2174 or XML using a publicly available DTD, and standard-conforming simple
2175 HTML designed for human modification. Opaque formats include
2176 PostScript, PDF, proprietary formats that can be read and edited only
2177 by proprietary word processors, SGML or XML for which the DTD and/or
2178 processing tools are not generally available, and the
2179 machine-generated HTML produced by some word processors for output
2182 The "Title Page" means, for a printed book, the title page itself,
2183 plus such following pages as are needed to hold, legibly, the material
2184 this License requires to appear in the title page. For works in
2185 formats which do not have any title page as such, "Title Page" means
2186 the text near the most prominent appearance of the work's title,
2187 preceding the beginning of the body of the text.
2192 You may copy and distribute the Document in any medium, either
2193 commercially or noncommercially, provided that this License, the
2194 copyright notices, and the license notice saying this License applies
2195 to the Document are reproduced in all copies, and that you add no other
2196 conditions whatsoever to those of this License. You may not use
2197 technical measures to obstruct or control the reading or further
2198 copying of the copies you make or distribute. However, you may accept
2199 compensation in exchange for copies. If you distribute a large enough
2200 number of copies you must also follow the conditions in section 3.
2202 You may also lend copies, under the same conditions stated above, and
2203 you may publicly display copies.
2206 3. COPYING IN QUANTITY
2208 If you publish printed copies of the Document numbering more than 100,
2209 and the Document's license notice requires Cover Texts, you must enclose
2210 the copies in covers that carry, clearly and legibly, all these Cover
2211 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
2212 the back cover. Both covers must also clearly and legibly identify
2213 you as the publisher of these copies. The front cover must present
2214 the full title with all words of the title equally prominent and
2215 visible. You may add other material on the covers in addition.
2216 Copying with changes limited to the covers, as long as they preserve
2217 the title of the Document and satisfy these conditions, can be treated
2218 as verbatim copying in other respects.
2220 If the required texts for either cover are too voluminous to fit
2221 legibly, you should put the first ones listed (as many as fit
2222 reasonably) on the actual cover, and continue the rest onto adjacent
2225 If you publish or distribute Opaque copies of the Document numbering
2226 more than 100, you must either include a machine-readable Transparent
2227 copy along with each Opaque copy, or state in or with each Opaque copy
2228 a publicly-accessible computer-network location containing a complete
2229 Transparent copy of the Document, free of added material, which the
2230 general network-using public has access to download anonymously at no
2231 charge using public-standard network protocols. If you use the latter
2232 option, you must take reasonably prudent steps, when you begin
2233 distribution of Opaque copies in quantity, to ensure that this
2234 Transparent copy will remain thus accessible at the stated location
2235 until at least one year after the last time you distribute an Opaque
2236 copy (directly or through your agents or retailers) of that edition to
2239 It is requested, but not required, that you contact the authors of the
2240 Document well before redistributing any large number of copies, to give
2241 them a chance to provide you with an updated version of the Document.
2246 You may copy and distribute a Modified Version of the Document under
2247 the conditions of sections 2 and 3 above, provided that you release
2248 the Modified Version under precisely this License, with the Modified
2249 Version filling the role of the Document, thus licensing distribution
2250 and modification of the Modified Version to whoever possesses a copy
2251 of it. In addition, you must do these things in the Modified Version:
2253 A. Use in the Title Page (and on the covers, if any) a title distinct
2254 from that of the Document, and from those of previous versions
2255 (which should, if there were any, be listed in the History section
2256 of the Document). You may use the same title as a previous version
2257 if the original publisher of that version gives permission.
2258 B. List on the Title Page, as authors, one or more persons or entities
2259 responsible for authorship of the modifications in the Modified
2260 Version, together with at least five of the principal authors of the
2261 Document (all of its principal authors, if it has less than five).
2262 C. State on the Title page the name of the publisher of the
2263 Modified Version, as the publisher.
2264 D. Preserve all the copyright notices of the Document.
2265 E. Add an appropriate copyright notice for your modifications
2266 adjacent to the other copyright notices.
2267 F. Include, immediately after the copyright notices, a license notice
2268 giving the public permission to use the Modified Version under the
2269 terms of this License, in the form shown in the Addendum below.
2270 G. Preserve in that license notice the full lists of Invariant Sections
2271 and required Cover Texts given in the Document's license notice.
2272 H. Include an unaltered copy of this License.
2273 I. Preserve the section entitled "History", and its title, and add to
2274 it an item stating at least the title, year, new authors, and
2275 publisher of the Modified Version as given on the Title Page. If
2276 there is no section entitled "History" in the Document, create one
2277 stating the title, year, authors, and publisher of the Document as
2278 given on its Title Page, then add an item describing the Modified
2279 Version as stated in the previous sentence.
2280 J. Preserve the network location, if any, given in the Document for
2281 public access to a Transparent copy of the Document, and likewise
2282 the network locations given in the Document for previous versions
2283 it was based on. These may be placed in the "History" section.
2284 You may omit a network location for a work that was published at
2285 least four years before the Document itself, or if the original
2286 publisher of the version it refers to gives permission.
2287 K. In any section entitled "Acknowledgements" or "Dedications",
2288 preserve the section's title, and preserve in the section all the
2289 substance and tone of each of the contributor acknowledgements
2290 and/or dedications given therein.
2291 L. Preserve all the Invariant Sections of the Document,
2292 unaltered in their text and in their titles. Section numbers
2293 or the equivalent are not considered part of the section titles.
2294 M. Delete any section entitled "Endorsements". Such a section
2295 may not be included in the Modified Version.
2296 N. Do not retitle any existing section as "Endorsements"
2297 or to conflict in title with any Invariant Section.
2299 If the Modified Version includes new front-matter sections or
2300 appendices that qualify as Secondary Sections and contain no material
2301 copied from the Document, you may at your option designate some or all
2302 of these sections as invariant. To do this, add their titles to the
2303 list of Invariant Sections in the Modified Version's license notice.
2304 These titles must be distinct from any other section titles.
2306 You may add a section entitled "Endorsements", provided it contains
2307 nothing but endorsements of your Modified Version by various
2308 parties--for example, statements of peer review or that the text has
2309 been approved by an organization as the authoritative definition of a
2312 You may add a passage of up to five words as a Front-Cover Text, and a
2313 passage of up to 25 words as a Back-Cover Text, to the end of the list
2314 of Cover Texts in the Modified Version. Only one passage of
2315 Front-Cover Text and one of Back-Cover Text may be added by (or
2316 through arrangements made by) any one entity. If the Document already
2317 includes a cover text for the same cover, previously added by you or
2318 by arrangement made by the same entity you are acting on behalf of,
2319 you may not add another; but you may replace the old one, on explicit
2320 permission from the previous publisher that added the old one.
2322 The author(s) and publisher(s) of the Document do not by this License
2323 give permission to use their names for publicity for or to assert or
2324 imply endorsement of any Modified Version.
2327 5. COMBINING DOCUMENTS
2329 You may combine the Document with other documents released under this
2330 License, under the terms defined in section 4 above for modified
2331 versions, provided that you include in the combination all of the
2332 Invariant Sections of all of the original documents, unmodified, and
2333 list them all as Invariant Sections of your combined work in its
2336 The combined work need only contain one copy of this License, and
2337 multiple identical Invariant Sections may be replaced with a single
2338 copy. If there are multiple Invariant Sections with the same name but
2339 different contents, make the title of each such section unique by
2340 adding at the end of it, in parentheses, the name of the original
2341 author or publisher of that section if known, or else a unique number.
2342 Make the same adjustment to the section titles in the list of
2343 Invariant Sections in the license notice of the combined work.
2345 In the combination, you must combine any sections entitled "History"
2346 in the various original documents, forming one section entitled
2347 "History"; likewise combine any sections entitled "Acknowledgements",
2348 and any sections entitled "Dedications". You must delete all sections
2349 entitled "Endorsements."
2352 6. COLLECTIONS OF DOCUMENTS
2354 You may make a collection consisting of the Document and other documents
2355 released under this License, and replace the individual copies of this
2356 License in the various documents with a single copy that is included in
2357 the collection, provided that you follow the rules of this License for
2358 verbatim copying of each of the documents in all other respects.
2360 You may extract a single document from such a collection, and distribute
2361 it individually under this License, provided you insert a copy of this
2362 License into the extracted document, and follow this License in all
2363 other respects regarding verbatim copying of that document.
2366 7. AGGREGATION WITH INDEPENDENT WORKS
2368 A compilation of the Document or its derivatives with other separate
2369 and independent documents or works, in or on a volume of a storage or
2370 distribution medium, does not as a whole count as a Modified Version
2371 of the Document, provided no compilation copyright is claimed for the
2372 compilation. Such a compilation is called an "aggregate", and this
2373 License does not apply to the other self-contained works thus compiled
2374 with the Document, on account of their being thus compiled, if they
2375 are not themselves derivative works of the Document.
2377 If the Cover Text requirement of section 3 is applicable to these
2378 copies of the Document, then if the Document is less than one quarter
2379 of the entire aggregate, the Document's Cover Texts may be placed on
2380 covers that surround only the Document within the aggregate.
2381 Otherwise they must appear on covers around the whole aggregate.
2386 Translation is considered a kind of modification, so you may
2387 distribute translations of the Document under the terms of section 4.
2388 Replacing Invariant Sections with translations requires special
2389 permission from their copyright holders, but you may include
2390 translations of some or all Invariant Sections in addition to the
2391 original versions of these Invariant Sections. You may include a
2392 translation of this License provided that you also include the
2393 original English version of this License. In case of a disagreement
2394 between the translation and the original English version of this
2395 License, the original English version will prevail.
2400 You may not copy, modify, sublicense, or distribute the Document except
2401 as expressly provided for under this License. Any other attempt to
2402 copy, modify, sublicense or distribute the Document is void, and will
2403 automatically terminate your rights under this License. However,
2404 parties who have received copies, or rights, from you under this
2405 License will not have their licenses terminated so long as such
2406 parties remain in full compliance.
2409 10. FUTURE REVISIONS OF THIS LICENSE
2411 The Free Software Foundation may publish new, revised versions
2412 of the GNU Free Documentation License from time to time. Such new
2413 versions will be similar in spirit to the present version, but may
2414 differ in detail to address new problems or concerns. See
2415 http://www.gnu.org/copyleft/.
2417 Each version of the License is given a distinguishing version number.
2418 If the Document specifies that a particular numbered version of this
2419 License "or any later version" applies to it, you have the option of
2420 following the terms and conditions either of that specified version or
2421 of any later version that has been published (not as a draft) by the
2422 Free Software Foundation. If the Document does not specify a version
2423 number of this License, you may choose any version ever published (not
2424 as a draft) by the Free Software Foundation.
2427 ADDENDUM: How to use this License for your documents
2429 To use this License in a document you have written, include a copy of
2430 the License in the document and put the following copyright and
2431 license notices just after the title page:
2433 Copyright (c) YEAR YOUR NAME.
2434 Permission is granted to copy, distribute and/or modify this document
2435 under the terms of the GNU Free Documentation License, Version 1.1
2436 or any later version published by the Free Software Foundation;
2437 with the Invariant Sections being LIST THEIR TITLES, with the
2438 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
2439 A copy of the license is included in the section entitled "GNU
2440 Free Documentation License".
2442 If you have no Invariant Sections, write "with no Invariant Sections"
2443 instead of saying which ones are invariant. If you have no
2444 Front-Cover Texts, write "no Front-Cover Texts" instead of
2445 "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
2447 If your document contains nontrivial examples of program code, we
2448 recommend releasing these examples in parallel under your choice of
2449 free software license, such as the GNU General Public License,
2450 to permit their use in free software.
2452 Artistic => <<'---',
2453 The Clarified Artistic License
2457 The intent of this document is to state the conditions under which a
2458 Package may be copied, such that the Copyright Holder maintains some
2459 semblance of artistic control over the development of the package,
2460 while giving the users of the package the right to use and distribute
2461 the Package in a more-or-less customary fashion, plus the right to make
2462 reasonable modifications.
2466 "Package" refers to the collection of files distributed by the
2467 Copyright Holder, and derivatives of that collection of files
2468 created through textual modification.
2470 "Standard Version" refers to such a Package if it has not been
2471 modified, or has been modified in accordance with the wishes
2472 of the Copyright Holder as specified below.
2474 "Copyright Holder" is whoever is named in the copyright or
2475 copyrights for the package.
2477 "You" is you, if you're thinking about copying or distributing
2480 "Distribution fee" is a fee you charge for providing a copy
2481 of this Package to another party.
2483 "Freely Available" means that no fee is charged for the right to
2484 use the item, though there may be fees involved in handling the
2485 item. It also means that recipients of the item may redistribute
2486 it under the same conditions they received it.
2488 1. You may make and give away verbatim copies of the source form of the
2489 Standard Version of this Package without restriction, provided that you
2490 duplicate all of the original copyright notices and associated disclaimers.
2492 2. You may apply bug fixes, portability fixes and other modifications
2493 derived from the Public Domain, or those made Freely Available, or from
2494 the Copyright Holder. A Package modified in such a way shall still be
2495 considered the Standard Version.
2497 3. You may otherwise modify your copy of this Package in any way, provided
2498 that you insert a prominent notice in each changed file stating how and
2499 when you changed that file, and provided that you do at least ONE of the
2502 a) place your modifications in the Public Domain or otherwise make them
2503 Freely Available, such as by posting said modifications to Usenet or an
2504 equivalent medium, or placing the modifications on a major network
2505 archive site allowing unrestricted access to them, or by allowing the
2506 Copyright Holder to include your modifications in the Standard Version
2509 b) use the modified Package only within your corporation or organization.
2511 c) rename any non-standard executables so the names do not conflict
2512 with standard executables, which must also be provided, and provide
2513 a separate manual page for each non-standard executable that clearly
2514 documents how it differs from the Standard Version.
2516 d) make other distribution arrangements with the Copyright Holder.
2518 e) permit and encourge anyone who receives a copy of the modified Package
2519 permission to make your modifications Freely Available
2520 in some specific way.
2523 4. You may distribute the programs of this Package in object code or
2524 executable form, provided that you do at least ONE of the following:
2526 a) distribute a Standard Version of the executables and library files,
2527 together with instructions (in the manual page or equivalent) on where
2528 to get the Standard Version.
2530 b) accompany the distribution with the machine-readable source of
2531 the Package with your modifications.
2533 c) give non-standard executables non-standard names, and clearly
2534 document the differences in manual pages (or equivalent), together
2535 with instructions on where to get the Standard Version.
2537 d) make other distribution arrangements with the Copyright Holder.
2539 e) offer the machine-readable source of the Package, with your
2540 modifications, by mail order.
2542 5. You may charge a distribution fee for any distribution of this Package.
2543 If you offer support for this Package, you may charge any fee you choose
2544 for that support. You may not charge a license fee for the right to use
2545 this Package itself. You may distribute this Package in aggregate with
2546 other (possibly commercial and possibly nonfree) programs as part of a
2547 larger (possibly commercial and possibly nonfree) software distribution,
2548 and charge license fees for other parts of that software distribution,
2549 provided that you do not advertise this Package as a product of your own.
2550 If the Package includes an interpreter, You may embed this Package's
2551 interpreter within an executable of yours (by linking); this shall be
2552 construed as a mere form of aggregation, provided that the complete
2553 Standard Version of the interpreter is so embedded.
2555 6. The scripts and library files supplied as input to or produced as
2556 output from the programs of this Package do not automatically fall
2557 under the copyright of this Package, but belong to whoever generated
2558 them, and may be sold commercially, and may be aggregated with this
2559 Package. If such scripts or library files are aggregated with this
2560 Package via the so-called "undump" or "unexec" methods of producing a
2561 binary executable image, then distribution of such an image shall
2562 neither be construed as a distribution of this Package nor shall it
2563 fall under the restrictions of Paragraphs 3 and 4, provided that you do
2564 not represent such an executable image as a Standard Version of this
2567 7. C subroutines (or comparably compiled subroutines in other
2568 languages) supplied by you and linked into this Package in order to
2569 emulate subroutines and variables of the language defined by this
2570 Package shall not be considered part of this Package, but are the
2571 equivalent of input as in Paragraph 6, provided these subroutines do
2572 not change the language in any way that would cause it to fail the
2573 regression tests for the language.
2575 8. Aggregation of the Standard Version of the Package with a commercial
2576 distribution is always permitted provided that the use of this Package
2577 is embedded; that is, when no overt attempt is made to make this Package's
2578 interfaces visible to the end user of the commercial distribution.
2579 Such use shall not be construed as a distribution of this Package.
2581 9. The name of the Copyright Holder may not be used to endorse or promote
2582 products derived from this software without specific prior written permission.
2584 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
2585 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
2586 WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.