From ddc81443a8c85f7e6f6d9cdf681ddbb09ca2482c Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 6 May 2026 16:57:33 +0200 Subject: [PATCH 1/4] meson: initial distscript attempt --- data/fonts/fontconfig.sh | 7 +++++++ data/fonts/meson.build | 17 +++++++++++++++++ data/meson.build | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100755 data/fonts/fontconfig.sh create mode 100644 data/fonts/meson.build diff --git a/data/fonts/fontconfig.sh b/data/fonts/fontconfig.sh new file mode 100755 index 00000000..c5710373 --- /dev/null +++ b/data/fonts/fontconfig.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + + +echo "DIST_SCRIPTS: Updating font cache" +#fc-cache $MESON_DIST_ROOT/data/fonts/RedactedScript-Regular.ttf +pwd +fc-cache . \ No newline at end of file diff --git a/data/fonts/meson.build b/data/fonts/meson.build new file mode 100644 index 00000000..acfcfec6 --- /dev/null +++ b/data/fonts/meson.build @@ -0,0 +1,17 @@ + +target_font_dir = get_option('datadir') / 'fonts' / 'truetype' / 'redacted-elementary' + +install_data( + 'RedactedScript-Regular.ttf', + install_dir: target_font_dir, +) + +# We need to regen the font cache or else the font will not be usable +fontconfig = find_program('fc-cache', required: true) + + +#out = run_command(fontconfig, target_font_dir, check: true) +#message(out.stdout().strip()) + +meson.add_dist_script('fontconfig.sh') + diff --git a/data/meson.build b/data/meson.build index f385411a..6a7273cd 100644 --- a/data/meson.build +++ b/data/meson.build @@ -43,6 +43,12 @@ if not windows_build # ICONS subdir('icons') + + #======================== + # FONTS + subdir('fonts') + + #======================== # DESKTOP # Inject some variables into the desktop file before merging in the translations From 2cb9fc305527f1d389859d754fc06b2f6574353e Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 6 May 2026 17:00:17 +0200 Subject: [PATCH 2/4] leave it to meson --- io.github.elly_code.jorts.devel.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/io.github.elly_code.jorts.devel.yml b/io.github.elly_code.jorts.devel.yml index e2119f01..2ebd62ad 100644 --- a/io.github.elly_code.jorts.devel.yml +++ b/io.github.elly_code.jorts.devel.yml @@ -20,17 +20,6 @@ finish-args: - '--socket=wayland' modules: - # Needed for the Scribbly mode - # It should be present by default on elementary OS, but better not assume it is the case - - name: RedactedScript - buildsystem: simple - build-commands: - - install -Dm0644 RedactedScript-Regular.ttf -t ${FLATPAK_DEST}/share/fonts - sources: - - type: file - url: https://github.com/christiannaths/redacted-font/raw/63e542017bab347ba9be54d7d99b99d4754c3d97/RedactedScript/fonts/ttf/RedactedScript-Regular.ttf - sha256: 1ebaab9642a2f43fa33f449760469903143fd1d08b2433eb6c15e28602d9360d - - name: jorts buildsystem: meson config-opts: From dcd224fae8cf27236fdd04a276f0887ebbc6eedd Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 6 May 2026 19:11:59 +0200 Subject: [PATCH 3/4] Meson: Install RedactedFont instead of leaving it to the Flatpak manifest --- data/fonts/fontconfig.sh | 7 ------- data/fonts/meson.build | 17 ++++++++--------- data/icons/meson.build | 4 +++- data/meson.build | 3 +++ io.github.ellie_commons.jorts.flathub.yml | 15 ++------------- io.github.elly_code.jorts.devel.yml | 4 ++-- io.github.elly_code.jorts.yml | 15 ++------------- 7 files changed, 20 insertions(+), 45 deletions(-) delete mode 100755 data/fonts/fontconfig.sh diff --git a/data/fonts/fontconfig.sh b/data/fonts/fontconfig.sh deleted file mode 100755 index c5710373..00000000 --- a/data/fonts/fontconfig.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - - -echo "DIST_SCRIPTS: Updating font cache" -#fc-cache $MESON_DIST_ROOT/data/fonts/RedactedScript-Regular.ttf -pwd -fc-cache . \ No newline at end of file diff --git a/data/fonts/meson.build b/data/fonts/meson.build index acfcfec6..6854c9ee 100644 --- a/data/fonts/meson.build +++ b/data/fonts/meson.build @@ -1,17 +1,16 @@ +# +# FONTS +# -target_font_dir = get_option('datadir') / 'fonts' / 'truetype' / 'redacted-elementary' +# CAREFUL HERE: In the flatpak, the apps cant find it +target_font_dir = get_option('datadir') / 'fonts' install_data( 'RedactedScript-Regular.ttf', install_dir: target_font_dir, ) -# We need to regen the font cache or else the font will not be usable -fontconfig = find_program('fc-cache', required: true) - - -#out = run_command(fontconfig, target_font_dir, check: true) -#message(out.stdout().strip()) - -meson.add_dist_script('fontconfig.sh') +# NOT NEEDED FOR FLATPAK // We need to regen the font cache or else the font will not be usable +#fontconfig = find_program('fc-cache', required: true) +#meson.add_install_script(fontconfig, target_font_dir) diff --git a/data/icons/meson.build b/data/icons/meson.build index 2ccfa7c3..5347e64d 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -1,4 +1,6 @@ - +# +# ICONS +# # Override only default if development_build and variant == 'default' diff --git a/data/meson.build b/data/meson.build index 6a7273cd..1c87e869 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,3 +1,6 @@ +# +# METADATA +# #======================== # GRESOURCE diff --git a/io.github.ellie_commons.jorts.flathub.yml b/io.github.ellie_commons.jorts.flathub.yml index 3d1e77d5..4865cbeb 100644 --- a/io.github.ellie_commons.jorts.flathub.yml +++ b/io.github.ellie_commons.jorts.flathub.yml @@ -8,10 +8,10 @@ sdk: org.gnome.Sdk command: io.github.ellie_commons.jorts finish-args: + - '--socket=wayland' + - '--socket=fallback-x11' - '--share=ipc' - '--device=dri' - - '--socket=fallback-x11' - - '--socket=wayland' cleanup: - /include @@ -25,17 +25,6 @@ cleanup-commands: - /app/cleanup-BaseApp.sh modules: - # Needed for the Scribbly mode - # It should be present by default on elementary OS, but better not assume it is the case - - name: RedactedScript - buildsystem: simple - build-commands: - - install -Dm0644 RedactedScript-Regular.ttf -t ${FLATPAK_DEST}/share/fonts - sources: - - type: file - url: https://github.com/christiannaths/redacted-font/raw/63e542017bab347ba9be54d7d99b99d4754c3d97/RedactedScript/fonts/ttf/RedactedScript-Regular.ttf - sha256: 1ebaab9642a2f43fa33f449760469903143fd1d08b2433eb6c15e28602d9360d - - name: jorts buildsystem: meson config-opts: diff --git a/io.github.elly_code.jorts.devel.yml b/io.github.elly_code.jorts.devel.yml index 2ebd62ad..658bc759 100644 --- a/io.github.elly_code.jorts.devel.yml +++ b/io.github.elly_code.jorts.devel.yml @@ -14,10 +14,10 @@ tags: ['devel'] desktop-file-name-suffix: ' (Development)' finish-args: + - '--socket=wayland' + - '--socket=fallback-x11' - '--share=ipc' - '--device=dri' - - '--socket=fallback-x11' - - '--socket=wayland' modules: - name: jorts diff --git a/io.github.elly_code.jorts.yml b/io.github.elly_code.jorts.yml index 43bd0e0e..c5309391 100644 --- a/io.github.elly_code.jorts.yml +++ b/io.github.elly_code.jorts.yml @@ -5,10 +5,10 @@ sdk: io.elementary.Sdk command: io.github.elly_code.jorts finish-args: + - '--socket=wayland' + - '--socket=fallback-x11' - '--share=ipc' - '--device=dri' - - '--socket=fallback-x11' - - '--socket=wayland' cleanup: - /include @@ -18,17 +18,6 @@ cleanup: - /share/vala modules: - # Needed for the Scribbly mode - # It should be present by default on elementary OS, but better not assume it is the case - - name: RedactedScript - buildsystem: simple - build-commands: - - install -Dm0644 RedactedScript-Regular.ttf -t ${FLATPAK_DEST}/share/fonts - sources: - - type: file - url: https://github.com/christiannaths/redacted-font/raw/63e542017bab347ba9be54d7d99b99d4754c3d97/RedactedScript/fonts/ttf/RedactedScript-Regular.ttf - sha256: 1ebaab9642a2f43fa33f449760469903143fd1d08b2433eb6c15e28602d9360d - - name: jorts buildsystem: meson config-opts: From 296c38b11f978feab5d5880b5004f0b1b4f8f732 Mon Sep 17 00:00:00 2001 From: teamcons Date: Wed, 6 May 2026 19:17:07 +0200 Subject: [PATCH 4/4] Repeat ebassis wise words --- data/fonts/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/fonts/meson.build b/data/fonts/meson.build index 6854c9ee..878e8f49 100644 --- a/data/fonts/meson.build +++ b/data/fonts/meson.build @@ -10,7 +10,8 @@ install_data( install_dir: target_font_dir, ) -# NOT NEEDED FOR FLATPAK // We need to regen the font cache or else the font will not be usable +# You want to call fc-cache on install unless DESTDIR is set; +# distro packages (and flatpak) rebuild the fontconfig cache themselves in bulk, and they set DESTDIR when running meson install #fontconfig = find_program('fc-cache', required: true) #meson.add_install_script(fontconfig, target_font_dir)