Package: rust-leptess
Version: 0.14.0-6
The autopkgtest for rust-leptess fails with rust-image 0.25,
preventing rust-image from migrating to testing.
https://ci.debian.net/packages/r/rust-leptess/testing/amd64/54239350/#S6
85s error[E0433]: failed to resolve: could not find `ImageOutputFormat` in
`image`
85s --> tests/image_crate.rs:14:16
85s |
85s 14 | image::ImageOutputFormat::Tiff,
85s | ^^^^^^^^^^^^^^^^^ could not find `ImageOutputFormat`
in `image`
85s
85s error[E0433]: failed to resolve: could not find `ImageOutputFormat` in `image`
85s --> examples/set_from_image_crate.rs:13:16
85s |
85s 13 | image::ImageOutputFormat::Tiff,
85s | ^^^^^^^^^^^^^^^^^ could not find `ImageOutputFormat`
in `image`
85s
Changing ImageOutputFormat::Tiff to ImageFormat::Tiff works with both the old
and new
version of the image crate. A debdiff doing that is attatched.
diff -Nru rust-leptess-0.14.0/debian/changelog
rust-leptess-0.14.0/debian/changelog
--- rust-leptess-0.14.0/debian/changelog 2024-11-07 22:51:40.000000000
+0000
+++ rust-leptess-0.14.0/debian/changelog 2024-11-11 07:11:29.000000000
+0000
@@ -1,3 +1,11 @@
+rust-leptess (0.14.0-6.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Replace ImageOutputFormat::Tiff with ImageFormat::Tiff in test and
+ example to fix autopkgtest with rust-image 0.25.
+
+ -- Peter Michael Green <plugw...@debian.org> Mon, 11 Nov 2024 07:11:29 +0000
+
rust-leptess (0.14.0-6) unstable; urgency=medium
* stop mention dh-cargo in long description
diff -Nru rust-leptess-0.14.0/debian/patches/1001_image.patch
rust-leptess-0.14.0/debian/patches/1001_image.patch
--- rust-leptess-0.14.0/debian/patches/1001_image.patch 2024-11-07
22:49:03.000000000 +0000
+++ rust-leptess-0.14.0/debian/patches/1001_image.patch 2024-11-11
07:11:01.000000000 +0000
@@ -1,15 +1,44 @@
Description: accept newer branch of crate image
Author: Jonas Smedegaard <d...@jones.dk>
+Author: Peter Michael Green <plugw...@debian.org>
Bug-Debian: https://bugs.debian.org/1086993
Last-Update: 2024-11-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -15,5 +15,5 @@
+Index: rust-leptess-0.14.0/Cargo.toml
+===================================================================
+--- rust-leptess-0.14.0.orig/Cargo.toml
++++ rust-leptess-0.14.0/Cargo.toml
+@@ -15,5 +15,5 @@ tesseract-plumbing = "~0.8"
thiserror = "1"
[dev-dependencies]
-image = "0.24.2"
+image = ">= 0.24.2, <= 0.25"
regex = "1.4.3"
+Index: rust-leptess-0.14.0/examples/set_from_image_crate.rs
+===================================================================
+--- rust-leptess-0.14.0.orig/examples/set_from_image_crate.rs
++++ rust-leptess-0.14.0/examples/set_from_image_crate.rs
+@@ -10,7 +10,7 @@ fn main() {
+ let mut tiff_buffer = Vec::new();
+ img.write_to(
+ &mut Cursor::new(&mut tiff_buffer),
+- image::ImageOutputFormat::Tiff,
++ image::ImageFormat::Tiff,
+ )
+ .unwrap();
+
+Index: rust-leptess-0.14.0/tests/image_crate.rs
+===================================================================
+--- rust-leptess-0.14.0.orig/tests/image_crate.rs
++++ rust-leptess-0.14.0/tests/image_crate.rs
+@@ -11,7 +11,7 @@ fn test_read_pix() {
+ let mut tiff_buffer = Vec::new();
+ img.write_to(
+ &mut Cursor::new(&mut tiff_buffer),
+- image::ImageOutputFormat::Tiff,
++ image::ImageFormat::Tiff,
+ )
+ .unwrap();
+