clamsy 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/.gitignore +1 -0
  2. data/HISTORY.txt +10 -0
  3. data/README.rdoc +7 -63
  4. data/Rakefile +27 -2
  5. data/VERSION +1 -1
  6. data/clamsy.gemspec +77 -8
  7. data/examples/create_many.rb +15 -0
  8. data/examples/create_one.rb +15 -0
  9. data/examples/data/context.rb +41 -0
  10. data/examples/data/contexts.rb +2 -0
  11. data/examples/data/school_logo.jpg +0 -0
  12. data/examples/data/staff_signature.gif +0 -0
  13. data/examples/data/student_offer_letter.odt +0 -0
  14. data/lib/clamsy.rb +7 -2
  15. data/lib/clamsy.yml +32 -6
  16. data/lib/clamsy/base_printer.rb +10 -1
  17. data/lib/clamsy/configuration.rb +57 -10
  18. data/lib/clamsy/cups_pdf_printer.rb +3 -5
  19. data/lib/clamsy/file_system_support.rb +3 -3
  20. data/lib/clamsy/jod_converter_printer.rb +60 -0
  21. data/lib/clamsy/template_open_doc.rb +7 -1
  22. data/lib/jodconverter/CREDIT +1 -0
  23. data/lib/jodconverter/LICENSE.txt +504 -0
  24. data/lib/jodconverter/README.txt +58 -0
  25. data/lib/jodconverter/commons-cli-1.2.jar +0 -0
  26. data/lib/jodconverter/commons-io-1.4.jar +0 -0
  27. data/lib/jodconverter/jodconverter-2.2.2.jar +0 -0
  28. data/lib/jodconverter/jodconverter-cli-2.2.2.jar +0 -0
  29. data/lib/jodconverter/juh-3.0.1.jar +0 -0
  30. data/lib/jodconverter/jurt-3.0.1.jar +0 -0
  31. data/lib/jodconverter/ridl-3.0.1.jar +0 -0
  32. data/lib/jodconverter/slf4j-api-1.5.6.jar +0 -0
  33. data/lib/jodconverter/slf4j-jdk14-1.5.6.jar +0 -0
  34. data/lib/jodconverter/unoil-3.0.1.jar +0 -0
  35. data/lib/jodconverter/xstream-1.3.1.jar +0 -0
  36. data/spec/clamsy/configuration_spec.rb +323 -163
  37. data/spec/clamsy/cups_pdf_printer_spec.rb +1 -1
  38. data/spec/clamsy/invalid_printer_spec.rb +0 -4
  39. data/spec/clamsy/jod_converter_printer_spec.rb +58 -0
  40. data/spec/fake_ooffice_server.rb +18 -0
  41. data/spec/integration/cups_pdf_printer_spec.rb +4 -59
  42. data/spec/integration/has_integration_support_shared_spec.rb +85 -0
  43. data/spec/integration/jod_converter_printer_spec.rb +12 -0
  44. data/spec/pdfc/CCLib.jar +0 -0
  45. data/spec/pdfc/CREDIT +2 -0
  46. data/spec/pdfc/PDFC.bat +1 -0
  47. data/spec/pdfc/PDFC.jar +0 -0
  48. data/spec/pdfc/PDFC.sh +3 -0
  49. data/spec/pdfc/PDFParser.jar +0 -0
  50. data/spec/pdfc/config.xml +24 -0
  51. data/spec/pdfc/license/LICENSE.log4j +48 -0
  52. data/spec/pdfc/license/lgpl-3.0.txt +165 -0
  53. data/spec/pdfc/license/overview.txt +9 -0
  54. data/spec/pdfc/log4j-1.2.15.jar +0 -0
  55. data/spec/pdfc/readme.txt +89 -0
  56. data/spec/spec_helper.rb +28 -11
  57. metadata +87 -8
  58. data/spec/integration/has_stardand_integration_support_shared_spec.rb +0 -27
@@ -31,7 +31,7 @@ describe 'Cups pdf printer' do
31
31
 
32
32
  should "use config.cups_output_dir, basename of specified file & pdf file extension" do
33
33
  @printer.config.cups_output_dir = '/a/b/c'
34
- @printer.tmp_pdf_path('/e/f/g/document').should.equal '/a/b/c/document.pdf'
34
+ @printer.tmp_pdf_path('/e/f/g/document.odt').should.equal '/a/b/c/document.pdf'
35
35
  end
36
36
 
37
37
  end
@@ -5,16 +5,12 @@ class InvalidPrinter < Clamsy::BasePrinter ; end
5
5
  describe 'Invalid printer' do
6
6
 
7
7
  describe '> converting docs to pdf' do
8
-
9
- behaves_like 'has standard files support'
10
-
11
8
  it 'should raise Clamsy::ImplementationNotFoundError' do
12
9
  tmp_doc = tmp_file('doc')
13
10
  lambda { InvalidPrinter.docs_to_pdf([tmp_doc], "#{__FILE__}.pdf") }.
14
11
  should.raise(Clamsy::ImplementationNotFoundError).
15
12
  message.should.equal("InvalidPrinter.doc_to_pdf not implemented.")
16
13
  end
17
-
18
14
  end
19
15
 
20
16
  end
@@ -0,0 +1,58 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+ require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'clamsy', 'jod_converter_printer')
3
+
4
+ class << Clamsy::JODConverterPrinter
5
+ public :ooffice_server_must_be_running!, :ooffice_server_port, :run_ooffice_server
6
+ attr_accessor :config
7
+ end
8
+
9
+ describe 'JODConverter printer' do
10
+
11
+ before do
12
+ @printer = Clamsy::JODConverterPrinter
13
+ @printer.config = Class.new { attr_accessor :ooffice_server_args, :ooffice_bin }.new
14
+ @ooffice_server_port = '89999' # see <PROJECT_ROOT>/spec/fake_ooffice_server.rb
15
+ end
16
+
17
+ describe '> determining ooffice server port' do
18
+ should 'grab port number from config.ooffice_server_args' do
19
+ @printer.config.ooffice_server_args = %\-headless -nofirststartwizard -accept="\ +
20
+ %\socket,host=localhost,port=#{@ooffice_server_port};urp;StarOffice.Service"\
21
+ @printer.ooffice_server_port.should.equal @ooffice_server_port
22
+ end
23
+ end
24
+
25
+ describe '> running ooffice server' do
26
+
27
+ before do
28
+ $ooffice_server_port = @ooffice_server_port
29
+ @pid_file = tmp_file('fake_ooffice_server.pid').path
30
+ @printer.config.ooffice_bin = File.join(CLAMSY_SPEC_DIR, 'fake_ooffice_server.rb')
31
+ class << @printer
32
+ alias_method :orig_ooffice_server_port, :ooffice_server_port
33
+ def ooffice_server_port ; $ooffice_server_port ; end
34
+ end
35
+ end
36
+
37
+ after do
38
+ pid = IO.read(@pid_file).to_i rescue 0
39
+ Process.kill('SIGHUP', pid) unless pid.zero?
40
+ trash_tmp_files
41
+ class << @printer
42
+ alias_method :ooffice_server_port, :orig_ooffice_server_port
43
+ end
44
+ end
45
+
46
+ should 'start ooffice server binding to specified server port' do
47
+ @printer.config.ooffice_server_args = "spawn #{@ooffice_server_port} #{@pid_file}"
48
+ lambda { @printer.run_ooffice_server }.should.not.raise(Clamsy::OofficeServerNotStartedError)
49
+ end
50
+
51
+ should 'raise Clamsy::OofficeServerNotStartedError if ooffice server is not running' do
52
+ @printer.config.ooffice_server_args = "no #{@ooffice_server_port} #{@pid_file}"
53
+ lambda { @printer.run_ooffice_server }.should.raise(Clamsy::OofficeServerNotStartedError)
54
+ end
55
+ end
56
+
57
+ end
58
+
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'eventmachine'
4
+
5
+ run_mode, server_port, pid_file = ARGV[0..2]
6
+
7
+ case run_mode
8
+ when 'yes'
9
+ EventMachine::run do
10
+ EventMachine::start_server("0.0.0.0", server_port, Module.new {
11
+ def receive_data (data) ; send_data "printed" ; end
12
+ })
13
+ end
14
+ when 'spawn'
15
+ process = IO.popen("#{__FILE__} yes #{server_port}")
16
+ File.open(pid_file,'w') {|fh| fh.write(process.pid) }
17
+ sleep 2
18
+ end
@@ -1,69 +1,14 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
- require File.join(File.dirname(__FILE__), 'has_stardand_integration_support_shared_spec')
2
+ require File.join(File.dirname(__FILE__), 'has_integration_support_shared_spec')
3
3
 
4
4
  describe "Clamsy (using Cups-PDF printer)" do
5
5
 
6
- behaves_like 'has standard files support'
7
- behaves_like 'has standard integration support'
8
-
9
6
  before do
10
- @check_processing_yields_content = lambda do |contexts, example|
11
- generated_pdf = tmp_file('clamsy_pdf').path
12
- Clamsy.process(contexts, template_doc(example), generated_pdf)
13
- `cp #{generated_pdf} /tmp/abc.pdf`
14
- expected_content = comparable_content(expected_pdf(example))
15
- generated_content = comparable_content(generated_pdf)
16
- generated_content.size.should.equal expected_content.size
17
- (generated_content - expected_content).should.equal []
7
+ Clamsy.configure do |config|
8
+ config.printer = 'cups_pdf'
18
9
  end
19
10
  end
20
11
 
21
- after do
22
- trash_tmp_files
23
- end
24
-
25
- it 'should do picture replacement for pictures with matching names' do
26
- @check_processing_yields_content[
27
- context = {:_pictures => {
28
- :sunny_clamsy => data_file('norm_clamsy.png'),
29
- :norm_clamsy => data_file('sunny_clamsy.png'),
30
- }},
31
- example = :picture
32
- ]
33
- end
34
-
35
- it 'should do #{...} plain text replacement' do
36
- @check_processing_yields_content[
37
- context = {:someone => 'Peter', :mood => 'Happy'},
38
- example = :plain_text
39
- ]
40
- end
41
-
42
- it 'should do ${...} escaped (santized) replacement' do
43
- @check_processing_yields_content[
44
- context = {:someone => '<Peter>', :mood => '<Happy>'},
45
- example = :escaped_text
46
- ]
47
- end
48
-
49
- it 'should do {? ... ?} embedded ruby statements processing' do
50
- @someone = Class.new do
51
- attr_reader :name, :mood
52
- def initialize(name, mood)
53
- @name, @mood = name, mood
54
- end
55
- end
56
- @check_processing_yields_content[
57
- context = {:everyone => [@someone.new('Peter','Happy'), @someone.new('Jane','Sad')]},
58
- example = :embedded_ruby
59
- ]
60
- end
61
-
62
- it 'should concat multiple contexts processing to a single pdf' do
63
- @check_processing_yields_content[
64
- contexts = [{:someone => 'Peter', :mood => 'Happy'}, {:someone => 'Jane', :mood => 'Sad'}],
65
- example = :multiple_contexts
66
- ]
67
- end
12
+ behaves_like 'has integration support'
68
13
 
69
14
  end
@@ -0,0 +1,85 @@
1
+ shared 'has integration support' do
2
+ class << self
3
+
4
+ INSIGNIFICANT_AND_UNMATCHABLE_PATTERNS = [
5
+ /^q\[\-?\d+\.?\d*( \-?\d+\.?\d*){5}\]concat\n$/,
6
+ /^\d+\.?\d*( \d+\.?\d*){3} re\n$/
7
+ ]
8
+
9
+ def data_file(file)
10
+ File.join(File.dirname(__FILE__), 'data', file)
11
+ end
12
+
13
+ def template_doc(name)
14
+ data_file("#{name}_example.odt")
15
+ end
16
+
17
+ def expected_pdf(name)
18
+ data_file("#{name}_example.pdf")
19
+ end
20
+
21
+ def comparable_content(file)
22
+ RGhost::Convert.new(file).to(:ps).read.grep(/^[^%][^%]?/).
23
+ reject {|line| INSIGNIFICANT_AND_UNMATCHABLE_PATTERNS.any? {|regexp| regexp =~ line } }
24
+ end
25
+
26
+ end
27
+
28
+ before do
29
+ @check_processing_yields_content = lambda do |contexts, example|
30
+ generated_pdf = tmp_file('clamsy_pdf').path
31
+ Clamsy.process(contexts, template_doc(example), generated_pdf)
32
+ (diff_result = `#{CLAMSY_PDFC_SCRIPT} #{expected_pdf(example)} #{generated_pdf}`).
33
+ split("\n").join('').should.match(/(| # of Differences).*(------------------).*(| 0)$/)
34
+ end
35
+ end
36
+
37
+ after do
38
+ trash_tmp_files
39
+ end
40
+
41
+ it 'should do picture replacement for pictures with matching names' do
42
+ @check_processing_yields_content[
43
+ context = {:_pictures => {
44
+ :sunny_clamsy => data_file('norm_clamsy.png'),
45
+ :norm_clamsy => data_file('sunny_clamsy.png'),
46
+ }},
47
+ example = :picture
48
+ ]
49
+ end
50
+
51
+ it 'should do #{...} plain text replacement' do
52
+ @check_processing_yields_content[
53
+ context = {:someone => 'Peter', :mood => 'Happy'},
54
+ example = :plain_text
55
+ ]
56
+ end
57
+
58
+ it 'should do ${...} escaped (santized) replacement' do
59
+ @check_processing_yields_content[
60
+ context = {:someone => '<Peter>', :mood => '<Happy>'},
61
+ example = :escaped_text
62
+ ]
63
+ end
64
+
65
+ it 'should do {? ... ?} embedded ruby statements processing' do
66
+ @someone = Class.new do
67
+ attr_reader :name, :mood
68
+ def initialize(name, mood)
69
+ @name, @mood = name, mood
70
+ end
71
+ end
72
+ @check_processing_yields_content[
73
+ context = {:everyone => [@someone.new('Peter','Happy'), @someone.new('Jane','Sad')]},
74
+ example = :embedded_ruby
75
+ ]
76
+ end
77
+
78
+ it 'should concat multiple contexts processing to a single pdf' do
79
+ @check_processing_yields_content[
80
+ contexts = [{:someone => 'Peter', :mood => 'Happy'}, {:someone => 'Jane', :mood => 'Sad'}],
81
+ example = :multiple_contexts
82
+ ]
83
+ end
84
+
85
+ end
@@ -0,0 +1,12 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+ require File.join(File.dirname(__FILE__), 'has_integration_support_shared_spec')
3
+
4
+ describe "Clamsy (using JODConverter printer)" do
5
+
6
+ before do
7
+ Clamsy.configure {|config| config.printer = 'jod_converter' }
8
+ end
9
+
10
+ behaves_like 'has integration support'
11
+
12
+ end
Binary file
@@ -0,0 +1,2 @@
1
+ PDFC is a great tool provided by:
2
+ http://www.inetsoftware.de/other-products/pdf-content-comparer
@@ -0,0 +1 @@
1
+ java -cp CCLib.jar;.;log4j-1.2.15.jar;PDFC.jar;PDFParser.jar com.inet.pdfc.PDFC %1 %2 %3 %4 %5 %6 %7
Binary file
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ DIR=`dirname $0`
3
+ java -cp ${DIR}/CCLib.jar:${DIR}/log4j-1.2.15.jar:${DIR}/PDFC.jar:${DIR}/PDFParser.jar com.inet.pdfc.PDFC $@
Binary file
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
3
+ <properties>
4
+ <entry key="CHART_DENSITY_THRESHOLD">2.5</entry>
5
+ <entry key="TOLERANCE_LINE_POSITION">3</entry>
6
+ <entry key="TOLERANCE_LINE_STYLE">false</entry>
7
+ <entry key="CREATE_DIFFIMAGES">false</entry>
8
+ <entry key="CREATE_DIFFIMAGES">true</entry>
9
+ <entry key="NORMALIZERS">NORMALIZER_MARGIN, CHART_REMOVAL, NORMALIZER_CLIP</entry>
10
+ <entry key="TOLERANCE_PAGE_SIZE">2</entry>
11
+ <entry key="TOLERANCE_IMAGE_DISTANCE">3</entry>
12
+ <entry key="CHART_REMOVAL_MARGIN">0.3</entry>
13
+ <entry key="CREATE_ORIGIMAGES">false</entry>
14
+ <entry key="TOLERANCE_PAGE_RATIO">0.1</entry>
15
+ <entry key="MODULES">MODULE_TESTMOD, MODULE_IMAGE, MODULE_PAGEPROPERTIES, MODULE_LINES, MODULE_TEXT_WORDORDER</entry>
16
+ <entry key="TOLERANCE_LINE_SIZE">2</entry>
17
+ <entry key="TOLERANCE_IMAGE_SIZE">0.1</entry>
18
+ <entry key="TOLERANCE_UNDERLINE_LENGTH">0.1</entry>
19
+ <entry key="LOG_LEVEL">INFO</entry>
20
+ <entry key="MAX_ERRORS_PER_REPORT">10</entry>
21
+ <entry key="TOLERANCE_PAGE_LEFTCORNER">3</entry>
22
+ <entry key="TOLERANCE_BOX_ROUND_EDGES">3</entry>
23
+ <entry key="TOLERANCE_LINE_THICKNESS">1</entry>
24
+ </properties>
@@ -0,0 +1,48 @@
1
+ /*
2
+ * ============================================================================
3
+ * The Apache Software License, Version 1.1
4
+ * ============================================================================
5
+ *
6
+ * Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without modifica-
9
+ * tion, are permitted provided that the following conditions are met:
10
+ *
11
+ * 1. Redistributions of source code must retain the above copyright notice,
12
+ * this list of conditions and the following disclaimer.
13
+ *
14
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
15
+ * this list of conditions and the following disclaimer in the documentation
16
+ * and/or other materials provided with the distribution.
17
+ *
18
+ * 3. The end-user documentation included with the redistribution, if any, must
19
+ * include the following acknowledgment: "This product includes software
20
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
21
+ * Alternately, this acknowledgment may appear in the software itself, if
22
+ * and wherever such third-party acknowledgments normally appear.
23
+ *
24
+ * 4. The names "log4j" and "Apache Software Foundation" must not be used to
25
+ * endorse or promote products derived from this software without prior
26
+ * written permission. For written permission, please contact
27
+ * apache@apache.org.
28
+ *
29
+ * 5. Products derived from this software may not be called "Apache", nor may
30
+ * "Apache" appear in their name, without prior written permission of the
31
+ * Apache Software Foundation.
32
+ *
33
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
34
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
35
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
36
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
37
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
38
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
39
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
40
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
42
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
+ *
44
+ * This software consists of voluntary contributions made by many individuals
45
+ * on behalf of the Apache Software Foundation. For more information on the
46
+ * Apache Software Foundation, please see <http://www.apache.org/>.
47
+ *
48
+ */
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.