diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2023-12-20 07:45:52 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2023-12-20 07:45:52 +0200 |
commit | bc99265637446283620eed378bd77cc540566c83 (patch) | |
tree | 44e8b8d11dc1bedb5fcbe97c0f432b74906a9730 /app-misc/fastfetch | |
parent | app-admin/linode-cli: drop 5.46.0 (diff) | |
download | gentoo-bc99265637446283620eed378bd77cc540566c83.tar.gz gentoo-bc99265637446283620eed378bd77cc540566c83.tar.bz2 gentoo-bc99265637446283620eed378bd77cc540566c83.zip |
app-misc/fastfetch: make `.jsonc` suffix optional
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-misc/fastfetch')
-rw-r--r-- | app-misc/fastfetch/fastfetch-2.4.0-r1.ebuild (renamed from app-misc/fastfetch/fastfetch-2.4.0.ebuild) | 4 | ||||
-rw-r--r-- | app-misc/fastfetch/files/fastfetch-2.4.0-default-config-suffix.patch | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/app-misc/fastfetch/fastfetch-2.4.0.ebuild b/app-misc/fastfetch/fastfetch-2.4.0-r1.ebuild index 4af72e9b74c7..4590e479070b 100644 --- a/app-misc/fastfetch/fastfetch-2.4.0.ebuild +++ b/app-misc/fastfetch/fastfetch-2.4.0-r1.ebuild @@ -62,6 +62,10 @@ REQUIRED_USE=" chafa? ( imagemagick ) " +PATCHES=( + "${FILESDIR}"/${P}-default-config-suffix.patch +) + src_configure() { local fastfetch_enable_imagemagick7=no local fastfetch_enable_imagemagick6=no diff --git a/app-misc/fastfetch/files/fastfetch-2.4.0-default-config-suffix.patch b/app-misc/fastfetch/files/fastfetch-2.4.0-default-config-suffix.patch new file mode 100644 index 000000000000..fcf21ce0af23 --- /dev/null +++ b/app-misc/fastfetch/files/fastfetch-2.4.0-default-config-suffix.patch @@ -0,0 +1,35 @@ +Make specifying `.jsonc` suffix for configs optional + +https://github.com/fastfetch-cli/fastfetch/commit/456a58c8f57aaf22c51571ec0ead1e7c40c3d860 + +From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= <zhangsongcui3371@sina.com> +Date: Tue, 19 Dec 2023 15:26:51 +0800 +Subject: [PATCH] fastfetch: default preset names to `.jsonc` + +Fix #666 +--- a/src/fastfetch.c ++++ b/src/fastfetch.c +@@ -501,6 +501,11 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val + ffStrbufAppendS(&absolutePath, value); + + bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars); ++ if (!success) ++ { ++ ffStrbufAppendS(&absolutePath, ".jsonc"); ++ success = parseJsoncFile(absolutePath.chars); ++ } + + if(success) + return; +@@ -514,6 +519,11 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val + ffStrbufAppendS(&absolutePath, value); + + bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars); ++ if (!success) ++ { ++ ffStrbufAppendS(&absolutePath, ".jsonc"); ++ success = parseJsoncFile(absolutePath.chars); ++ } + + if(success) + return; |