cairo 1.12.6 → 1.12.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fae70100e39242041d0a85fcea2e692adebcba79
4
+ data.tar.gz: 596c203dd489a9ba6ed4d4f053407ac4578da54a
5
+ SHA512:
6
+ metadata.gz: 2c5b31f8145784ecc66c37d4f53e7acb4a843b9add48589a75ab99ee5cd7f11bb0d5872ee05d3463770c5cd3b47c63c9f991491cf771a715ea94875f428e8c6f
7
+ data.tar.gz: d40b8a4b10ee23c5f04b0ada21e812a22cfc7bd528f6e1a3ac83089244d32ddac0aba3e31d70f967d9a0d1e8384554fb2520cabfdb33017518a1516570ef3e15
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- mode: ruby; coding: utf-8 -*-
2
2
 
3
- source "http://rubygems.org/"
3
+ source "https://rubygems.org/"
4
4
 
5
5
  gemspec
data/NEWS CHANGED
@@ -1,3 +1,27 @@
1
+ Release 1.12.7 (2013-12-23) Kouhei Sutou <kou@cozmixng.org>
2
+ ===========================================================
3
+
4
+ Improvements
5
+ ------------
6
+
7
+ * Added paper sizes of ISO B series and JIS B series.
8
+ [Patch by 5.5]
9
+ * Added Windows binary for Ruby 2.1.0.
10
+ * Updated bundled cairo to 1.12.16 from 1.12.14 for Windows.
11
+
12
+ Fixes
13
+ -----
14
+
15
+ * Fixed a bug that Cairo::ImageSurface.new(cloned_data, ...)
16
+ changes both the original data and the cloned data.
17
+ [Patch by Naoyuki Hirayama]
18
+
19
+ Thanks
20
+ ------
21
+
22
+ * 5.5
23
+ * Naoyuki Hirayama
24
+
1
25
  Release 1.12.6 (2013-05-24) Kouhei Sutou <kou@cozmixng.org>
2
26
  ===========================================================
3
27
 
@@ -12,7 +12,7 @@ http://cairographics.org/
12
12
 
13
13
  == Dependencies
14
14
 
15
- * ruby >= 1.8 (1.9.2 also supported!)
15
+ * ruby >= 1.9.3 (2.0.0 also supported!)
16
16
  * cairo >= 1.2.0 (1.12.0 also supported!)
17
17
 
18
18
  == Install
data/Rakefile CHANGED
@@ -36,16 +36,27 @@ end
36
36
 
37
37
  binary_dir = File.join("vendor", "local")
38
38
  Rake::ExtensionTask.new("cairo", spec) do |ext|
39
+ ext.cross_platform = ["x86-mingw32"]
39
40
  ext.cross_compile = true
40
- ext.cross_compiling do |spec|
41
- if /mingw|mswin/ =~ spec.platform.to_s
41
+ ext.cross_compiling do |_spec|
42
+ if /mingw|mswin/ =~ _spec.platform.to_s
42
43
  binary_files = []
43
44
  Find.find(binary_dir) do |name|
44
45
  next unless File.file?(name)
45
46
  next if /\.zip\z/i =~ name
46
47
  binary_files << name
47
48
  end
48
- spec.files += binary_files
49
+ _spec.files += binary_files
50
+
51
+ stage_path = "#{ext.tmp_dir}/#{_spec.platform}/stage"
52
+ binary_files.each do |binary_file|
53
+ stage_binary_file = "#{stage_path}/#{binary_file}"
54
+ stage_binary_dir = File.dirname(stage_binary_file)
55
+ directory stage_binary_dir
56
+ file stage_binary_file => [stage_binary_dir, binary_file] do
57
+ cp(binary_file, stage_binary_file)
58
+ end
59
+ end
49
60
  end
50
61
  end
51
62
  end
@@ -158,10 +169,32 @@ class WindowsTask
158
169
 
159
170
  private
160
171
  def define_download_task
172
+ define_gcc_task
161
173
  define_source_download_task
162
174
  define_build_task
163
175
  end
164
176
 
177
+ def define_gcc_task
178
+ namespace :windows do
179
+ namespace :gcc do
180
+ namespace :dll do
181
+ desc "Bundle GCC related DLLs"
182
+ task :bundle do
183
+ dll_names = ["libgcc_s_sjlj-1.dll"]
184
+ dll_names.each do |dll_name|
185
+ cp(absolete_gcc_dll_path(dll_name), install_dir + "bin")
186
+ end
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+
193
+ def absolete_gcc_dll_path(dll_name)
194
+ build_host = @packages.first.windows.build_host
195
+ `#{build_host}-gcc -print-file-name=#{dll_name}`.strip
196
+ end
197
+
165
198
  def define_source_download_task
166
199
  namespace :source do
167
200
  tasks = []
@@ -175,7 +208,7 @@ class WindowsTask
175
208
 
176
209
  desc "Download #{package.name} source"
177
210
  task :download => archive_path.to_s
178
- tasks << (Rake.application.current_scope + ["download"]).join(":")
211
+ tasks << join_task_name(Rake.application.current_scope, "download")
179
212
  end
180
213
  end
181
214
  desc "Download sources"
@@ -212,15 +245,24 @@ class WindowsTask
212
245
 
213
246
  desc "Build #{package.label} package"
214
247
  task :build => built_file.to_s
215
- tasks << (Rake.application.current_scope + ["build"]).join(":")
248
+ tasks << join_task_name(Rake.application.current_scope, "build")
216
249
  end
217
250
  end
218
251
  desc "Build packages"
219
- task :build => tasks
252
+ task :build => ["windows:gcc:dll:bundle"] + tasks
253
+ end
254
+ end
255
+
256
+ def join_task_name(current_scope, task_name)
257
+ if Rake.const_defined?(:Scope)
258
+ current_scope.path_with_task_name(task_name)
259
+ else
260
+ (current_scope + [task_name]).join(":")
220
261
  end
221
262
  end
222
263
 
223
264
  def build(package)
265
+ ENV["PATH"] = ["#{install_dir}/bin", ENV["PATH"]].join(File::PATH_SEPARATOR)
224
266
  ENV["PKG_CONFIG_LIBDIR"] = "#{install_dir}/lib/pkgconfig"
225
267
  ENV["PKG_CONFIG_PATH"] = [
226
268
  ruby_glib2_pkg_config_path,
@@ -371,16 +413,16 @@ windows_task = WindowsTask.new(spec) do |task|
371
413
  },
372
414
  {
373
415
  :name => "libpng",
374
- :version => "1.6.2",
375
- :download_base_url => "http://sourceforge.net/projects/libpng/files/libpng16/1.6.2",
416
+ :version => "1.6.8",
417
+ :download_base_url => "http://sourceforge.net/projects/libpng/files/libpng16/1.6.8",
376
418
  :windows => {
377
419
  :built_file => "bin/libpng16-16.dll",
378
420
  },
379
421
  },
380
422
  {
381
423
  :name => "freetype",
382
- :version => "2.4.12",
383
- :download_base_url => "http://sourceforge.net/projects/freetype/files/freetype2/2.4.12",
424
+ :version => "2.5.2",
425
+ :download_base_url => "http://sourceforge.net/projects/freetype/files/freetype2/2.5.2",
384
426
  :compression_method => "bz2",
385
427
  :windows => {
386
428
  :built_file => "bin/libfreetype-6.dll",
@@ -400,7 +442,7 @@ windows_task = WindowsTask.new(spec) do |task|
400
442
  },
401
443
  {
402
444
  :name => "fontconfig",
403
- :version => "2.10.92",
445
+ :version => "2.11.0",
404
446
  :download_base_url => "http://www.freedesktop.org/software/fontconfig/release",
405
447
  :compression_method => "bz2",
406
448
  :windows => {
@@ -410,14 +452,15 @@ windows_task = WindowsTask.new(spec) do |task|
410
452
  "--disable-docs",
411
453
  ],
412
454
  :patches => [
413
- "fontconfig-2.10.92-disable-mktemp-s.diff",
455
+ "fontconfig-2.11.0-disable-mktemp-s.diff",
456
+ "fontconfig-2.11.0-disable-test.diff",
414
457
  ],
415
458
  :need_autoreconf => true,
416
459
  },
417
460
  },
418
461
  {
419
462
  :name => "pixman",
420
- :version => "0.30.0",
463
+ :version => "0.32.4",
421
464
  :download_site => :cairo,
422
465
  :compression_method => "gz",
423
466
  :windows => {
@@ -426,7 +469,7 @@ windows_task = WindowsTask.new(spec) do |task|
426
469
  },
427
470
  {
428
471
  :name => "cairo",
429
- :version => "1.12.14",
472
+ :version => "1.12.16",
430
473
  :download_site => :cairo,
431
474
  :windows => {
432
475
  :built_file => "bin/libcairo-2.dll",
@@ -73,7 +73,7 @@ RB_CAIRO_BEGIN_DECLS
73
73
 
74
74
  #define RB_CAIRO_VERSION_MAJOR 1
75
75
  #define RB_CAIRO_VERSION_MINOR 12
76
- #define RB_CAIRO_VERSION_MICRO 6
76
+ #define RB_CAIRO_VERSION_MICRO 7
77
77
 
78
78
  RB_CAIRO_VAR VALUE rb_mCairo;
79
79
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
@@ -935,6 +935,8 @@ cr_image_surface_create_for_data (VALUE self, VALUE rb_data, VALUE format,
935
935
  {
936
936
  unsigned char *data;
937
937
 
938
+ rb_data = StringValue (rb_data);
939
+ rb_str_modify (rb_data);
938
940
  data = (unsigned char *)StringValuePtr (rb_data);
939
941
 
940
942
  return cairo_image_surface_create_for_data (data,
@@ -15,6 +15,30 @@ module Cairo
15
15
  [37, 52, "A9"],
16
16
  [26, 37, "A10"],
17
17
 
18
+ [1000, 1414 , "ISO_B0"],
19
+ [707, 1000 , "ISO_B1"],
20
+ [500, 707 , "ISO_B2"],
21
+ [353, 500 , "ISO_B3"],
22
+ [250, 353 , "ISO_B4"],
23
+ [176, 250 , "ISO_B5"],
24
+ [125, 176 , "ISO_B6"],
25
+ [88, 125 , "ISO_B7"],
26
+ [62, 88 , "ISO_B8"],
27
+ [44, 62 , "ISO_B9"],
28
+ [31, 44 , "ISO_B10"],
29
+
30
+ [1030, 1456, "JIS_B0"],
31
+ [728, 1030, "JIS_B1"],
32
+ [515, 728, "JIS_B2"],
33
+ [364, 515, "JIS_B3"],
34
+ [257, 364, "JIS_B4"],
35
+ [182, 257, "JIS_B5"],
36
+ [128, 182, "JIS_B6"],
37
+ [91, 128, "JIS_B7"],
38
+ [64, 91, "JIS_B8"],
39
+ [45, 64, "JIS_B9"],
40
+ [32, 45, "JIS_B10"],
41
+
18
42
  [1030, 1456, "B0"],
19
43
  [728, 1030, "B1"],
20
44
  [515, 728, "B2"],
@@ -0,0 +1,28 @@
1
+ require 'cairo'
2
+
3
+ class ImageSurfaceTest < Test::Unit::TestCase
4
+ include CairoTestUtils
5
+
6
+ def test_cloned_data
7
+ width = 10
8
+ height = 10
9
+ original_surface = Cairo::ImageSurface.new(:a1, width, height)
10
+
11
+ original_data = original_surface.data
12
+ cloned_data = original_data.clone
13
+
14
+ cloned_surface = Cairo::ImageSurface.new(cloned_data,
15
+ :a1, width, height,
16
+ original_surface.stride)
17
+
18
+ Cairo::Context.new(cloned_surface) do |context|
19
+ context.set_source_rgb(255, 255, 255)
20
+ context.scale(width, height)
21
+ context.move_to(0, 0)
22
+ context.line_to(1, 1)
23
+ context.stroke
24
+ end
25
+
26
+ assert_not_equal(original_data, cloned_data)
27
+ end
28
+ end
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cairo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.6
5
- prerelease:
4
+ version: 1.12.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kouhei Sutou
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-24 00:00:00.000000000 Z
11
+ date: 2013-12-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: pkg-config
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: test-unit-notify
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake-compiler
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: packnga
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: Ruby bindings for cairo
@@ -179,33 +168,33 @@ files:
179
168
  - test/test_xml_surface.rb
180
169
  - test/test_exception.rb
181
170
  - test/test_text_cluster.rb
171
+ - test/test_image_surface.rb
182
172
  - test/test_color.rb
183
173
  - test/test_font_options.rb
184
174
  - test/test_constants.rb
185
175
  homepage: http://cairographics.org/rcairo
186
176
  licenses:
187
177
  - Ruby's
178
+ metadata: {}
188
179
  post_install_message:
189
180
  rdoc_options: []
190
181
  require_paths:
191
182
  - lib
192
183
  required_ruby_version: !ruby/object:Gem::Requirement
193
- none: false
194
184
  requirements:
195
- - - ! '>='
185
+ - - '>='
196
186
  - !ruby/object:Gem::Version
197
187
  version: '0'
198
188
  required_rubygems_version: !ruby/object:Gem::Requirement
199
- none: false
200
189
  requirements:
201
- - - ! '>='
190
+ - - '>='
202
191
  - !ruby/object:Gem::Version
203
192
  version: '0'
204
193
  requirements: []
205
194
  rubyforge_project: cairo
206
- rubygems_version: 1.8.23
195
+ rubygems_version: 2.0.14
207
196
  signing_key:
208
- specification_version: 3
197
+ specification_version: 4
209
198
  summary: Ruby bindings for cairo
210
199
  test_files:
211
200
  - test/test_surface.rb
@@ -228,6 +217,7 @@ test_files:
228
217
  - test/test_xml_surface.rb
229
218
  - test/test_exception.rb
230
219
  - test/test_text_cluster.rb
220
+ - test/test_image_surface.rb
231
221
  - test/test_color.rb
232
222
  - test/test_font_options.rb
233
223
  - test/test_constants.rb