forked from ruby-gnome/ruby-gnome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
131 lines (124 loc) · 4.24 KB
/
Rakefile
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# -*- ruby -*-
#
# Copyright (C) 2015 Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
$LOAD_PATH.unshift("./../glib2/lib")
require "gnome2/rake/package-task"
package_task = GNOME2::Rake::PackageTask.new do |package|
package.summary = "Ruby/WebKit2GTK is a Ruby binding of WebKit2GTK+."
package.description = "Ruby/WebKit2GTK is a Ruby binding of WebKit2GTK+."
package.dependency.gem.runtime = ["gobject-introspection", "gtk3"]
package.windows.packages = []
package.windows.dependencies = []
package.windows.build_dependencies = [
"glib2",
"gio2",
"gobject-introspection",
"atk",
"pango",
"gdk_pixbuf2",
"gdk3",
"gstreamer",
]
package.windows.gobject_introspection_dependencies = [
"gio2",
"atk",
"gdk_pixbuf2",
"pango",
"gdk3",
"gstreamer",
]
gstreamer_relative_binary_dir =
package.package.project_root_dir +
"gstreamer" +
package.windows.relative_binary_dir
gstreamer_absolute_binary_dir = gstreamer_relative_binary_dir.expand_path
rcairo_relative_binary_dir =
package.package.project_root_dir.parent +
"rcairo.#{package.windows.build_architecture_suffix}" +
package.windows.relative_binary_dir
rcairo_absolute_binary_dir = rcairo_relative_binary_dir.expand_path
package.external_packages = [
{
:name => "libwebp",
:download_base_url => "http://downloads.webmproject.org/releases/webp",
:label => "WebP",
:version => "0.5.0",
:windows => {
:built_file => "bin/libwebp-5.dll",
},
},
{
:name => "libxslt",
:version => "1.1.28",
:download_base_url => "ftp://xmlsoft.org/libxslt",
:compression_method => "gz",
:windows => {
:built_file => "bin/libxslt-1.dll",
:configure_args => [
"--without-python",
"--with-libxml-prefix=#{rcairo_absolute_binary_dir}",
],
:patches => [
"libxslt-1.1.28-add-mkdir-fallback.diff",
],
},
},
{
:name => "webkitgtk",
:download_base_url => "http://webkitgtk.org/releases",
:label => "WebKitGTK+",
:version => "2.12.0",
:compression_method => "xz",
:windows => {
:cmake_args => [
"-DPORT=GTK",
"-DZLIB_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
"-DZLIB_LIBRARY=#{rcairo_absolute_binary_dir}/lib",
"-DPNG_PNG_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
"-DPNG_LIBRARY=#{rcairo_absolute_binary_dir}/lib",
"-DJPEG_INCLUDE_DIR=#{gstreamer_absolute_binary_dir}/include",
"-DJPEG_LIBRARY=#{gstreamer_absolute_binary_dir}/lib",
"-DFONTCONFIG_INCLUDE_DIR=#{rcairo_absolute_binary_dir}/include",
"-DFONTCONFIG_LIBRARIES=#{rcairo_absolute_binary_dir}/lib",
"-DSQLITE_INCLUDE_DIR=#{gstreamer_absolute_binary_dir}/include",
"-DSQLITE_LIBRARIES=#{gstreamer_absolute_binary_dir}/lib",
"-DENABLE_PLUGIN_PROCESS_GTK2=OFF",
"-DENABLE_X11_TARGET=OFF",
"-DENABLE_GTKDOC=OFF",
"-DENABLE_CREDENTIAL_STORAGE=OFF",
"-DENABLE_GEOLOCATION=OFF",
"-DENABLE_OPENGL=OFF",
"-DENABLE_SPELLCHECK=OFF",
"-DUSE_LIBNOTIFY=OFF",
"-DUSE_LIBHYPHEN=OFF",
"-DENABLE_API_TESTS=OFF",
],
:patches => [
"webkitgtk-2.9.92-try-buildable.diff",
],
},
},
]
end
package_task.define
namespace :dependency do
desc "Install depenencies"
task :install do
# TODO: Install libwebkit2gtk-4.0-37 on Debian.
end
end
task :build => "dependency:install"