-
Notifications
You must be signed in to change notification settings - Fork 9
/
cairomm-quartz.rb
74 lines (59 loc) · 2.1 KB
/
cairomm-quartz.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
require 'formula'
class CairommQuartz < Formula
url 'http://cairographics.org/releases/cairomm-1.8.4.tar.gz'
homepage 'http://cairographics.org/cairomm/'
md5 '559afbc47484ba3fad265e38a3dafe90'
# patch for universal compilation from:
# http://trac.macports.org/browser/trunk/dports/graphics/cairomm/files/patch-quartz-lp64.diff
def patches
{ :p0 => DATA }
end
depends_on 'pkg-config' => :build
depends_on 'libsigc++'
depends_on 'acornejo/quartz/cairo-quartz'
keg_only 'This formula builds CairoMM for use with Quartz instead of X11, which is experimental.'
def install
system './configure', "--prefix=#{prefix}",
'--disable-dependency-tracking'
system 'make install'
end
end
__END__
diff -urN cairomm/quartz_font.cc cairomm-1.8.2/cairomm/quartz_font.cc
--- cairomm/quartz_font.cc 2008-12-20 18:37:46.000000000 +0100
+++ cairomm/quartz_font.cc 2009-09-20 17:45:13.000000000 +0200
@@ -30,21 +30,23 @@
check_object_status_and_throw_exception(*this);
}
-QuartzFontFace::QuartzFontFace(ATSUFontID font_id) :
- FontFace(cairo_quartz_font_face_create_for_atsu_font_id(font_id), true)
+RefPtr<QuartzFontFace> QuartzFontFace::create(CGFontRef font)
{
- check_object_status_and_throw_exception(*this);
+ return RefPtr<QuartzFontFace>(new QuartzFontFace(font));
}
-RefPtr<QuartzFontFace> QuartzFontFace::create(CGFontRef font)
+#if !__LP64__
+QuartzFontFace::QuartzFontFace(ATSUFontID font_id) :
+ FontFace(cairo_quartz_font_face_create_for_atsu_font_id(font_id), true)
{
- return RefPtr<QuartzFontFace>(new QuartzFontFace(font));
+ check_object_status_and_throw_exception(*this);
}
RefPtr<QuartzFontFace> QuartzFontFace::create(ATSUFontID font_id)
{
return RefPtr<QuartzFontFace>(new QuartzFontFace(font_id));
}
+#endif
}
diff cairomm/quartz_font.h cairomm-1.8.2/cairomm/quartz_font.h
--- cairomm/quartz_font.h 2008-12-20 18:37:46.000000000 +0100
+++ cairomm/quartz_font.h 2009-09-20 17:46:25.000000000 +0200
@@ -54,7 +54,9 @@
*
* @since 1.8
*/
+# if !__LP64__
static RefPtr<QuartzFontFace> create(ATSUFontID font_id);
+# endif
protected: