cairo 1.16.1 → 1.16.2

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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +9 -0
  3. data/Rakefile +0 -530
  4. data/ext/cairo/rb_cairo.h +1 -1
  5. metadata +1 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c0295dcbda17d35f093e4b3f701e7b01adc508e6fc423474064e732dadc496c
4
- data.tar.gz: f616e14bac09b9603fcdca5a4f3e495a37e63f7950db7dae5ff13a4f3f71621e
3
+ metadata.gz: eac6096f7ad06e67fb313f0b9afdfcca2fbfe9fe4f8a3d7ae4e3de5d0d539ce6
4
+ data.tar.gz: 432ee21e533650fc59bb9ef65de42710b66f7493beedd2e0623ed65c1ab8f513
5
5
  SHA512:
6
- metadata.gz: 925042cfc8150d35aa49a495c92cae180748a286d96a78f5b9341921a6404eea61b3f8a2be5ac9142b70d00d87a501c0ae6a871a01ccf7c75f9c3cc20433b6fb
7
- data.tar.gz: 4d58be5e2c897efe578a4ccd10206b3fd0441d79c0fee4e9878a5d8387f2852a08137438b94e61c886538f99fdb9e1f97425b0643c87ce1160d165daf20cd420
6
+ metadata.gz: 3cbf91510b8febca95349591625e8f462c24492bf4f4f23be909a261d249d4ae582abda2f178098194a5d7bc14001318b0c322c7ddad02caffd3ba801f16fc5a
7
+ data.tar.gz: 8e867e4a005d7fce79a0a9604e6b9e2e614b5ac3d16a944ae188c79965af2da0522fbd7115bf32952c3cc9e6b8327417e778b156f056264833f17569a32158e3
data/NEWS CHANGED
@@ -1,3 +1,12 @@
1
+ Release 1.16.2 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
2
+ ============================================================
3
+
4
+ Improvements
5
+ ------------
6
+
7
+ * Stopped to provide fat gem for Windows. Windows users should use
8
+ MSYS2 packages.
9
+
1
10
  Release 1.16.1 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
2
11
  ============================================================
3
12
 
data/Rakefile CHANGED
@@ -9,7 +9,6 @@ require "rubygems"
9
9
  require "rubygems/package_task"
10
10
  require "yard"
11
11
  require "bundler/gem_helper"
12
- require "rake/extensiontask"
13
12
  require "packnga"
14
13
 
15
14
  base_dir = File.join(File.dirname(__FILE__))
@@ -24,10 +23,6 @@ helper = Bundler::GemHelper.new(base_dir)
24
23
  helper.install
25
24
  spec = helper.gemspec
26
25
 
27
- Gem::PackageTask.new(spec) do |pkg|
28
- pkg.need_tar_gz = true
29
- end
30
-
31
26
  Packnga::DocumentTask.new(spec) do |task|
32
27
  task.original_language = "en"
33
28
  task.translate_languages = ["ja"]
@@ -36,520 +31,6 @@ end
36
31
  Packnga::ReleaseTask.new(spec) do |task|
37
32
  end
38
33
 
39
- module RCairoBuild
40
- class << self
41
- def for_64bit?
42
- ENV["RCAIRO_WINDOWS_64"] == "yes"
43
- end
44
- end
45
- end
46
-
47
- binary_dir = File.join("vendor", "local")
48
- Rake::ExtensionTask.new("cairo", spec) do |ext|
49
- if RCairoBuild.for_64bit?
50
- ext.cross_platform = ["x64-mingw32"]
51
- else
52
- ext.cross_platform = ["x86-mingw32"]
53
- end
54
- ext.cross_compile = true
55
- ext.cross_compiling do |_spec|
56
- if /mingw|mswin/ =~ _spec.platform.to_s
57
- _spec.metadata.delete("msys2_mingw_dependencies")
58
-
59
- binary_files = []
60
- Find.find(binary_dir) do |name|
61
- next unless File.file?(name)
62
- next if /\.zip\z/i =~ name
63
- binary_files << name
64
- end
65
- _spec.files += binary_files
66
-
67
- stage_path = "#{ext.tmp_dir}/#{_spec.platform}/stage"
68
- binary_files.each do |binary_file|
69
- stage_binary_file = "#{stage_path}/#{binary_file}"
70
- stage_binary_dir = File.dirname(stage_binary_file)
71
- directory stage_binary_dir
72
- file stage_binary_file => [stage_binary_dir, binary_file] do
73
- cp(binary_file, stage_binary_file)
74
- end
75
- end
76
- end
77
- end
78
- end
79
-
80
- class Package < Struct.new(:name,
81
- :label,
82
- :version,
83
- :compression_method,
84
- :download_site,
85
- :download_base_url,
86
- :windows)
87
- def initialize(parameters)
88
- super()
89
- parameters.each do |key, value|
90
- __send__("#{key}=", value)
91
- end
92
- end
93
-
94
- def label
95
- super || name
96
- end
97
-
98
- def base_name
99
- "#{name}-#{version}"
100
- end
101
-
102
- def compression_method
103
- super || "xz"
104
- end
105
-
106
- def archive_path
107
- "#{base_name}.tar.#{compression_method}"
108
- end
109
-
110
- def archive_url
111
- "#{download_base_url}/#{archive_path}"
112
- end
113
-
114
- def download_base_url
115
- super || download_site_base_url
116
- end
117
-
118
- def download_site_base_url
119
- case download_site
120
- when :cairo
121
- base_url = "https://cairographics.org/releases"
122
- when :cairo_snapshots
123
- base_url = "https://cairographics.org/snapshots"
124
- when :gnome
125
- base_url = "http://ftp.gnome.org/pub/gnome/sources"
126
- release_series = version.gsub(/\A(\d+\.\d+).+\z/, '\1')
127
- base_url << "/#{name}/#{release_series}"
128
- else
129
- base_url = nil
130
- end
131
- base_url
132
- end
133
-
134
- def windows
135
- Windows.new(super || {})
136
- end
137
-
138
- class Windows < Struct.new(:builder,
139
- :build_host,
140
- :configure_args,
141
- :built_file,
142
- :patches,
143
- :need_autoreconf)
144
- def initialize(parameters)
145
- super()
146
- parameters.each do |key, value|
147
- __send__("#{key}=", value)
148
- end
149
- end
150
-
151
- def build_host
152
- if RCairoBuild.for_64bit?
153
- "x86_64-w64-mingw32"
154
- else
155
- "i686-w64-mingw32"
156
- end
157
- end
158
-
159
- def configure_args
160
- super || []
161
- end
162
-
163
- def patches
164
- super || []
165
- end
166
-
167
- def need_autoreconf?
168
- need_autoreconf
169
- end
170
- end
171
- end
172
-
173
- class WindowsTask
174
- include Rake::DSL
175
-
176
- def initialize(spec, base_dir=".")
177
- @spec = spec
178
- @base_dir = Pathname.new(base_dir).expand_path
179
- yield(self)
180
- end
181
-
182
- def define
183
- define_download_task
184
- end
185
-
186
- def packages=(packages)
187
- @packages = packages.collect do |parameters|
188
- Package.new(parameters)
189
- end
190
- end
191
-
192
- private
193
- def define_download_task
194
- define_gcc_task
195
- define_source_download_task
196
- define_build_task
197
- end
198
-
199
- def define_gcc_task
200
- namespace :windows do
201
- namespace :gcc do
202
- namespace :dll do
203
- binary_path = install_dir + "bin"
204
- directory binary_path.to_s
205
- desc "Bundle GCC related DLLs"
206
- task :bundle => binary_path do
207
- dll_names = [
208
- "libstdc++-6.dll",
209
- "libwinpthread-1.dll",
210
- "libgcc_s_sjlj-1.dll",
211
- "libgcc_s_seh-1.dll",
212
- ]
213
- dll_names.each do |dll_name|
214
- destination_path = binary_path + dll_name
215
- dll_path = absolete_gcc_dll_path(dll_name)
216
- unless File.exist?(dll_path)
217
- puts("#{dll_name} doesn't exist.")
218
- next
219
- end
220
- cp(dll_path, destination_path)
221
- chmod(0755, destination_path)
222
- end
223
- end
224
- end
225
- end
226
- end
227
- end
228
-
229
- def absolete_gcc_dll_path(dll_name)
230
- build_host = @packages.first.windows.build_host
231
- `#{build_host}-gcc -print-file-name=#{dll_name}`.strip
232
- end
233
-
234
- def define_source_download_task
235
- namespace :source do
236
- tasks = []
237
- @packages.each do |package|
238
- namespace package.name do
239
- archive_path = downloaded_archive_path(package)
240
- file archive_path.to_s do
241
- mkdir_p(archive_path.dirname.to_s)
242
- download(package, archive_path)
243
- end
244
-
245
- desc "Download #{package.name} source"
246
- task :download => archive_path.to_s
247
- tasks << join_task_name(Rake.application.current_scope, "download")
248
- end
249
- end
250
- desc "Download sources"
251
- task :download => tasks
252
- end
253
- end
254
-
255
- def download(package, archive_path)
256
- rake_output_message "Downloading... #{package.archive_url}"
257
- open(package.archive_url) do |downloaded_archive|
258
- begin
259
- archive_path.open("wb") do |archive_file|
260
- buffer = ""
261
- while downloaded_archive.read(4096, buffer)
262
- archive_file.print(buffer)
263
- end
264
- end
265
- rescue Exception
266
- rm_rf(archive_path.to_s)
267
- raise
268
- end
269
- end
270
- end
271
-
272
- def define_build_task
273
- namespace :windows do
274
- tasks = []
275
- @packages.each do |package|
276
- namespace package.name do
277
- built_file = install_dir + package.windows.built_file
278
- file built_file.to_s do
279
- Rake::Task["source:#{package.name}:download"].invoke
280
- build(package)
281
- end
282
-
283
- desc "Build #{package.label} package"
284
- task :build => built_file.to_s
285
- tasks << join_task_name(Rake.application.current_scope, "build")
286
- end
287
- end
288
- desc "Build packages"
289
- task :build => ["windows:gcc:dll:bundle"] + tasks
290
- end
291
- end
292
-
293
- def join_task_name(current_scope, task_name)
294
- if Rake.const_defined?(:Scope)
295
- current_scope.path_with_task_name(task_name)
296
- else
297
- (current_scope + [task_name]).join(":")
298
- end
299
- end
300
-
301
- def build(package)
302
- ENV["PATH"] = ["#{install_dir}/bin", ENV["PATH"]].join(File::PATH_SEPARATOR)
303
- ENV["PKG_CONFIG_LIBDIR"] = "#{install_dir}/lib/pkgconfig"
304
- ENV["PKG_CONFIG_PATH"] = [
305
- ruby_glib2_pkg_config_path,
306
- ].join(":")
307
-
308
- package_build_dir = build_dir + package.name
309
- rm_rf(package_build_dir.to_s)
310
- mkdir_p(package_build_dir.to_s)
311
-
312
- archive_path = downloaded_archive_path(package).expand_path
313
-
314
- Dir.chdir(package_build_dir.to_s) do
315
- sh("tar", "xf", archive_path.to_s)
316
- Dir.chdir(package.base_name.to_s) do
317
- package.windows.patches.each do |patch|
318
- sh("patch", "-p1", "--input", (patches_dir + patch).to_s)
319
- end
320
- sh("autoreconf", "--install") if package.windows.need_autoreconf?
321
- custom_builder = package.windows.builder
322
- if custom_builder
323
- custom_builder.build(package, install_dir)
324
- else
325
- build_with_gnu_build_system(package)
326
- end
327
- package_license_dir = license_dir + package.name
328
- package_license_files = Dir.glob("{README*,AUTHORS,COPYING*}")
329
- mkdir_p(package_license_dir.to_s)
330
- cp(package_license_files, package_license_dir.to_s)
331
- end
332
- end
333
- end
334
-
335
- def build_with_gnu_build_system(package)
336
- configure_args = [
337
- "CPPFLAGS=#{cppflags(package)}",
338
- "LDFLAGS=#{ldflags(package)}",
339
- "--prefix=#{install_dir}",
340
- "--host=#{package.windows.build_host}",
341
- ]
342
- configure_args += package.windows.configure_args
343
- sh("./configure", *configure_args)
344
- ENV["GREP_OPTIONS"] = "--text"
345
- sh("nice", "make", *build_make_args(package))
346
- sh("nice", "make", "install", *install_make_args(package))
347
- end
348
-
349
- def cppflags(package)
350
- include_paths = [
351
- install_dir + "include",
352
- ]
353
- flags = include_paths.collect do |path|
354
- "-I#{path}"
355
- end
356
- flags.join(" ")
357
- end
358
-
359
- def ldflags(package)
360
- library_paths = [
361
- install_dir + "lib",
362
- ]
363
- flags = library_paths.collect do |path|
364
- "-L#{path}"
365
- end
366
- flags.join(" ")
367
- end
368
-
369
- def build_make_args(package)
370
- args = []
371
- make_n_jobs = ENV["MAKE_N_JOBS"]
372
- args << "-j#{make_n_jobs}" if make_n_jobs
373
- args
374
- end
375
-
376
- def install_make_args(package)
377
- []
378
- end
379
-
380
- def tmp_dir
381
- @base_dir + "tmp"
382
- end
383
-
384
- def download_dir
385
- tmp_dir + "download"
386
- end
387
-
388
- def build_dir
389
- tmp_dir + "build"
390
- end
391
-
392
- def install_dir
393
- @base_dir + "vendor" + "local"
394
- end
395
-
396
- def license_dir
397
- install_dir + "share" + "license"
398
- end
399
-
400
- def downloaded_archive_path(package)
401
- download_dir + package.archive_path
402
- end
403
-
404
- def patches_dir
405
- @base_dir + "patches"
406
- end
407
-
408
- def ruby_gnome2_dir
409
- @base_dir.parent + "ruby-gnome2"
410
- end
411
-
412
- def ruby_glib2_pkg_config_path
413
- ruby_gnome2_dir + "glib2/vendor/local/lib/pkgconfig"
414
- end
415
- end
416
-
417
- class ZlibBuilder
418
- include Rake::DSL
419
-
420
- def build(package, install_dir)
421
- version_for_path = package.version.gsub(".", "")
422
- dll_name = "zlib#{version_for_path}.dll"
423
- sh("make",
424
- "PREFIX=#{package.windows.build_host}-",
425
- "SHAREDLIB=#{dll_name}",
426
- "-f",
427
- "win32/Makefile.gcc")
428
- include_path = install_dir + "include"
429
- library_path = install_dir + "lib"
430
- binary_path = install_dir + "bin"
431
- sh("make",
432
- "INCLUDE_PATH=#{include_path}",
433
- "LIBRARY_PATH=#{library_path}",
434
- "BINARY_PATH=#{binary_path}",
435
- "SHARED_MODE=1",
436
- "SHAREDLIB=#{dll_name}",
437
- "-f",
438
- "win32/Makefile.gcc",
439
- "install")
440
- end
441
- end
442
-
443
- windows_task = WindowsTask.new(spec) do |task|
444
- zlib_version = "1.2.11"
445
- libpng_version = "1.6.35"
446
- freetype_version = "2.9.1"
447
- task.packages = [
448
- {
449
- # We should use the same version as Ruby Installer.
450
- :name => "zlib",
451
- :version => zlib_version,
452
- :download_base_url => "https://downloads.sourceforge.net/project/libpng/zlib/#{zlib_version}",
453
- :compression_method => "gz",
454
- :windows => {
455
- :builder => ZlibBuilder.new,
456
- :built_file => "bin/zlib#{zlib_version.gsub(".", "")}.dll",
457
- },
458
- },
459
- {
460
- :name => "libpng",
461
- :version => libpng_version,
462
- :download_base_url => "https://downloads.sourceforge.net/project/libpng/libpng16/#{libpng_version}",
463
- :windows => {
464
- :built_file => "bin/libpng16-16.dll",
465
- },
466
- },
467
- {
468
- :name => "freetype",
469
- :version => freetype_version,
470
- :download_base_url => "https://downloads.sourceforge.net/project/freetype/freetype2/#{freetype_version}",
471
- :compression_method => "bz2",
472
- :windows => {
473
- :built_file => "bin/libfreetype-7.dll",
474
- },
475
- },
476
- {
477
- :name => "libxml2",
478
- :version => "2.9.8",
479
- :download_base_url => "ftp://xmlsoft.org/libxml2",
480
- :compression_method => "gz",
481
- :windows => {
482
- :built_file => "bin/libxml2-2.dll",
483
- :configure_args => [
484
- "--without-python",
485
- ],
486
- },
487
- },
488
- {
489
- :name => "fontconfig",
490
- :version => "2.13.0",
491
- :download_base_url => "https://www.freedesktop.org/software/fontconfig/release",
492
- :compression_method => "bz2",
493
- :windows => {
494
- :built_file => "bin/libfontconfig-1.dll",
495
- :configure_args => [
496
- "--enable-libxml2",
497
- "--disable-docs",
498
- ],
499
- },
500
- },
501
- {
502
- :name => "pixman",
503
- :version => "0.34.0",
504
- :download_site => :cairo,
505
- :compression_method => "gz",
506
- :windows => {
507
- :built_file => "bin/libpixman-1-0.dll",
508
- },
509
- },
510
- {
511
- :name => "cairo",
512
- :version => "1.16.0",
513
- :download_site => :cairo,
514
- :windows => {
515
- :built_file => "bin/libcairo-2.dll",
516
- :configure_args => [
517
- "--enable-gobject",
518
- ],
519
- :patches => [
520
- "cairo-1.15.4-99054-fix-win32-backend-assertion-failure.diff"
521
- ],
522
- :need_autoreconf => true,
523
- },
524
- },
525
- ]
526
- end
527
- windows_task.define
528
-
529
- namespace :vm do
530
- namespace :windows do
531
- architectures = ["32", "64"]
532
- build_tasks = []
533
-
534
- namespace :build do
535
- architectures.each do |architecture|
536
- desc "Build all packages for Windows #{architecture}"
537
- task_name = "win#{architecture}"
538
- build_tasks << "vm:windows:build:#{task_name}"
539
- task task_name do
540
- cd("build") do
541
- sh("vagrant", "destroy", "--force", task_name)
542
- sh("vagrant", "up", task_name)
543
- end
544
- end
545
- end
546
- end
547
-
548
- desc "Build all packages for Windows"
549
- task :build => build_tasks
550
- end
551
- end
552
-
553
34
  # for releasing
554
35
  task :dist do
555
36
  sh "./dist.sh", spec.version.to_s
@@ -624,7 +105,6 @@ langs.each do |lang,|
624
105
  lang_rcairo_doc_dir = File.join(rcairo_doc_dir, lang)
625
106
  cp Dir[File.join(lang_rcairo_doc_dir, "*.rd")], lang_doc_dir
626
107
  ruby File.join(rcairo_doc_dir, "update-html.rb"), lang_doc_dir
627
- ruby File.join(rcairo_doc_dir, "update-html.rb"), lang_doc_dir
628
108
  rm Dir[File.join(lang_doc_dir, "*.{rd,rdc,rbl}")]
629
109
  end
630
110
  end
@@ -633,16 +113,6 @@ file "Makefile" => ["extconf.rb", "ext/cairo/extconf.rb"] do
633
113
  ruby("extconf.rb")
634
114
  end
635
115
 
636
- namespace :make do
637
- namespace :debug_flags do
638
- task :reset do
639
- ENV["MAKE"] ||= "make debugflags="
640
- end
641
- end
642
- end
643
-
644
- task :cross => "make:debug_flags:reset"
645
-
646
116
  desc "Configure"
647
117
  task :configure => "Makefile"
648
118
 
@@ -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 16
76
- #define RB_CAIRO_VERSION_MICRO 1
76
+ #define RB_CAIRO_VERSION_MICRO 2
77
77
 
78
78
  RB_CAIRO_VAR VALUE rb_mCairo;
79
79
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cairo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rake-compiler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: packnga
85
71
  requirement: !ruby/object:Gem::Requirement