From 727bfa2c87db170483c1e4ae895174295b070c77 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 9 Apr 2018 14:41:47 +0200 Subject: Merge in Flatpak improvements ...from : commit 7a2393f5fcab8c6938180c4718f2c61acd495528 Author: Robert McQueen Date: Tue Apr 3 10:41:22 2018 +0100 port to freedesktop.org 1.6 runtime Gtk+3/GIO/etc dependencies used by LO in "GNOME" mode are actually included in the freedesktop.org runtime. Try to build against fd.o by downgrading gst-libav (fd.o has gst 1.10 rather than gnome's 1.12), bundling dbus-glib and disable Gtk+ 2. commit 42650da01f270e86bfb40035a9194b23ccf24c4c Author: Robert McQueen Date: Tue Apr 3 11:23:27 2018 +0100 fix up LD_LIBRARY_PATH with gcc7 Append to library path rather than resetting it (causes build failures due to overriding /app/lib). commit 3e4c655294c8124cb54e1c651ec4dc1230b8151e Author: Robert McQueen Date: Tue Apr 3 11:25:02 2018 +0100 fixup solenv/bin/assemble_flatpak.sh Use mkdir -p to be robust to other modules (ie dbus-glib) creating some of the paths before we do. commit d1d449ffa837b1de876f524494dbce09ec92ce73 Author: Robert McQueen Date: Wed Apr 4 15:50:49 2018 +0100 split resource/registry data into Locales extension Move the language-specific data into the /app/share/runtime path which flatpak-builder splits into the Locale extension if we re-enable separate-locales. We symlink the original locations back to these paths, which means we have dangling symlinks depending on which Locale sutpaths are installed. Include Stephan Bergmann's patch from https://gerrit.libreoffice.org/#/c/52381/ to make the configmgr robust to such dangling links. commit ad6674f166c68fb79e19d80950a104a0a33f81dc Author: Robert McQueen Date: Wed Apr 4 16:05:28 2018 +0100 make locale split glob more specific This loop will fail if the share/registry/res folder gains any .xcd files which are not named fcfg_langpack_* or registry_* so just to be safe, only glob these files. Change-Id: Icd41d7077b9f308dbb196927715b210328709662 Reviewed-on: https://gerrit.libreoffice.org/52642 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- solenv/bin/assemble-flatpak.sh | 35 +++++++++++++++++++++++++++++++---- solenv/flatpak-manifest.in | 35 ++++++++++++++++++++++++----------- 2 files changed, 55 insertions(+), 15 deletions(-) (limited to 'solenv') diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh index 67cf47bad33d..b0f718a5091f 100755 --- a/solenv/bin/assemble-flatpak.sh +++ b/solenv/bin/assemble-flatpak.sh @@ -16,8 +16,7 @@ set -e cp -r "${PREFIXDIR?}"/lib/libreoffice /app/ ## libreoffice-*.desktop -> org.libreoffice.LibreOffice-*.desktop: -mkdir /app/share -mkdir /app/share/applications +mkdir -p /app/share/applications for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop do sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \ @@ -29,7 +28,7 @@ mv /app/share/applications/org.libreoffice.LibreOffice-startcenter.desktop \ ## icons/hicolor/*/apps/libreoffice-* -> ## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*: -mkdir /app/share/icons +mkdir -p /app/share/icons for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-* do mkdir -p \ @@ -38,11 +37,39 @@ do "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}" done +mkdir -p /app/share/runtime/locale +for i in $(ls /app/libreoffice/program/resource) +do + lang="${i%[_@]*}" + mkdir -p /app/share/runtime/locale/"${lang}"/resource + mv /app/libreoffice/program/resource/"${i}" /app/share/runtime/locale/"${lang}"/resource + ln -s ../../../share/runtime/locale/"${lang}"/resource/"${i}" /app/libreoffice/program/resource +done + +for i in /app/libreoffice/share/registry/Langpack-*.xcd /app/libreoffice/share/registry/res/{fcfg_langpack,registry}_*.xcd +do + basename="$(basename "${i}" .xcd)" + lang="${basename#Langpack-}" + lang="${lang#fcfg_langpack_}" + lang="${lang#registry_}" + + # ship the base app with at least one Langpack/fcfg_langpack + if [ "${lang}" = "en-US" ] + then + continue + fi + + lang="${lang%-*}" + mkdir -p /app/share/runtime/locale/"${lang}"/registry + mv "${i}" /app/share/runtime/locale/"${lang}"/registry + ln -rs /app/share/runtime/locale/"${lang}"/registry/"${basename}".xcd "${i}" +done + ## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various ## inst/share/appdata/libreoffice-*.appdata.xml (at least recent GNOME Software ## doesn't show more than five screenshots anyway, so restrict to one each from ## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base): -mkdir /app/share/appdata +mkdir -p /app/share/appdata cat </app/share/appdata/org.libreoffice.LibreOffice.appdata.xml diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 594f99dd8646..766d5373d658 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -1,21 +1,20 @@ { "id": "org.libreoffice.LibreOffice", - "runtime": "org.gnome.Platform", - "runtime-version": "3.26", - "sdk": "org.gnome.Sdk", + "runtime": "org.freedesktop.Platform", + "runtime-version": "1.6", + "sdk": "org.freedesktop.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.gcc7", "org.freedesktop.Sdk.Extension.openjdk9" ], "build-options": { + "append-ld-library-path": "/usr/lib/sdk/gcc7/lib", "env": { "CC": "/usr/lib/sdk/gcc7/bin/gcc", - "CXX": "/usr/lib/sdk/gcc7/bin/g++", - "LD_LIBRARY_PATH": "/usr/lib/sdk/gcc7/lib" + "CXX": "/usr/lib/sdk/gcc7/bin/g++" } }, "command": "/app/libreoffice/program/soffice", - "separate-locales": false, "modules": [ { "name": "gcc7", @@ -34,14 +33,28 @@ }, { "name": "gst-libav", - "buildsystem": "meson", - "builddir": true, - "config-opts": ["-Ddisable_gtkdoc=true"], + "config-opts": [ "--disable-gtk-doc", "--with-system-libav" ], + "cleanup": [ "*.la", "/share/gtk-doc" ], + "sources": [ + { + "type" : "archive", + "url" : "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.10.5.tar.xz", + "sha256" : "e4d2f315f478d47281fbfdfbd590a63d23704ca37911d7142d5992616f4b28d3" + } + ] + }, + { + "name": "dbus-glib", + "cleanup": [ "*.la", "/bin", "/etc", "/include", "/libexec", "/share/gtk-doc", "/share/man" ], + "config-opts": [ + "--disable-static", + "--disable-gtk-doc" + ], "sources": [ { "type": "archive", - "url": "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.12.4.tar.xz", - "sha256": "2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62" + "url": "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.108.tar.gz", + "sha256": "9f340c7e2352e9cdf113893ca77ca9075d9f8d5e81476bf2bf361099383c602c" } ] }, -- cgit