aboutsummaryrefslogtreecommitdiffstats
path: root/mail/geary/files/patch-5d0f711
blob: 2d4b680ac4b206798d92462984e740abb06ff327 (plain) (blame)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
https://gitlab.gnome.org/GNOME/geary/issues/37

From 5d0f711426d76f878cf9b71f7e8f785199c7cde1 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Thu, 22 Jun 2017 15:01:19 +0200
Subject: [PATCH] bindings: Drop custom javascriptcore-4.0 and webkit2gtk-4.0
 vapi

---
 bindings/metadata/Soup-2.4.metadata           |   3 -
 bindings/metadata/WebKit2-4.0.metadata        |  15 --
 .../WebKit2WebExtension-4.0-custom.vala       |   5 -
 .../metadata/WebKit2WebExtension-4.0.metadata |   9 -
 bindings/vapi/javascriptcore-4.0.vapi         | 155 ------------------
 src/CMakeLists.txt                            |  39 +----
 test/CMakeLists.txt                           |   2 +-
 7 files changed, 4 insertions(+), 224 deletions(-)
 delete mode 100644 bindings/metadata/Soup-2.4.metadata
 delete mode 100644 bindings/metadata/WebKit2-4.0.metadata
 delete mode 100644 bindings/metadata/WebKit2WebExtension-4.0-custom.vala
 delete mode 100644 bindings/metadata/WebKit2WebExtension-4.0.metadata
 delete mode 100644 bindings/vapi/javascriptcore-4.0.vapi

diff --git a/bindings/metadata/Soup-2.4.metadata b/bindings/metadata/Soup-2.4.metadata
deleted file mode 100644
index f3e72e81..00000000
--- bindings/metadata/Soup-2.4.metadata
+++ /dev/null
@@ -1,3 +0,0 @@
-AuthDomain.accepts skip
-AuthDomain.challenge skip
-
diff --git a/bindings/metadata/WebKit2-4.0.metadata b/bindings/metadata/WebKit2-4.0.metadata
deleted file mode 100644
index 3e3044ff..00000000
--- bindings/metadata/WebKit2-4.0.metadata
+++ /dev/null
@@ -1,15 +0,0 @@
-
-JavascriptResult
-    .get_global_context nullable=false unowned=true
-    .get_value nullable=false unowned=true
-
-//Forward upstream
-Download
-  .failed#signal.error type="WebKit.DownloadError"
-PrintOperation
-  .failed#signal.error type="WebKit.PrintError"
-WebResource
-  .failed#signal.error type="GLib.Error"
-WebView
-  .load_failed#signal.error type="GLib.Error"
-  .show_option_menu#signal skip
diff --git a/bindings/metadata/WebKit2WebExtension-4.0-custom.vala b/bindings/metadata/WebKit2WebExtension-4.0-custom.vala
deleted file mode 100644
index a994a774..00000000
--- bindings/metadata/WebKit2WebExtension-4.0-custom.vala
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace WebKit {
-   namespace DOM {
-       public delegate void EventTargetFunc (WebKit.DOM.EventTarget target, WebKit.DOM.Event event);
-   }
-}
diff --git a/bindings/metadata/WebKit2WebExtension-4.0.metadata b/bindings/metadata/WebKit2WebExtension-4.0.metadata
deleted file mode 100644
index c496dba4..00000000
--- bindings/metadata/WebKit2WebExtension-4.0.metadata
+++ /dev/null
@@ -1,9 +0,0 @@
-DOM* parent="WebKit.DOM" name="DOM(.+)"
-
-DOMEventTarget.add_event_listener skip
-_ContextMenu skip
-_ContextMenuItem skip
-
-Frame.get_javascript_* nullable=false unowned=true
-
-DOMEventTarget.add_event_listener_with_closure.handler type="owned WebKit.DOM.EventTargetFunc"
diff --git a/bindings/vapi/javascriptcore-4.0.vapi b/bindings/vapi/javascriptcore-4.0.vapi
deleted file mode 100644
index d152ce2a..00000000
--- bindings/vapi/javascriptcore-4.0.vapi
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2017 Michael Gratton <mike@vee.net>
- *
- * This software is licensed under the GNU Lesser General Public License
- * (version 2.1 or later). See the COPYING file in this distribution.
- */
-
-[CCode (cprefix = "JS",
-        gir_namespace = "JavaScriptCore",
-        gir_version = "4.0",
-        lower_case_cprefix = "JS_",
-        cheader_filename = "JavaScriptCore/JavaScript.h")]
-namespace JS {
-
-   [CCode (cname = "JSContextRef")]
-    [SimpleType]
-   public struct Context {
-
-        [CCode (cname = "JSEvaluateScript")]
-        public Value evaluate_script(String script,
-                                     Object? thisObject,
-                                     String? sourceURL,
-                                     int startingLineNumber,
-                                     out Value? exception);
-
-        [CCode (cname = "JSCheckScriptSyntax")]
-        public Value check_script_syntax(String script,
-                                         String? sourceURL,
-                                         int startingLineNumber,
-                                         out Value? exception);
-
-   }
-
-   [CCode (cname = "JSGlobalContextRef")]
-    [SimpleType]
-   public struct GlobalContext : Context {
-
-        [CCode (cname = "JSGlobalContextRetain")]
-        public bool retain();
-
-        [CCode (cname = "JSGlobalContextRelease")]
-        public bool release();
-
-   }
-
-   [CCode (cname = "JSType", has_type_id = false)]
-   public enum Type {
-
-        [CCode (cname = "kJSTypeUndefined")]
-        UNDEFINED,
-
-        [CCode (cname = "kJSTypeNull")]
-        NULL,
-
-        [CCode (cname = "kJSTypeBoolean")]
-        BOOLEAN,
-
-        [CCode (cname = "kJSTypeNumber")]
-        NUMBER,
-
-        [CCode (cname = "kJSTypeString")]
-        STRING,
-
-        [CCode (cname = "kJSTypeObject")]
-        OBJECT
-    }
-
-   [CCode (cname = "JSObjectRef")]
-    [SimpleType]
-   public struct Object {
-
-        [CCode (cname = "JSObjectMakeFunction")]
-        public Object.make_function(String? name,
-                                    [CCode (array_length_pos=1.5)]
-                                    String[]? parameterNames,
-                                    String body,
-                                    String? sourceURL,
-                                    int startingLineNumber,
-                                    out Value? exception);
-
-        [CCode (cname = "JSObjectCallAsFunction", instance_pos = 1.1)]
-        public Value call_as_function(Context ctx,
-                                      Object? thisObject,
-                                      [CCode (array_length_pos=2.5)]
-                                      Value[]? arguments,
-                                      out Value? exception);
-
-        [CCode (cname = "JSObjectHasProperty", instance_pos = 1.1)]
-        public bool has_property(Context ctx, String property_name);
-
-        [CCode (cname = "JSObjectGetProperty", instance_pos = 1.1)]
-        public Value get_property(Context ctx,
-                                  String property_name,
-                                  out Value? exception);
-
-   }
-
-   [CCode (cname = "JSValueRef")]
-    [SimpleType]
-   public struct Value {
-
-        [CCode (cname = "JSValueGetType", instance_pos = 1.1)]
-        public Type get_type(Context context);
-
-        [CCode (cname = "JSValueIsBoolean", instance_pos = 1.1)]
-        public bool is_boolean(Context ctx);
-
-        [CCode (cname = "JSValueIsNumber", instance_pos = 1.1)]
-        public bool is_number(Context ctx);
-
-        [CCode (cname = "JSValueIsObject", instance_pos = 1.1)]
-        public bool is_object(Context ctx);
-
-        [CCode (cname = "JSValueIsString", instance_pos = 1.1)]
-        public bool is_string(Context ctx);
-
-        [CCode (cname = "JSValueToBoolean", instance_pos = 1.1)]
-        public bool to_boolean(Context ctx);
-
-        [CCode (cname = "JSValueToNumber", instance_pos = 1.1)]
-        public double to_number(Context ctx, out Value exception);
-
-        [CCode (cname = "JSValueToObject", instance_pos = 1.1)]
-        public Object to_object(Context ctx, out Value exception);
-
-        [CCode (cname = "JSValueToStringCopy", instance_pos = 1.1)]
-        public String to_string_copy(Context ctx, out Value exception);
-
-   }
-
-   [CCode (cname = "JSStringRef")]
-    [SimpleType]
-   public struct String {
-
-        [CCode (cname = "JSStringCreateWithUTF8CString")]
-        public String.create_with_utf8_cstring(string str);
-
-        [CCode (cname = "JSStringGetLength")]
-        public int String.get_length();
-
-        [CCode (cname = "JSStringGetMaximumUTF8CStringSize")]
-        public int String.get_maximum_utf8_cstring_size();
-
-        [CCode (cname = "JSStringGetUTF8CString")]
-        public void String.get_utf8_cstring(string* buffer, int bufferSize);
-
-        [CCode (cname = "JSStringRetain")]
-        public void String.retain();
-
-        [CCode (cname = "JSStringRelease")]
-        public void String.release();
-
-   }
-
-}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1e4213fc..e0bebdf7 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -526,7 +526,7 @@ set(ENGINE_PACKAGES
   gio-2.0
   glib-2.0
   gmime-2.6
-  javascriptcore-4.0
+  javascriptcoregtk-4.0
   libxml-2.0
   posix
   sqlite3
@@ -551,7 +551,7 @@ set(WEB_PROCESS_PACKAGES
   geary-engine
   gee-0.8
   gtk+-3.0
-  javascriptcore-4.0
+  javascriptcoregtk-4.0
   libsoup-2.4
   webkit2gtk-web-extension-4.0
 )
@@ -618,7 +618,6 @@ add_definitions(${CFLAGS})
 set(VALAC_OPTIONS
     --vapidir=${CMAKE_BINARY_DIR}/src
     --vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi
-    --metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata
     --target-glib=${TARGET_GLIB}
     --thread
     --debug
@@ -650,38 +649,6 @@ set_property(
 )
 target_link_libraries(geary-engine m ${DEPS_LIBRARIES} sqlite3-unicodesn)
 
-# WebKit2GTK VAPI generation
-#################################################
-add_custom_target(webkit2gtk-vapi
-  DEPENDS
-    "${CMAKE_BINARY_DIR}/src/webkit2gtk-4.0.vapi"
-    "${CMAKE_BINARY_DIR}/src/webkit2gtk-web-extension-4.0.vapi"
-    "${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
-)
-add_custom_command(
-    OUTPUT
-        ${CMAKE_BINARY_DIR}/src/webkit2gtk-4.0.vapi
-    DEPENDS
-        "${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2-4.0.metadata"
-        "${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
-    WORKING_DIRECTORY
-        "${CMAKE_SOURCE_DIR}/bindings/metadata"
-    COMMAND
-        vapigen --library=webkit2gtk-4.0 --pkg gtk+-3.0 --pkg libsoup-2.4 --pkg javascriptcore-4.0 --vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi --metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata --directory=${CMAKE_BINARY_DIR}/src `${PKG_CONFIG_EXECUTABLE} --variable=girdir gobject-introspection-1.0`/WebKit2-4.0.gir
-)
-add_custom_command(
-    OUTPUT
-        "${CMAKE_BINARY_DIR}/src/webkit2gtk-web-extension-4.0.vapi"
-    DEPENDS
-        "${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2WebExtension-4.0.metadata"
-        "${CMAKE_SOURCE_DIR}/bindings/metadata/WebKit2WebExtension-4.0-custom.vala"
-        "${CMAKE_SOURCE_DIR}/bindings/vapi/javascriptcore-4.0.vapi"
-    WORKING_DIRECTORY
-        "${CMAKE_SOURCE_DIR}/bindings/metadata"
-    COMMAND
-        vapigen --library=webkit2gtk-web-extension-4.0 --pkg gtk+-3.0 --pkg libsoup-2.4 --pkg javascriptcore-4.0 --vapidir=${CMAKE_SOURCE_DIR}/bindings/vapi --metadatadir=${CMAKE_SOURCE_DIR}/bindings/metadata --directory=${CMAKE_BINARY_DIR}/src `${PKG_CONFIG_EXECUTABLE} --variable=girdir gobject-introspection-1.0`/WebKit2WebExtension-4.0.gir WebKit2WebExtension-4.0-custom.vala
-)
-
 # Client library (static lib used for building client and unit tests)
 #################################################
 
@@ -698,7 +665,7 @@ OPTIONS
 )
 
 add_library(geary-client STATIC ${CLIENT_VALA_C})
-add_dependencies(geary-client resource_copy webkit2gtk-vapi)
+add_dependencies(geary-client resource_copy)
 target_link_libraries(geary-client m ${DEPS_LIBRARIES} geary-engine)
 
 # Main client application binary
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index afcca95c..7517b3da 100644
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -56,7 +56,7 @@ set(TEST_PACKAGES
   glib-2.0
   gmime-2.6
   gtk+-3.0
-  javascriptcore-4.0
+  javascriptcoregtk-4.0
   libsoup-2.4
   webkit2gtk-4.0
 )
-- 
2.18.1