[shotwell/wip/phako/flatpak] Initial flatpak support



commit e9ffcac337fbbd82e4871010431dba6b373b5950
Author: Jens Georg <mail jensge org>
Date:   Tue May 22 22:50:22 2018 +0200

    Initial flatpak support

 flatpak/org.gnome.Shotwell.json         |  218 +++++++++++++++++++++++++++++++
 flatpak/patches/exiv2-no-builddir.patch |   25 ++++
 flatpak/patches/libraw-pkgconfig.patch  |   44 ++++++
 src/Application.vala                    |    4 +-
 4 files changed, 289 insertions(+), 2 deletions(-)
---
diff --git a/flatpak/org.gnome.Shotwell.json b/flatpak/org.gnome.Shotwell.json
new file mode 100644
index 0000000..3e7bf79
--- /dev/null
+++ b/flatpak/org.gnome.Shotwell.json
@@ -0,0 +1,218 @@
+{
+    "app-id": "org.gnome.Shotwell",
+    "runtime": "org.gnome.Platform",
+    "runtime-version": "3.28",
+    "sdk": "org.gnome.Sdk",
+    "command" : "shotwell",
+    "finish-args": [
+        "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
+        "--filesystem=~/.config/dconf:ro",
+        "--filesystem=xdg-download",
+        "--filesystem=xdg-pictures",
+        "--filesystem=xdg-run/dconf",
+        "--share=ipc",
+        "--share=network",
+        "--socket=wayland",
+        "--socket=x11",
+        "--talk-name=ca.desrt.dconf",
+        "--talk-name=org.freedesktop.FileManager1",
+        "--talk-name=org.gnome.SettingsDaemon",
+        "--talk-name=org.gtk.vfs",
+        "--talk-name=org.gtk.vfs.*"
+    ],
+
+    "modules" : [
+           {
+            "name": "libgee",
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : "https://download.gnome.org/sources/libgee/0.20/libgee-0.20.1.tar.xz";,
+                    "sha256" : "bb2802d29a518e8c6d2992884691f06ccfcc25792a5686178575c7111fea4630"
+                }
+            ],
+            "config-opts" : ["--disable-introspection", "--disable-docs"]
+           },
+           {
+            "name": "libghoto2",
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : 
"https://datapacket.dl.sourceforge.net/project/gphoto/libgphoto/2.5.18/libgphoto2-2.5.18.tar.bz2";,
+                    "sha256" : "5b17b89d7ca0ec35c72c94ac3701e87d49e52371f9509b8e5c08c913ae57a7ec"
+                }
+            ],
+            "config-opts" : ["--disable-introspection", "--disable-docs"]
+        },
+        {
+            "name": "libudev",
+            "buildsystem": "meson",
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : "https://github.com/systemd/systemd/archive/v238.tar.gz";,
+                    "sha256": "bbc8599bab2e3c4273886dfab12464e488ecdaf20b8284949e50f8858de3e022"
+                },
+                {
+                    "type": "patch",
+                    "path": "patches/lower-mount-dependency.patch"
+                }
+            ],
+            "cleanup" : [ "/bin", "/lib", "/etc", "/usr/bin" ],
+            "config-opts": [
+                "-Drootprefix=/app",
+                "-Dlibcryptsetup=false",
+                "-Dbashcompletiondir=no",
+                "-Dsysconfdir=/app/etc",
+                "-Dsysvinit-path=",
+                "-Dsysvrcnd-path=",
+                "-Drpmmacrosdir=no",
+                "-Dhibernate=false",
+                "-Dtpm=false",
+                "-Dcoredump=false",
+                "-Delfutils=false",
+                "-Dpam=false",
+                "-Daudit=false",
+                "-Dselinux=false",
+                "-Dapparmor=false",
+                "-Dlibidn=false",
+                "-Dlibiptc=false",
+                "-Dsmack=false",
+                "-Dima=false",
+                "-Dbinfmt=false",
+                "-Dquotacheck=false",
+                "-Dtmpfiles=false",
+                "-Drandomseed=false",
+                "-Dbacklight=false",
+                "-Dlogind=false",
+                "-Dmachined=false",
+                "-Dlibcurl=false",
+                "-Dimportd=false",
+                "-Dmicrohttpd=false",
+                "-Dgnutls=false",
+                "-Dhostnamed=false",
+                "-Dtimedated=false",
+                "-Dnetworkd=false",
+                "-Dtimesyncd=false",
+                "-Dlocaled=false",
+                "-Dmyhostname=false",
+                "-Dnss-systemd=false",
+                "-Dresolve=false",
+                "-Dpolkit=false",
+                "-Dacl=false",
+                "-Dgcrypt=false",
+                "-Drfkill=false",
+                "-Dhwdb=false",
+                "-Dman=false",
+                "-Defi=false",
+                "-Dgnuefi=false",
+                "-Dseccomp=false",
+                "-Dsysusers=false"
+            ]
+        },
+        {
+            "name": "gudev",
+            "sources" : [
+                {
+                    "type" : "archive",
+                    "url" : "https://download.gnome.org/sources/libgudev/232/libgudev-232.tar.xz";,
+                    "sha256" : "ee4cb2b9c573cdf354f6ed744f01b111d4b5bed3503ffa956cefff50489c7860"
+                }
+            ],
+            "config-opts" : ["--disable-introspection", "--disable-docs", "--disable-umockdev"]
+        },
+        {
+        "name": "exiv2",
+        "cleanup": [ "/bin" ],
+        "sources": [
+            {
+                "type": "archive",
+                "url": "http://exiv2.org/builds/exiv2-0.26-trunk.tar.gz";,
+                "sha256": "c75e3c4a0811bf700d92c82319373b7a825a2331c12b8b37d41eb58e4f18eafb"
+            },
+            {
+                "type": "patch",
+                "path": "patches/exiv2-no-builddir.patch"
+            },
+            {
+                "type": "shell",
+                "commands": [
+                    "cp -f /usr/share/automake-1.15/config.sub ./config/",
+                    "cp -f /usr/share/automake-1.15/config.guess ./config/"
+                ]
+            }
+        ]
+    },
+    {
+        "name": "gexiv2",
+        "config-opts" : ["--with-python2-girdir=/app/tmp", "--with-python3-girdir=/app/tmp"],
+        "build-options" : {
+            "env": {
+                "PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR": "/app/share/gir-1.0",
+                "PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR": "/app/lib/girepository-1.0"
+            }
+        },
+        "sources": [
+            {
+                "type": "git",
+                "url": "https://git.gnome.org/browse/gexiv2";
+            }
+        ]
+    },
+    
+    {
+        "name": "libraw",
+        "config-opts": [ "--disable-examples", "--disable-static" ],
+        "cleanup": [ "/share/doc" ],
+        "sources": [
+            {
+                "type": "archive",
+                "url": "https://www.libraw.org/data/LibRaw-0.18.8.tar.gz";,
+                "sha256": "56aca4fd97038923d57d2d17d90aa11d827f1f3d3f1d97e9f5a0d52ff87420e2"
+            },
+            {
+                "type": "patch",
+                "path": "patches/libraw-pkgconfig.patch"
+            }
+        ]
+    },
+    {
+        "name": "liboauth",
+        "sources": [
+            {
+                "type": "archive",
+                "url": "http://netix.dl.sourceforge.net/project/liboauth/liboauth-1.0.3.tar.gz";,
+                "sha256": "0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f"
+            }
+        ]
+    },
+    {
+        "name": "libgdata",
+        "config-opts": [ "--disable-always-build-tests",
+                         "--disable-introspection",
+                         "--disable-Werror",
+                         "--disable-static",
+                         "--disable-goa" ],
+        "sources": [
+            {
+                "type": "git",
+                "url": "https://git.gnome.org/browse/libgdata";
+            }
+        ]
+    },
+
+        {
+            "name": "shotwell",
+            "buildsystem": "meson",
+            "sources" : [
+                {
+                    "type": "git",
+                    "url" : "file:///home/jgeorg/Source/GNOME/shotwell"
+                }
+            ],
+            "post-install": [
+                "glib-compile-schemas /app/share/glib-2.0/schemas/"
+            ]
+        }
+    ]
+}
diff --git a/flatpak/patches/exiv2-no-builddir.patch b/flatpak/patches/exiv2-no-builddir.patch
new file mode 100644
index 0000000..1df8c22
--- /dev/null
+++ b/flatpak/patches/exiv2-no-builddir.patch
@@ -0,0 +1,25 @@
+From ba7a8cfe30342592e277ad41837f0eb5c6e88648 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi gnome org>
+Date: Wed, 20 Jan 2016 17:00:19 +0000
+Subject: [PATCH] Disable builddir for exiv2
+
+It's not supported.
+---
+ configure | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure b/configure
+index 4cd76eb..7848532 100755
+--- a/configure
++++ b/configure
+@@ -19914,6 +19914,8 @@ fi
+ # Configuration summary.
+ # ---------------------------------------------------------------------------
+ 
++echo \#buildapi-variable-no-builddir >/dev/null
++
+ echo ""
+ echo "------------------------------------------------------------------"
+ echo "-- Exiv2 $VERSION feature configuration summary"
+-- 
+2.5.0
diff --git a/flatpak/patches/libraw-pkgconfig.patch b/flatpak/patches/libraw-pkgconfig.patch
new file mode 100644
index 0000000..505fdd7
--- /dev/null
+++ b/flatpak/patches/libraw-pkgconfig.patch
@@ -0,0 +1,44 @@
+From bf4b0b6a3ec1579916475295ac42a5f98559a04b Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi gnome org>
+Date: Fri, 12 Feb 2016 18:29:35 +0000
+Subject: [PATCH] Add pkg-config file to LibRaw
+
+Taken from the Fedora package.
+---
+ libraw.pc.in   | 5 +++--
+ libraw_r.pc.in | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/libraw.pc.in b/libraw.pc.in
+index 0e530b2..0c635f0 100644
+--- a/libraw.pc.in
++++ b/libraw.pc.in
+@@ -5,7 +5,8 @@ includedir=@includedir@
+ 
+ Name: libraw
+ Description: Raw image decoder library (non-thread-safe)
+-Requires: @PACKAGE_REQUIRES@
++Requires.private: @PACKAGE_REQUIRES@
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
++Libs: -L${libdir} -lraw@PC_OPENMP@
++Libs.private: -lstdc++
+ Cflags: -I${includedir}/libraw
+diff --git a/libraw_r.pc.in b/libraw_r.pc.in
+index a7f4535..c4e6028 100644
+--- a/libraw_r.pc.in
++++ b/libraw_r.pc.in
+@@ -5,7 +5,8 @@ includedir=@includedir@
+ 
+ Name: libraw
+ Description: Raw image decoder library (thread-safe)
+-Requires: @PACKAGE_REQUIRES@
++Requires.private: @PACKAGE_REQUIRES@
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@
++Libs: -L${libdir} -lraw_r@PC_OPENMP@
++Libs.private: -lstdc++
+ Cflags: -I${includedir}/libraw
+-- 
+2.5.0
+
diff --git a/src/Application.vala b/src/Application.vala
index a1fff47..36acc41 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -42,13 +42,13 @@ public class Application {
             // attempt to be unique.  We don't request any command-line handling
             // here because this is processed elsewhere, and we don't need to handle
             // command lines from remote instances, since we don't care about them.
-            system_app = new Gtk.Application("org.yorba.shotwell-direct", GLib.ApplicationFlags.HANDLES_OPEN 
|
+            system_app = new Gtk.Application("org.gnome.Shotwell-direct", GLib.ApplicationFlags.HANDLES_OPEN 
|
                 GLib.ApplicationFlags.NON_UNIQUE);
         } else {
             // we've been invoked in library mode; set up for uniqueness and handling
             // of incoming command lines from remote instances (needed for getting
             // storage device and camera mounts).
-            system_app = new Gtk.Application("org.yorba.shotwell", GLib.ApplicationFlags.HANDLES_OPEN |
+            system_app = new Gtk.Application("org.gnome.Shotwell", GLib.ApplicationFlags.HANDLES_OPEN |
                 GLib.ApplicationFlags.HANDLES_COMMAND_LINE);
         }
 


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