From 4241c70093166419d0f3c313f1508708286187f6 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sat, 29 Aug 2026 22:23:30 +0700 Subject: [PATCH] Improve dynamically linked cosmic apps --- recipes/cosmic/cosmic-edit/recipe.toml | 10 +++++++--- recipes/cosmic/cosmic-files/recipe.toml | 10 +++++++--- recipes/cosmic/cosmic-monitor/recipe.toml | 6 +++++- recipes/cosmic/cosmic-reader/recipe.toml | 5 +++++ recipes/cosmic/cosmic-settings/recipe.toml | 14 ++++++-------- recipes/cosmic/cosmic-store/recipe.toml | 6 +++++- recipes/cosmic/cosmic-term/recipe.toml | 10 +++++----- recipes/cosmic/cosmic-text/recipe.toml | 9 +++++++++ 8 files changed, 49 insertions(+), 21 deletions(-) diff --git a/recipes/cosmic/cosmic-edit/recipe.toml b/recipes/cosmic/cosmic-edit/recipe.toml index 2dccf690c..6bd3b7026 100644 --- a/recipes/cosmic/cosmic-edit/recipe.toml +++ b/recipes/cosmic/cosmic-edit/recipe.toml @@ -4,12 +4,11 @@ git = "https://github.com/pop-os/cosmic-edit.git" [build] template = "custom" dependencies = [ - "gettext", - "libxkbcommon", + "libonig", ] script = """ DYNAMIC_INIT -export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr" +export RUSTONIG_DYNAMIC_LIBONIG=1 cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps" @@ -23,3 +22,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] \ No newline at end of file diff --git a/recipes/cosmic/cosmic-files/recipe.toml b/recipes/cosmic/cosmic-files/recipe.toml index 4551247c0..0400d64c3 100644 --- a/recipes/cosmic/cosmic-files/recipe.toml +++ b/recipes/cosmic/cosmic-files/recipe.toml @@ -4,12 +4,11 @@ git = "https://github.com/pop-os/cosmic-files.git" [build] template = "custom" dependencies = [ - "gettext", - "libxkbcommon", + "zstd", ] script = """ DYNAMIC_INIT -export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr" +export ZSTD_SYS_USE_PKG_CONFIG=1 cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps/" @@ -23,3 +22,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-monitor/recipe.toml b/recipes/cosmic/cosmic-monitor/recipe.toml index f87a068c8..761409146 100644 --- a/recipes/cosmic/cosmic-monitor/recipe.toml +++ b/recipes/cosmic/cosmic-monitor/recipe.toml @@ -6,7 +6,6 @@ rev = "epoch-1.2.0" template = "custom" dependencies = [ "gettext", - "libxkbcommon", ] script = """ DYNAMIC_INIT @@ -22,3 +21,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-reader/recipe.toml b/recipes/cosmic/cosmic-reader/recipe.toml index abd88c062..01c24822b 100644 --- a/recipes/cosmic/cosmic-reader/recipe.toml +++ b/recipes/cosmic/cosmic-reader/recipe.toml @@ -36,3 +36,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.thumbnailer" "${COOKBOOK_STAGE}/usr/share mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-settings/recipe.toml b/recipes/cosmic/cosmic-settings/recipe.toml index 66d2ddd8f..d3342f3b6 100644 --- a/recipes/cosmic/cosmic-settings/recipe.toml +++ b/recipes/cosmic/cosmic-settings/recipe.toml @@ -4,16 +4,9 @@ branch = "master" shallow_clone = true [build] template = "custom" -dependencies = [ - "gettext", - "libxkbcommon", -] script = """ DYNAMIC_INIT -export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr" -(COOKBOOK_SOURCE+="/cosmic-settings" cookbook_cargo --no-default-features \ - --config 'patch.crates-io.rustix.git = "https://github.com/bytecodealliance/rustix"' \ - --config 'patch.crates-io.rustix.rev = "8bf15a0"') +COOKBOOK_SOURCE+="/cosmic-settings" cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/usr/bin/" cp -v "target/${TARGET}/release/cosmic-settings" "${COOKBOOK_STAGE}/usr/bin/" @@ -28,3 +21,8 @@ cp -rv "${COOKBOOK_SOURCE}/resources/default_schema/" "${COOKBOOK_STAGE}/usr/sha mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/resources/icons/" "${COOKBOOK_STAGE}/usr/share/icons/hicolor/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-store/recipe.toml b/recipes/cosmic/cosmic-store/recipe.toml index 0e68c93a6..d7f96b5b5 100644 --- a/recipes/cosmic/cosmic-store/recipe.toml +++ b/recipes/cosmic/cosmic-store/recipe.toml @@ -5,7 +5,6 @@ shallow_clone = true template = "custom" dependencies = [ "gettext", - "libxkbcommon", "openssl3", ] script = """ @@ -23,3 +22,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-term/recipe.toml b/recipes/cosmic/cosmic-term/recipe.toml index 6fdacbf11..0ecdcb9e0 100644 --- a/recipes/cosmic/cosmic-term/recipe.toml +++ b/recipes/cosmic/cosmic-term/recipe.toml @@ -3,13 +3,8 @@ git = "https://github.com/pop-os/cosmic-term.git" [build] template = "custom" -dependencies = [ - "gettext", - "libxkbcommon", -] script = """ DYNAMIC_INIT -export GETTEXT_DIR="${COOKBOOK_SYSROOT}/usr" cookbook_cargo --no-default-features mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps" @@ -23,3 +18,8 @@ cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/shar mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/" cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/" """ + +[package] +dependencies = [ + "libxkbcommon", +] diff --git a/recipes/cosmic/cosmic-text/recipe.toml b/recipes/cosmic/cosmic-text/recipe.toml index 37a8d0aff..3ed978696 100644 --- a/recipes/cosmic/cosmic-text/recipe.toml +++ b/recipes/cosmic/cosmic-text/recipe.toml @@ -4,8 +4,17 @@ branch = "main" [build] template = "custom" +dependencies = [ + "libonig", +] script = """ DYNAMIC_INIT +export RUSTONIG_DYNAMIC_LIBONIG=1 COOKBOOK_CARGO_FLAGS=() # remove --locked COOKBOOK_CARGO_PATH=examples/editor cookbook_cargo_build """ + +[package] +dependencies = [ + "libxkbcommon", +]