pango 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +29 -3
- data/ext/pango/extconf.rb +7 -0
- data/ext/pango/rbpangocairo.c +12 -0
- data/ext/pango/rbpangofontmap.c +22 -3
- metadata +8 -8
data/Rakefile
CHANGED
@@ -6,24 +6,50 @@ require "gnome2/rake/package-task"
|
|
6
6
|
package_task = GNOME2::Rake::PackageTask.new do |package|
|
7
7
|
package.summary = "Ruby/Pango is a Ruby binding of pango-1.x."
|
8
8
|
package.description = "Ruby/Pango is a Ruby binding of pango-1.x."
|
9
|
-
package.dependency.gem.runtime = [["cairo", ">= 1.
|
9
|
+
package.dependency.gem.runtime = [["cairo", ">= 1.12.5"], "glib2"]
|
10
10
|
package.windows.packages = []
|
11
11
|
package.windows.dependencies = []
|
12
12
|
package.windows.build_dependencies = ["glib2", "gobject-introspection"]
|
13
13
|
package.external_packages = [
|
14
|
+
{
|
15
|
+
:name => "harfbuzz",
|
16
|
+
:download_base_url => "http://www.freedesktop.org/software/harfbuzz/release",
|
17
|
+
:label => "HarfBuzz",
|
18
|
+
:version => "0.9.17",
|
19
|
+
:compression_method => "bz2",
|
20
|
+
},
|
14
21
|
{
|
15
22
|
:name => "pango",
|
16
23
|
:download_site => :gnome,
|
17
24
|
:label => "pango",
|
18
|
-
:version => "1.34.
|
25
|
+
:version => "1.34.1",
|
19
26
|
:compression_method => "xz",
|
20
27
|
:windows => {
|
21
28
|
:configure_args => [
|
22
29
|
"--enable-introspection",
|
23
30
|
],
|
31
|
+
:patches => [
|
32
|
+
"pango-1.34.0-enable-fc-font.diff",
|
33
|
+
],
|
24
34
|
},
|
25
|
-
}
|
35
|
+
},
|
26
36
|
]
|
27
37
|
end
|
28
38
|
package_task.define
|
29
39
|
|
40
|
+
namespace :gcc do
|
41
|
+
namespace :dll do
|
42
|
+
desc "Bundle GCC related DLLs"
|
43
|
+
task(:bundle) do
|
44
|
+
dlls = ["libgcc_s_sjlj-1.dll", "libstdc++-6.dll"]
|
45
|
+
dlls.each do |dll|
|
46
|
+
host = package_task.windows.build_host
|
47
|
+
binary_dir = package_task.windows.absolute_binary_dir
|
48
|
+
full_path = `#{host}-g++ -print-file-name=#{dll}`.strip
|
49
|
+
cp(full_path, (binary_dir + "bin").to_s)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
task "win32:builder:build:harfbuzz:after" => "gcc:dll:bundle"
|
data/ext/pango/extconf.rb
CHANGED
@@ -67,6 +67,13 @@ unless required_pkg_config_package(package_id,
|
|
67
67
|
end
|
68
68
|
PKGConfig.have_package('pangocairo')
|
69
69
|
|
70
|
+
if PKGConfig.have_package("pangowin32")
|
71
|
+
$defs << " -DHAVE_PANGO_WIN32"
|
72
|
+
end
|
73
|
+
if PKGConfig.have_package("pangoft2")
|
74
|
+
$defs << " -DHAVE_PANGO_FT2"
|
75
|
+
end
|
76
|
+
|
70
77
|
pango_header = "pango/pango.h"
|
71
78
|
have_func("pango_layout_iter_get_type", pango_header)
|
72
79
|
have_func("pango_layout_set_ellipsize", pango_header)
|
data/ext/pango/rbpangocairo.c
CHANGED
@@ -39,6 +39,15 @@ rg_s_default(G_GNUC_UNUSED VALUE klass)
|
|
39
39
|
return GOBJ2RVAL(pango_cairo_font_map_get_default());
|
40
40
|
}
|
41
41
|
|
42
|
+
# if PANGO_CHECK_VERSION(1, 22, 0)
|
43
|
+
static VALUE
|
44
|
+
rg_s_set_default(VALUE klass, VALUE font_map)
|
45
|
+
{
|
46
|
+
pango_cairo_font_map_set_default(RVAL2GOBJ(font_map));
|
47
|
+
return klass;
|
48
|
+
}
|
49
|
+
# endif
|
50
|
+
|
42
51
|
static VALUE
|
43
52
|
rg_set_resolution(VALUE self, VALUE dpi)
|
44
53
|
{
|
@@ -71,6 +80,9 @@ Init_pango_cairo(VALUE mPango)
|
|
71
80
|
|
72
81
|
RG_DEF_SMETHOD(create, 0);
|
73
82
|
RG_DEF_SMETHOD(default, 0);
|
83
|
+
# if PANGO_CHECK_VERSION(1, 22, 0)
|
84
|
+
RG_DEF_SMETHOD(set_default, 1);
|
85
|
+
# endif
|
74
86
|
|
75
87
|
RG_DEF_METHOD(set_resolution, 1);
|
76
88
|
RG_DEF_METHOD(resolution, 0);
|
data/ext/pango/rbpangofontmap.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2011-2013 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2002-2005 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -24,6 +24,18 @@
|
|
24
24
|
#define RG_TARGET_NAMESPACE cFontMap
|
25
25
|
#define _SELF(self) (RVAL2PANGOFONTMAP(self))
|
26
26
|
|
27
|
+
#ifdef CAIRO_AVAILABLE
|
28
|
+
# ifdef HAVE_PANGO_FT2
|
29
|
+
# define PANGO_TYPE_CAIRO_FC_FONT_MAP \
|
30
|
+
(pango_cairo_fc_font_map_get_type())
|
31
|
+
# endif
|
32
|
+
|
33
|
+
# ifdef HAVE_PANGO_WIN32
|
34
|
+
# define PANGO_TYPE_CAIRO_WIN32_FONT_MAP \
|
35
|
+
(pango_cairo_win32_font_map_get_type())
|
36
|
+
# endif
|
37
|
+
#endif
|
38
|
+
|
27
39
|
/*
|
28
40
|
static VALUE
|
29
41
|
rg_initialize(VALUE self)
|
@@ -99,9 +111,16 @@ Init_pango_font_map(VALUE mPango)
|
|
99
111
|
G_DEF_CLASS3("PangoFT2FontMap", "FT2FontMap", mPango);
|
100
112
|
G_DEF_CLASS3("PangoXFontMap", "XFontMap", mPango);
|
101
113
|
G_DEF_CLASS3("PangoWin32FontMap", "Win32FontMap", mPango);
|
114
|
+
G_DEF_CLASS3("PangoCoreTextFontMap", "CoreTextFontMap", mPango);
|
115
|
+
#ifdef PANGO_TYPE_CAIRO_FC_FONT_MAP
|
116
|
+
G_DEF_CLASS(PANGO_TYPE_CAIRO_FC_FONT_MAP, "CairoFcFontMap", mPango);
|
117
|
+
#else
|
102
118
|
G_DEF_CLASS3("PangoCairoFcFontMap", "CairoFcFontMap", mPango);
|
119
|
+
#endif
|
120
|
+
#ifdef PANGO_TYPE_CAIRO_WIN32_FONT_MAP
|
121
|
+
G_DEF_CLASS(PANGO_TYPE_CAIRO_WIN32_FONT_MAP, "CairoWin32FontMap", mPango);
|
122
|
+
#else
|
103
123
|
G_DEF_CLASS3("PangoCairoWin32FontMap", "CairoWin32FontMap", mPango);
|
104
|
-
#if PANGO_CHECK_VERSION(1,12,0)
|
105
|
-
G_DEF_CLASS3("PangoATSUIFontMap", "ATSUIFontMap", mPango);
|
106
124
|
#endif
|
125
|
+
G_DEF_CLASS3("PangoCairoCoreTextFontMap", "CairoCoreTextFontMap", mPango);
|
107
126
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cairo
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.12.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,23 +26,23 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.12.5
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: glib2
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - '='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.0.
|
37
|
+
version: 2.0.1
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - '='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.0.
|
45
|
+
version: 2.0.1
|
46
46
|
description: Ruby/Pango is a Ruby binding of pango-1.x.
|
47
47
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
48
48
|
executables: []
|