cairo 1.16.1 → 1.16.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +98 -0
- data/Rakefile +1 -537
- data/ext/cairo/cairo.def +0 -1
- data/ext/cairo/extconf.rb +9 -18
- data/ext/cairo/rb_cairo.h +4 -13
- data/ext/cairo/rb_cairo_constants.c +10 -2
- data/ext/cairo/rb_cairo_context.c +13 -5
- data/ext/cairo/rb_cairo_device.c +2 -2
- data/ext/cairo/rb_cairo_font_face.c +6 -1
- data/ext/cairo/rb_cairo_io.c +6 -6
- data/ext/cairo/rb_cairo_pattern.c +3 -3
- data/ext/cairo/rb_cairo_private.c +5 -6
- data/ext/cairo/rb_cairo_private.h +2 -2
- data/ext/cairo/rb_cairo_scaled_font.c +2 -2
- data/ext/cairo/rb_cairo_surface.c +3 -3
- data/lib/cairo/color.rb +7 -7
- data/lib/cairo/colors.rb +3303 -617
- data/lib/cairo/point.rb +1 -1
- data/test/run-test.rb +10 -8
- data/test/test_colors.rb +9999 -0
- data/test/test_context.rb +7 -0
- metadata +33 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15e8af590215c88e266c06bdbc88bd56fa67447150014354e46f04aefd88ad6
|
4
|
+
data.tar.gz: 4cd483495ef9499f407826907ef021973794af9d44a9072e594ac613ec64574e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21bc8f32edabb79ab6c5c397292ec31a465893ba7a7d2702315fd50eadecdc489c437f21c7f4c238a8c968ebe121ea5386b6ed1470334b466727b568b417060a
|
7
|
+
data.tar.gz: 5dfcb99bfa8c74626d0162251c13ac4cfa331b11e5adf16a4b76b3236fd04d5070e592378d63aeb9e8c472dac1e4bd443f3bf34ba916f7204e9449720670f7de
|
data/NEWS
CHANGED
@@ -1,3 +1,101 @@
|
|
1
|
+
Release 1.16.6 (2020-07-23) Sutou Kouhei <kou@cozmixng.org>
|
2
|
+
============================================================
|
3
|
+
|
4
|
+
Improvements
|
5
|
+
------------
|
6
|
+
|
7
|
+
* Specified GPL 2.0 or later explicitly in gemspec.
|
8
|
+
[GitHub#62][Reported by Gabriel Mazetto]
|
9
|
+
|
10
|
+
* Added more metadata to gem.
|
11
|
+
[GitHub#63][Patch by Gabriel Mazetto]
|
12
|
+
|
13
|
+
Fixes
|
14
|
+
-----
|
15
|
+
|
16
|
+
* Windows: Fixed a link error.
|
17
|
+
[GitHub#ruby-gnome/ruby-gnome#1402][Reported by dsisnero]
|
18
|
+
|
19
|
+
Thanks
|
20
|
+
------
|
21
|
+
|
22
|
+
* Gabriel Mazetto
|
23
|
+
|
24
|
+
* dsisnero
|
25
|
+
|
26
|
+
Release 1.16.5 (2020-02-03) Sutou Kouhei <kou@cozmixng.org>
|
27
|
+
============================================================
|
28
|
+
|
29
|
+
Improvements
|
30
|
+
------------
|
31
|
+
|
32
|
+
* Added Cairo::Context#raw_address for integration with other
|
33
|
+
libraries.
|
34
|
+
[GitHub#59][Reported by kojix2]
|
35
|
+
|
36
|
+
Fixes
|
37
|
+
-----
|
38
|
+
|
39
|
+
* Changed to use only ASCII for color name.
|
40
|
+
[GitHub#57][Reported by spoolkitamura]
|
41
|
+
|
42
|
+
* Fixed the number of arguments of the following methods:
|
43
|
+
|
44
|
+
* Cairo::Surface#copy_page
|
45
|
+
|
46
|
+
* Cairo::Surface#show_page
|
47
|
+
|
48
|
+
Thanks
|
49
|
+
------
|
50
|
+
|
51
|
+
* spoolkitamura
|
52
|
+
|
53
|
+
* kojix2
|
54
|
+
|
55
|
+
Release 1.16.4 (2019-03-09) Kouhei Sutou <kou@cozmixng.org>
|
56
|
+
============================================================
|
57
|
+
|
58
|
+
Fixes
|
59
|
+
-----
|
60
|
+
|
61
|
+
* Removed Skia related code entirely.
|
62
|
+
|
63
|
+
Release 1.16.3 (2019-03-09) Kouhei Sutou <kou@cozmixng.org>
|
64
|
+
============================================================
|
65
|
+
|
66
|
+
Improvements
|
67
|
+
------------
|
68
|
+
|
69
|
+
* Improved Cairo::Poinst#distance performance.
|
70
|
+
[GitHub#53][Patch by scivola]
|
71
|
+
|
72
|
+
* Added support for building with cairo and GLib 2.60 installed by
|
73
|
+
Homebrew.
|
74
|
+
|
75
|
+
* Updated colors. There are some backward incompatibility. Sorry.
|
76
|
+
|
77
|
+
Fixes
|
78
|
+
-----
|
79
|
+
|
80
|
+
* Fixed Cairo::Color::RGB#to_s.
|
81
|
+
[GitHub#55][Patch by spoolkitamura]
|
82
|
+
|
83
|
+
Thanks
|
84
|
+
------
|
85
|
+
|
86
|
+
* scivola
|
87
|
+
|
88
|
+
* spoolkitamura.
|
89
|
+
|
90
|
+
Release 1.16.2 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
|
91
|
+
============================================================
|
92
|
+
|
93
|
+
Improvements
|
94
|
+
------------
|
95
|
+
|
96
|
+
* Stopped to provide fat gem for Windows. Windows users should use
|
97
|
+
MSYS2 packages.
|
98
|
+
|
1
99
|
Release 1.16.1 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
|
2
100
|
============================================================
|
3
101
|
|
data/Rakefile
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8; mode: ruby -*-
|
2
2
|
|
3
|
-
require "English"
|
4
|
-
|
5
|
-
require "find"
|
6
|
-
require "fileutils"
|
7
|
-
require "open-uri"
|
8
3
|
require "rubygems"
|
9
|
-
require "rubygems/package_task"
|
10
|
-
require "yard"
|
11
4
|
require "bundler/gem_helper"
|
12
|
-
require "rake/extensiontask"
|
13
5
|
require "packnga"
|
14
6
|
|
15
7
|
base_dir = File.join(File.dirname(__FILE__))
|
@@ -24,10 +16,6 @@ helper = Bundler::GemHelper.new(base_dir)
|
|
24
16
|
helper.install
|
25
17
|
spec = helper.gemspec
|
26
18
|
|
27
|
-
Gem::PackageTask.new(spec) do |pkg|
|
28
|
-
pkg.need_tar_gz = true
|
29
|
-
end
|
30
|
-
|
31
19
|
Packnga::DocumentTask.new(spec) do |task|
|
32
20
|
task.original_language = "en"
|
33
21
|
task.translate_languages = ["ja"]
|
@@ -36,521 +24,8 @@ end
|
|
36
24
|
Packnga::ReleaseTask.new(spec) do |task|
|
37
25
|
end
|
38
26
|
|
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
27
|
# for releasing
|
28
|
+
desc "Release to cairographics.org"
|
554
29
|
task :dist do
|
555
30
|
sh "./dist.sh", spec.version.to_s
|
556
31
|
end
|
@@ -624,7 +99,6 @@ langs.each do |lang,|
|
|
624
99
|
lang_rcairo_doc_dir = File.join(rcairo_doc_dir, lang)
|
625
100
|
cp Dir[File.join(lang_rcairo_doc_dir, "*.rd")], lang_doc_dir
|
626
101
|
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
102
|
rm Dir[File.join(lang_doc_dir, "*.{rd,rdc,rbl}")]
|
629
103
|
end
|
630
104
|
end
|
@@ -633,16 +107,6 @@ file "Makefile" => ["extconf.rb", "ext/cairo/extconf.rb"] do
|
|
633
107
|
ruby("extconf.rb")
|
634
108
|
end
|
635
109
|
|
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
110
|
desc "Configure"
|
647
111
|
task :configure => "Makefile"
|
648
112
|
|