[gnome-build-meta/abderrahim/flatpak-sdk-fixes: 6/9] sdk/WebKitGTK+: add toolchain files to fix cross-compilation on i386 and arm



commit 4705f1d99cdeddcad411ad3c324df6523ebc32d8
Author: Abderrahim Kitouni <a kitouni gmail com>
Date:   Wed Sep 5 14:00:31 2018 +0100

    sdk/WebKitGTK+: add toolchain files to fix cross-compilation on i386 and arm
    
    Fixes #52

 elements/sdk/WebKitGTK+.bst    | 12 ++++++++----
 files/webkitgtk/toolchain.arm  |  2 ++
 files/webkitgtk/toolchain.i386 |  2 ++
 3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/elements/sdk/WebKitGTK+.bst b/elements/sdk/WebKitGTK+.bst
index 9de8d7d..1602424 100644
--- a/elements/sdk/WebKitGTK+.bst
+++ b/elements/sdk/WebKitGTK+.bst
@@ -2,6 +2,10 @@ kind: cmake
 sources:
 - kind: tar
   url: webkitgtk_org:webkitgtk-2.22.0.tar.xz
+- kind: local
+  path: files/webkitgtk/toolchain.i386
+- kind: local
+  path: files/webkitgtk/toolchain.arm
 depends:
 - sdk/at-spi2-core.bst
 - sdk/brotli.bst
@@ -31,11 +35,11 @@ depends:
   junction: freedesktop-sdk.bst
   type: runtime
 variables:
-  webkitgtk_target: ''
+  webkitgtk_toolchain: ''
   (?):
     - arch == "i386":
-        webkitgtk_target: "-DCMAKE_SYSTEM_PROCESSOR=i586"
+        webkitgtk_toolchain: -DCMAKE_TOOLCHAIN_FILE=toolchain.i386
     - arch == "arm":
-        webkitgtk_target: "-DCMAKE_SYSTEM_PROCESSOR=arm -DENABLE_JIT=OFF"
-  cmake-local: -DPORT=GTK -DENABLE_PLUGIN_PROCESS_GTK2=OFF %{webkitgtk_target}
+        webkitgtk_toolchain: -DCMAKE_TOOLCHAIN_FILE=toolchain.arm
+  cmake-local: -DPORT=GTK -DENABLE_PLUGIN_PROCESS_GTK2=OFF %{webkitgtk_toolchain}
   max-jobs: 2
diff --git a/files/webkitgtk/toolchain.arm b/files/webkitgtk/toolchain.arm
new file mode 100644
index 0000000..c53944b
--- /dev/null
+++ b/files/webkitgtk/toolchain.arm
@@ -0,0 +1,2 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR arm)
diff --git a/files/webkitgtk/toolchain.i386 b/files/webkitgtk/toolchain.i386
new file mode 100644
index 0000000..e4b85de
--- /dev/null
+++ b/files/webkitgtk/toolchain.i386
@@ -0,0 +1,2 @@
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR i586)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]