[gnome-latex/wip/flatpak2: 1/2] flatpak: Add flatpak manifest for gnome-latex
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-latex/wip/flatpak2: 1/2] flatpak: Add flatpak manifest for gnome-latex
- Date: Wed, 24 Jul 2019 18:11:32 +0000 (UTC)
commit 465cca6ce16374d7fa6ad609f821285c992a7e0d
Author: Thomas Coldrick <othko97 gmail com>
Date: Sun Jan 13 15:12:14 2019 +0000
flatpak: Add flatpak manifest for gnome-latex
Adds a flatpak manifest for gnome-latex, which seems to function
properly. This uses the new org.freedesktop.Sdk.Extension.texlive
extension in flathub [0] to solve the issue of how to handle including
texlive.
Unfortunately, gnome-latex does not compile against the latest version
of vala, which is used in the SDK, so I had to bundle vala with the app.
This also required a patch to stop building valadoc, and thus remove a
dependency on graphviz.
As the extension used is for the SDK, rather than the platform, this app
has to use org.gnome.Sdk as the runtime, otherwise the extension is not
loaded. Additionally $PATH is modified specifically for x86_64-linux,
however as the texlive extension is only compiled for x86_64 this app
wouldn't be able to run using this extension on other architectures anyway.
[0]: https://github.com/flathub/org.freedesktop.Sdk.Extension.texlive
flatpak/Allow-disabling-valadoc.patch | 137 ++++++++++++++++++++++++++++++++++
flatpak/org.gnome.gnome-latex.json | 120 +++++++++++++++++++++++++++++
2 files changed, 257 insertions(+)
---
diff --git a/flatpak/Allow-disabling-valadoc.patch b/flatpak/Allow-disabling-valadoc.patch
new file mode 100644
index 0000000..541891b
--- /dev/null
+++ b/flatpak/Allow-disabling-valadoc.patch
@@ -0,0 +1,137 @@
+diff -ruN vala-0.40.8.old/configure.ac vala-0.40.8/configure.ac
+--- vala-0.40.8.old/configure.ac 2018-07-16 12:32:40.000000000 +0100
++++ vala-0.40.8/configure.ac 2018-08-01 10:23:36.977684625 +0100
+@@ -112,35 +112,37 @@
+ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+
+-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+-AC_MSG_CHECKING([for CGRAPH])
+-cgraph_tmp_LIBADD="$LIBADD"
+-cgraph_tmp_CFLAGS="$CFLAGS"
+-LIBADD="$LIBADD $LIBGVC_LIBS"
+-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+-AC_RUN_IFELSE(
+- [AC_LANG_SOURCE([
+- #include <gvc.h>
+-
+- int main(void) {
+- #ifdef WITH_CGRAPH
+- return 0;
+- #else
+- return -1;
+- #endif
+- }
+- ])], [
+- AC_MSG_RESULT([yes])
+- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+- have_cgraph=yes
+- ], [
+- AC_MSG_RESULT([no])
+- have_cgraph=no
+- ]
+-)
+-LIBADD="$cgraph_tmp_LIBADD"
+-CFLAGS="$cgraph_tmp_CFLAGS"
+-AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
++AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval,
enable_valadoc=yes)
++if test x$enable_valadoc = xyes; then
++ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
++ AC_MSG_CHECKING([for CGRAPH])
++ cgraph_tmp_LIBADD="$LIBADD"
++ cgraph_tmp_CFLAGS="$CFLAGS"
++ LIBADD="$LIBADD $LIBGVC_LIBS"
++ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
++ AC_RUN_IFELSE(
++ [AC_LANG_SOURCE([
++ #include <gvc.h>
++ int main(void) {
++ #ifdef WITH_CGRAPH
++ return 0;
++ #else
++ return -1;
++ #endif
++ }
++ ])], [
++ AC_MSG_RESULT([yes])
++ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
++ have_cgraph=yes
++ ], [
++ AC_MSG_RESULT([no])
++ have_cgraph=no
++ ]
++ )
++ LIBADD="$cgraph_tmp_LIBADD"
++ CFLAGS="$cgraph_tmp_CFLAGS"
++fi
++AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
+
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+ AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
+
+diff -ruN vala-0.40.8.old/doc/Makefile.am vala-0.40.8/doc/Makefile.am
+--- vala-0.40.8.old/doc/Makefile.am 2018-07-12 13:08:31.000000000 +0100
++++ vala-0.40.8/doc/Makefile.am 2018-08-01 10:31:02.440288711 +0100
+@@ -6,7 +6,6 @@
+
+ dist_man_MANS = \
+ valac.1 \
+- valadoc.1 \
+ vala-gen-introspect.1 \
+ vapigen.1 \
+ $(NULL)
+@@ -19,7 +18,11 @@
+ $(NULL)
+
+ if HAVE_HELP2MAN
++if ENABLE_VALADOC
+ manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
++else
++manpages: valac.1 vala-gen-introspect.1 vapigen.1
++endif
+ @rm $^
+ $(MAKE) $(AM_MAKEFLAGS) $^
+
+@@ -49,7 +52,9 @@
+ if ENABLE_UNVERSIONED
+ install-data-hook:
+ cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
++if ENABLE_VALADOC
+ cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
++endif
+ cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
+ cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
+ endif
+@@ -70,7 +75,7 @@
+ --basedir=internal-apis/ \
+ $(NULL)
+
+-if HAVE_CGRAPH
++if ENABLE_VALADOC
+ COMMON_VALADOCFLAGS += -D WITH_CGRAPH
+ endif
+
+diff -ruN vala-0.40.8.old/Makefile.am vala-0.40.8/Makefile.am
+--- vala-0.40.8.old/Makefile.am 2018-07-16 07:15:16.000000000 +0100
++++ vala-0.40.8/Makefile.am 2018-08-01 10:23:36.977684625 +0100
+@@ -13,9 +13,19 @@
+ doc \
+ gobject-introspection \
+ vapigen \
++ $(NULL)
++
++if ENABLE_VALADOC
++SUBDIRS += \
+ libvaladoc \
+ valadoc \
+ $(NULL)
++endif
++
++DISTCHECK_CONFIGURE_FLAGS = \
++ --enable-valadoc \
++ --enable-unversioned \
++ $(NULL)
+
+ if ENABLE_UNVERSIONED
+ aclocaldir = $(datadir)/aclocal
+
diff --git a/flatpak/org.gnome.gnome-latex.json b/flatpak/org.gnome.gnome-latex.json
new file mode 100644
index 0000000..22f14fd
--- /dev/null
+++ b/flatpak/org.gnome.gnome-latex.json
@@ -0,0 +1,120 @@
+{
+ "app-id" : "org.gnome.gnome-latex",
+ "runtime" : "org.gnome.Sdk",
+ "runtime-version" : "3.30",
+ "platform-extensions" : [
+ "org.freedesktop.Sdk.Extension.texlive"
+ ],
+ "sdk" : "org.gnome.Sdk",
+ "command" : "gnome-latex",
+ "finish-args" : [
+ "--socket=x11",
+ "--socket=wayland",
+ "--filesystem=home",
+ "--share=ipc",
+ "--socket=session-bus",
+ "--talk-name=ca.desrt.dconf",
+ "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
+ "--talk-name=org.freedesktop.Notifications",
+ "--env=PATH=/usr/bin:/app/bin:/usr/lib/sdk/texlive/bin/x86_64-linux"
+ ],
+ "cleanup" : ["/include", "/lib/pkgconfig",
+ "/share/pkfconfig", "/share/aclocal",
+ "/man", "/share/man", "/share/gtk-doc",
+ "/share/vala",
+ "*.la", "*.a"],
+ "modules" : [
+ {
+ "name" : "vala",
+ "config-opts" : [
+ "--disable-valadoc"
+ ],
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/vala.git",
+ "tag" : "0.40.12"
+ },
+ {
+ "type" : "patch",
+ "path" : "Allow-disabling-valadoc.patch"
+ }
+ ]
+ },
+ {
+ "name" : "gtksourceview-4",
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/gtksourceview.git"
+ }
+ ]
+ },
+ {
+ "name" : "amtk",
+ "builddir" : true,
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/amtk.git",
+ "tag" : "5.0.0"
+ }
+ ]
+ },
+ {
+ "name" : "uchardet",
+ "buildsystem" : "cmake",
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://github.com/BYVoid/uchardet.git",
+ "tag" : "v0.0.5"
+ }
+ ]
+ },
+ {
+ "name" : "tepl",
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/tepl.git",
+ "tag" : "4.2.0"
+ }
+ ]
+ },
+ {
+ "name" : "gspell",
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/gspell.git",
+ "tag" : "1.8.1"
+ }
+ ]
+ },
+ {
+ "name" : "libgee",
+ "config-opts" : [
+ "--enable-introspection=no",
+ "--disable-static"
+ ],
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/libgee.git",
+ "tag" : "0.20.1"
+ }
+ ]
+ },
+ {
+ "name" : "gnome-latex",
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://gitlab.gnome.org/GNOME/gnome-latex.git",
+ "tag" : "3.30.2"
+ }
+ ]
+ }
+ ]
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]