forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclutter.rb
108 lines (102 loc) · 2.93 KB
/
clutter.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
class Clutter < Formula
desc "Generic high-level canvas library"
homepage "https://wiki.gnome.org/Projects/Clutter"
url "https://download.gnome.org/sources/clutter/1.26/clutter-1.26.2.tar.xz"
sha256 "e7233314983055e9018f94f56882e29e7fc34d8d35de030789fdcd9b2d0e2e56"
revision 2
bottle do
rebuild 1
sha256 "d0db7076ac2f6b676018c9a92123de1099c7900d56039922cdc89e2389a9031d" => :mojave
sha256 "3f628a4d8a13d6703f770323cac942541eafa9418507b3cd7466f0918bedce8b" => :high_sierra
sha256 "ee8780db0d069682fd246a88bff1695f42c02f4900fa6eb8a8e3ce986a0674bc" => :sierra
end
depends_on "gobject-introspection" => :build
depends_on "pkg-config" => :build
depends_on "atk"
depends_on "cairo" # for cairo-gobject
depends_on "cogl"
depends_on "gdk-pixbuf"
depends_on "glib"
depends_on "json-glib"
depends_on "pango"
def install
args = %W[
--disable-dependency-tracking
--disable-debug
--prefix=#{prefix}
--enable-introspection=yes
--disable-silent-rules
--disable-Bsymbolic
--disable-examples
--disable-gtk-doc-html
--enable-gdk-pixbuf=yes
--without-x --enable-x11-backend=no
--enable-quartz-backend=yes
]
system "./configure", *args
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <clutter/clutter.h>
int main(int argc, char *argv[]) {
GOptionGroup *group = clutter_get_option_group_without_init();
return 0;
}
EOS
atk = Formula["atk"]
cairo = Formula["cairo"]
cogl = Formula["cogl"]
fontconfig = Formula["fontconfig"]
freetype = Formula["freetype"]
gettext = Formula["gettext"]
glib = Formula["glib"]
harfbuzz = Formula["harfbuzz"]
json_glib = Formula["json-glib"]
libpng = Formula["libpng"]
pango = Formula["pango"]
pixman = Formula["pixman"]
flags = %W[
-I#{atk.opt_include}/atk-1.0
-I#{cairo.opt_include}/cairo
-I#{cogl.opt_include}/cogl
-I#{fontconfig.opt_include}
-I#{freetype.opt_include}/freetype2
-I#{gettext.opt_include}
-I#{glib.opt_include}/glib-2.0
-I#{glib.opt_lib}/glib-2.0/include
-I#{harfbuzz.opt_include}/harfbuzz
-I#{include}/clutter-1.0
-I#{json_glib.opt_include}/json-glib-1.0
-I#{libpng.opt_include}/libpng16
-I#{pango.opt_include}/pango-1.0
-I#{pixman.opt_include}/pixman-1
-D_REENTRANT
-L#{atk.opt_lib}
-L#{cairo.opt_lib}
-L#{cogl.opt_lib}
-L#{gettext.opt_lib}
-L#{glib.opt_lib}
-L#{json_glib.opt_lib}
-L#{lib}
-L#{pango.opt_lib}
-latk-1.0
-lcairo
-lcairo-gobject
-lclutter-1.0
-lcogl
-lcogl-pango
-lcogl-path
-lgio-2.0
-lglib-2.0
-lgmodule-2.0
-lgobject-2.0
-lintl
-ljson-glib-1.0
-lpango-1.0
-lpangocairo-1.0
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end