Skip to content

Instantly share code, notes, and snippets.

@sp1ritCS
Created November 20, 2020 17:03
Show Gist options
  • Save sp1ritCS/b71b2656cfa35e362ff2524e8015e74c to your computer and use it in GitHub Desktop.
Save sp1ritCS/b71b2656cfa35e362ff2524e8015e74c to your computer and use it in GitHub Desktop.
clatexmath flatpak patch
From d64fd243bd3f49bbfa3c2908834fd47bd93651ab Mon Sep 17 00:00:00 2001
From: sp1rit <sp1rit@disroot.org>
Date: Fri, 20 Nov 2020 17:54:06 +0100
Subject: [PATCH] testing: flatpak
Signed-off-by: sp1rit <sp1rit@disroot.org>
---
com.github.nanomichael.clatexmath.yaml | 102 +++++++++++++++++++++++++
meson.build | 6 ++
src/samples/gtkmm_main.cpp | 4 +-
3 files changed, 110 insertions(+), 2 deletions(-)
create mode 100644 com.github.nanomichael.clatexmath.yaml
diff --git a/com.github.nanomichael.clatexmath.yaml b/com.github.nanomichael.clatexmath.yaml
new file mode 100644
index 0000000..556ee23
--- /dev/null
+++ b/com.github.nanomichael.clatexmath.yaml
@@ -0,0 +1,102 @@
+app-id: com.github.nanomichael.clatexmath
+runtime: org.gnome.Platform
+runtime-version: '3.38'
+sdk: org.gnome.Sdk
+command: clatexmath
+finish-args:
+ - --socket=wayland
+ - --socket=fallback-x11
+ - --device=dri
+modules:
+ - name: mm-common
+ buildsystem: meson
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/mm-common/1.0/mm-common-1.0.2.tar.xz
+ sha256: a2a99f3fa943cf662f189163ed39a2cfc19a428d906dd4f92b387d3659d1641d
+ cleanup:
+ - '*'
+
+ - name: sigc++
+ buildsystem: meson
+ config-opts:
+ - "-Dbuild-examples=false"
+ sources:
+ - type: archive
+ url: https://github.com/libsigcplusplus/libsigcplusplus/releases/download/2.10.4/libsigc++-2.10.4.tar.xz
+ sha256: '1f5874358d9a21379024a4f4edba80a8a3aeb33f0531b192a6b1c35ed7dbfa3e'
+ cleanup:
+ - '/lib/sigc++*'
+
+ - name: glibmm
+ config-opts:
+ - "--disable-documentation"
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/glibmm/2.64/glibmm-2.64.2.tar.xz
+ sha256: 'a75282e58d556d9b2bb44262b6f5fb76c824ac46a25a06f527108bec86b8d4ec'
+
+ - name: cairomm
+ config-opts:
+ - --disable-documentation
+ sources:
+ - type: archive
+ url: 'https://www.cairographics.org/releases/cairomm-1.12.2.tar.gz'
+ sha256: 45c47fd4d0aa77464a75cdca011143fea3ef795c4753f6e860057da5fb8bd599
+ cleanup:
+ - '/lib/cairomm*'
+
+ - name: pangomm
+ config-opts:
+ - --disable-documentation
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/pangomm/2.42/pangomm-2.42.1.tar.xz
+ sha256: '14bf04939930870d5cfa96860ed953ad2ce07c3fd8713add4a1bfe585589f40f'
+ cleanup:
+ - '/lib/pangomm*'
+
+ - name: atkmm
+ config-opts:
+ - --disable-documentation
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/atkmm/2.28/atkmm-2.28.0.tar.xz
+ sha256: 4c4cfc917fd42d3879ce997b463428d6982affa0fb660cafcc0bc2d9afcedd3a
+ cleanup:
+ - '/lib/atkmm*'
+
+ - name: gtkmm
+ config-opts:
+ - --disable-documentation
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/gtkmm/3.24/gtkmm-3.24.2.tar.xz
+ sha256: '6d71091bcd1863133460d4188d04102810e9123de19706fb656b7bb915b4adc3'
+ cleanup:
+ - '/lib/gdkmm*'
+ - '/lib/gtkmm*'
+
+ - name: gtksourceviewmm
+ config-opts:
+ - --disable-documentation
+ sources:
+ - type: archive
+ url : https://download.gnome.org/sources/gtksourceviewmm/3.21/gtksourceviewmm-3.21.3.tar.xz
+ sha256: 'dbb00b1c28e0407cc27d8b07a2ed0b4ea22f92e4b3e3006431cbd6726b6256b5'
+ cleanup:
+ - '/lib/gtksourceviewmm*'
+ modules:
+ - name: gtksourceview
+ config-opts:
+ - "--disable-gtk-doc"
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/gtksourceview/3.24/gtksourceview-3.24.8.tar.xz
+ sha256: 1e9bb8ff190db705deb916dd23ff681f0e8803aec407bf0fd64c7e615ac436fe
+
+ - name: cLaTeXMath
+ buildsystem: meson
+ sources:
+ - type: dir
+ path: .
diff --git a/meson.build b/meson.build
index d15dd09..2a1d2f0 100644
--- a/meson.build
+++ b/meson.build
@@ -99,6 +99,12 @@ clatexmath_lib = library('clatexmath', src,
soversion: 0,
install: true
)
+executable('clatexmath', src,
+ include_directories: clatexmath_inc,
+ dependencies: deps,
+ version: meson.project_version(),
+ install: true
+)
install_subdir('res/fonts', install_dir: get_option('datadir')/'clatexmath')
diff --git a/src/samples/gtkmm_main.cpp b/src/samples/gtkmm_main.cpp
index 94a5fe4..14b28c9 100644
--- a/src/samples/gtkmm_main.cpp
+++ b/src/samples/gtkmm_main.cpp
@@ -354,7 +354,7 @@ int runHeadless(const vector<string>& opts) {
}
int runWindow(int argc, char* argv[]) {
- auto app = Gtk::Application::create(argc, argv, "io.nano.LaTeX");
+ auto app = Gtk::Application::create(argc, argv, "com.github.nanomichael.clatexmath");
MainWindow win;
int result = app->run(win);
return result;
@@ -420,7 +420,7 @@ int main(int argc, char* argv[]) {
if (indexOf(opts, string("-h")) >= 0) return runHelp();
Pango::init();
- LaTeX::init();
+ LaTeX::init("/app/share/clatexmath");
int result = 0;
if (indexOf(opts, string("-headless")) >= 0) {
--
2.29.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment