[gnome-build-meta/abderrahim/32bit-compat: 3/4] flatpak: provide 32-bit compat extensions for the platform and sdk



commit f1ebc85d293ba20c31302f60734b79a87ba68d72
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Sun Sep 1 15:35:22 2019 +0100

    flatpak: provide 32-bit compat extensions for the platform and sdk
    
    Fixes #168

 elements/flatpak-runtimes.bst                 | 37 +++++++++++++++++++++++++++
 elements/flatpak/platform-arch-libs-debug.bst | 16 ++++++++++++
 elements/flatpak/platform-arch-libs.bst       | 16 ++++++++++++
 elements/flatpak/sdk-arch-libs-debug.bst      | 15 +++++++++++
 elements/flatpak/sdk-arch-libs.bst            | 15 +++++++++++
 elements/flatpak/sdk.bst                      | 36 ++++++++++++++++++++++++++
 6 files changed, 135 insertions(+)
---
diff --git a/elements/flatpak-runtimes.bst b/elements/flatpak-runtimes.bst
index abdd9ce8..8717629c 100644
--- a/elements/flatpak-runtimes.bst
+++ b/elements/flatpak-runtimes.bst
@@ -4,6 +4,10 @@ depends:
   type: build
 - filename: flatpak/platform-locale.bst
   type: build
+- filename: flatpak/platform-arch-libs.bst
+  type: build
+- filename: flatpak/platform-arch-libs-debug.bst
+  type: build
 - filename: flatpak/sdk.bst
   type: build
 - filename: flatpak/sdk-debug.bst
@@ -12,6 +16,10 @@ depends:
   type: build
 - filename: flatpak/sdk-locale.bst
   type: build
+- filename: flatpak/sdk-arch-libs.bst
+  type: build
+- filename: flatpak/sdk-arch-libs-debug.bst
+  type: build
 - filename: deploy-tools/flatpak.bst
   junction: freedesktop-sdk.bst
   type: build
@@ -21,3 +29,32 @@ config:
     - deploy-tools/flatpak.bst
   arch: '%{gcc_arch}'
   repo-mode: bare-user-only
+  (?):
+  - arch == 'i686':
+      copy-refs:
+      - src: runtime/org.gnome.Platform.Compat.%{gcc_arch}/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Platform.Compat.%{gcc_arch}/x86_64/%{branch}
+      - src: runtime/org.gnome.Platform.Compat.%{gcc_arch}.Debug/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Platform.Compat.%{gcc_arch}.Debug/x86_64/%{branch}
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/x86_64/%{branch}
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/x86_64/%{branch}
+
+  - arch == 'arm':
+      copy-refs:
+      - src: runtime/org.gnome.Platform.Compat.%{gcc_arch}/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Platform.Compat.%{gcc_arch}/aarch64/%{branch}
+      - src: runtime/org.gnome.Platform.Compat.%{gcc_arch}.Debug/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Platform.Compat.%{gcc_arch}.Debug/aarch64/%{branch}
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/x86_64/%{branch}
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/x86_64/%{branch}
+
+  - arch == 'aarch64':
+      copy-refs:
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}/x86_64/%{branch}
+      - src: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/%{gcc_arch}/%{branch}
+        dest: runtime/org.gnome.Sdk.Compat.%{gcc_arch}.Debug/x86_64/%{branch}
diff --git a/elements/flatpak/platform-arch-libs-debug.bst b/elements/flatpak/platform-arch-libs-debug.bst
new file mode 100644
index 00000000..7d03a670
--- /dev/null
+++ b/elements/flatpak/platform-arch-libs-debug.bst
@@ -0,0 +1,16 @@
+kind: flatpak_image
+depends:
+- filename: flatpak/platform-image.bst
+  type: build
+
+config:
+  directory: '%{debugdir}%{libdir}'
+  include:
+  - debug
+
+  metadata:
+    Runtime:
+      name: org.gnome.Platform.Compat.%{gcc_arch}.Debug
+    ExtensionOf:
+      ref: runtime/org.gnome.Platform/%{gcc_arch}/%{branch}
+
diff --git a/elements/flatpak/platform-arch-libs.bst b/elements/flatpak/platform-arch-libs.bst
new file mode 100644
index 00000000..0ae001e1
--- /dev/null
+++ b/elements/flatpak/platform-arch-libs.bst
@@ -0,0 +1,16 @@
+kind: flatpak_image
+depends:
+- filename: flatpak/platform-image.bst
+  type: build
+
+config:
+  directory: '%{libdir}'
+  exclude:
+  - debug
+
+  metadata:
+    Runtime:
+      name: org.gnome.Platform.Compat.%{gcc_arch}
+    ExtensionOf:
+      ref: runtime/org.gnome.Platform/%{gcc_arch}/%{branch}
+
diff --git a/elements/flatpak/sdk-arch-libs-debug.bst b/elements/flatpak/sdk-arch-libs-debug.bst
new file mode 100644
index 00000000..dbafa0bd
--- /dev/null
+++ b/elements/flatpak/sdk-arch-libs-debug.bst
@@ -0,0 +1,15 @@
+kind: flatpak_image
+depends:
+- filename: flatpak/sdk-image.bst
+  type: build
+
+config:
+  directory: '%{debugdir}%{libdir}'
+  include:
+  - debug
+
+  metadata:
+    Runtime:
+      name: org.gnome.Sdk.Compat.%{gcc_arch}.Debug
+    ExtensionOf:
+      ref: runtime/org.gnome.Sdk/%{gcc_arch}/%{branch}
diff --git a/elements/flatpak/sdk-arch-libs.bst b/elements/flatpak/sdk-arch-libs.bst
new file mode 100644
index 00000000..1d7dd509
--- /dev/null
+++ b/elements/flatpak/sdk-arch-libs.bst
@@ -0,0 +1,15 @@
+kind: flatpak_image
+depends:
+- filename: flatpak/sdk-image.bst
+  type: build
+
+config:
+  directory: '%{libdir}'
+  exclude:
+  - debug
+
+  metadata:
+    Runtime:
+      name: org.gnome.Sdk.Compat.%{gcc_arch}
+    ExtensionOf:
+      ref: runtime/org.gnome.Sdk/%{gcc_arch}/%{branch}
diff --git a/elements/flatpak/sdk.bst b/elements/flatpak/sdk.bst
index 56040619..81c7dca1 100644
--- a/elements/flatpak/sdk.bst
+++ b/elements/flatpak/sdk.bst
@@ -100,3 +100,39 @@ config:
       no-autodownload: 'true'
       download-if: have-intel-gpu
       version: '%{freedesktop-sdk-flatpak-branch}'
+
+    (?):
+    - arch in ["x86_64", "aarch64"]:
+        Extension org.gnome.Sdk.Compat.arm:
+          directory: 'lib/arm-linux-gnueabihf'
+          autodelete: 'true'
+          no-autodownload: 'true'
+          add-ld-path: '.'
+
+        Extension org.gnome.Sdk.Compat.arm.Debug:
+          directory: 'lib/arm-linux-gnueabihf'
+          autodelete: 'true'
+          no-autodownload: 'true'
+
+    - arch == "x86_64":
+        Extension org.gnome.Sdk.Compat.i386:
+          directory: 'lib/i386-linux-gnu'
+          autodelete: 'true'
+          no-autodownload: 'true'
+          add-ld-path: '.'
+
+        Extension org.gnome.Sdk.Compat.i386.Debug:
+          directory: 'lib/debug/usr/lib/i386-linux-gnu'
+          autodelete: 'true'
+          no-autodownload: 'true'
+
+        Extension org.gnome.Sdk.Compat.aarch64:
+          directory: 'lib/aarch64-linux-gnu'
+          autodelete: 'true'
+          no-autodownload: 'true'
+          add-ld-path: '.'
+
+        Extension org.gnome.Sdk.Compat.aarch64.Debug:
+          directory: "lib/debug/usr/lib/aarch64-linux-gnu"
+          autodelete: 'true'
+          no-autodownload: 'true'


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