diff --git a/info.yml b/info.yml index 89abb81..d842623 100644 --- a/info.yml +++ b/info.yml @@ -1,7 +1,7 @@ name: glycin description: Load, edit, and create images as well as read metadata -version: 2.1.5 -revision: 3 +version: 2.2.1 +revision: 1 url: https://gnome.pages.gitlab.gnome.org/glycin/ license: MPL2 OR LGPL2.1-or-later maintainers: @@ -38,7 +38,7 @@ downloads: - url: https://download.gnome.org/sources/glycin/${BPM_PKG_VERSION%.*}/glycin-${BPM_PKG_VERSION}.tar.xz extract_to: ${BPM_SOURCE} extract_strip_components: 1 - checksum: 6c09757ee906330a60b6705753aa56bca007ad219b95e6e3537510d41bc341c8 + checksum: 937ae571d76c0de5e59db944d1194981360be37ee97875729781bc3816ddeafe split_packages: - name: glycin optional_depends: diff --git a/recipe.sh b/recipe.sh index a12dd73..9e53003 100644 --- a/recipe.sh +++ b/recipe.sh @@ -2,13 +2,6 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -# The prepare function is executed in the root of the temp directory -# This function is used for putting downloaded files to the correct location or applying patches -prepare() { - cd "$BPM_SOURCE" - patch -Np1 -i "$BPM_WORKDIR"/update-dds-mimetype.diff -} - # The build function is executed in the source directory # This function is used to compile the source code build() { diff --git a/source-files/glycin-loaders-recognize-new-mime-type-for-dds.patch b/source-files/glycin-loaders-recognize-new-mime-type-for-dds.patch new file mode 100644 index 0000000..0f5aa8d --- /dev/null +++ b/source-files/glycin-loaders-recognize-new-mime-type-for-dds.patch @@ -0,0 +1,56 @@ +From 476720131410e80436e65b9e24fcab52467e1b0f Mon Sep 17 00:00:00 2001 +From: Xi Ruoyao +Date: Thu, 2 Jul 2026 00:45:54 +0800 +Subject: [PATCH] glycin-loaders: recognize the new mime type for dds + +In shared-mime-info-2.5, the mime type for dds is image/vnd.ms-dds +instead of image/x-dds. + +Link: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/124ce8abbfd6 +Part-of: +--- + glycin-loaders/glycin-image-rs/glycin-image-rs.conf | 5 +++++ + glycin-loaders/glycin-image-rs/src/main.rs | 2 +- + news.d/2.1.6/added-support-for-new-dds-mime-type | 1 + + 3 files changed, 7 insertions(+), 1 deletion(-) + create mode 100644 news.d/2.1.6/added-support-for-new-dds-mime-type + +diff --git a/glycin-loaders/glycin-image-rs/glycin-image-rs.conf b/glycin-loaders/glycin-image-rs/glycin-image-rs.conf +index 7e744ea2..284426a6 100644 +--- a/glycin-loaders/glycin-image-rs/glycin-image-rs.conf ++++ b/glycin-loaders/glycin-image-rs/glycin-image-rs.conf +@@ -51,6 +51,11 @@ Exec = @EXEC@ + Exec = @EXEC@ + Creator = true + ++[loader:image/vnd.ms-dds] ++Exec = @EXEC@ ++Identifiers=0:DDS; ++Extension=dds ++ + [loader:image/x-dds] + Exec = @EXEC@ + +diff --git a/glycin-loaders/glycin-image-rs/src/main.rs b/glycin-loaders/glycin-image-rs/src/main.rs +index 43e82eb2..22f46400 100644 +--- a/glycin-loaders/glycin-image-rs/src/main.rs ++++ b/glycin-loaders/glycin-image-rs/src/main.rs +@@ -289,7 +289,7 @@ impl ImageRsFormat { + )) + .format_name("BMP") + .default_bit_depth(8), +- "image/x-dds" => Self::new(ImageRsDecoder::Dds( ++ "image/x-dds" | "image/vnd.ms-dds" => Self::new(ImageRsDecoder::Dds( + codecs::dds::DdsDecoder::new(data).expected_error()?, + )) + .format_name("DDS") +diff --git a/news.d/2.1.6/added-support-for-new-dds-mime-type b/news.d/2.1.6/added-support-for-new-dds-mime-type +new file mode 100644 +index 00000000..afa0d890 +--- /dev/null ++++ b/news.d/2.1.6/added-support-for-new-dds-mime-type +@@ -0,0 +1 @@ ++Recognize image/vnd.ms-dds as DDS that is used starting with shared-mime-info 2.5. +-- +GitLab + diff --git a/source-files/update-dds-mimetype.diff b/source-files/update-dds-mimetype.diff deleted file mode 100644 index 6cd38d2..0000000 --- a/source-files/update-dds-mimetype.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/glycin-loaders/glycin-image-rs/glycin-image-rs.conf b/glycin-loaders/glycin-image-rs/glycin-image-rs.conf -index 7e744ea..40ee246 100644 ---- a/glycin-loaders/glycin-image-rs/glycin-image-rs.conf -+++ b/glycin-loaders/glycin-image-rs/glycin-image-rs.conf -@@ -51,7 +51,7 @@ Exec = @EXEC@ - Exec = @EXEC@ - Creator = true - --[loader:image/x-dds] -+[loader:image/vnd.ms-dds] - Exec = @EXEC@ - - [loader:image/bmp] -diff --git a/glycin-loaders/glycin-image-rs/glycin-image-rs.thumbnailer.in b/glycin-loaders/glycin-image-rs/glycin-image-rs.thumbnailer.in -index 53576c9..51de157 100644 ---- a/glycin-loaders/glycin-image-rs/glycin-image-rs.thumbnailer.in -+++ b/glycin-loaders/glycin-image-rs/glycin-image-rs.thumbnailer.in -@@ -1,4 +1,4 @@ - [Thumbnailer Entry] - TryExec=@BINDIR@/glycin-thumbnailer - Exec=@BINDIR@/glycin-thumbnailer --input %u --output %o --size %s --MimeType=image/jpeg;image/png;image/apng;image/gif;image/webp;image/tiff;image/x-tga;image/vnd-ms.dds;image/x-dds;image/bmp;image/vnd.microsoft.icon;image/x-exr;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-portable-anymap;image/x-qoi;image/qoi; -+MimeType=image/jpeg;image/png;image/apng;image/gif;image/webp;image/tiff;image/x-tga;image/vnd-ms.dds;image/vnd.ms-dds;image/bmp;image/vnd.microsoft.icon;image/x-exr;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-portable-anymap;image/x-qoi;image/qoi; -diff --git a/glycin-loaders/glycin-image-rs/src/main.rs b/glycin-loaders/glycin-image-rs/src/main.rs -index 43e82eb..953a0ee 100644 ---- a/glycin-loaders/glycin-image-rs/src/main.rs -+++ b/glycin-loaders/glycin-image-rs/src/main.rs -@@ -289,7 +289,7 @@ impl ImageRsFormat { - )) - .format_name("BMP") - .default_bit_depth(8), -- "image/x-dds" => Self::new(ImageRsDecoder::Dds( -+ "image/vnd.ms-dds" => Self::new(ImageRsDecoder::Dds( - codecs::dds::DdsDecoder::new(data).expected_error()?, - )) - .format_name("DDS")