pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/libimagequant
Module Name: pkgsrc
Committed By: ryoon
Date: Mon Aug 5 08:30:32 UTC 2024
Modified Files:
pkgsrc/graphics/libimagequant: distinfo
Added Files:
pkgsrc/graphics/libimagequant/patches: patch-src_kmeans.rs
patch-src_quant.rs
Log Message:
graphics/libimagequant: Fix error[E0277] errors with Rust 1.79 at least
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 pkgsrc/graphics/libimagequant/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/libimagequant/patches/patch-src_kmeans.rs \
pkgsrc/graphics/libimagequant/patches/patch-src_quant.rs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/libimagequant/distinfo
diff -u pkgsrc/graphics/libimagequant/distinfo:1.38 pkgsrc/graphics/libimagequant/distinfo:1.39
--- pkgsrc/graphics/libimagequant/distinfo:1.38 Mon Aug 5 07:02:20 2024
+++ pkgsrc/graphics/libimagequant/distinfo Mon Aug 5 08:30:31 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2024/08/05 07:02:20 adam Exp $
+$NetBSD: distinfo,v 1.39 2024/08/05 08:30:31 ryoon Exp $
BLAKE2s (adler-1.0.2.crate) = f263779d752af886455fc0f42c997893fb1a09edcf1bd2980605251c2e3602aa
SHA512 (adler-1.0.2.crate) = 7ab190d31890fc05b0b55d8e2c6527a505e06793d5496be0b3831e0513412f9ba97f8148f6f68ed0770fa9cd980a5092d885e058becf1d5506b7c74b82674aa1
@@ -93,3 +93,5 @@ Size (zerocopy-0.7.35.crate) = 152645 by
BLAKE2s (zerocopy-derive-0.7.35.crate) = b80899d1b7a843a5225638171775a0c9643052c9e96f7b88a825150d0725505e
SHA512 (zerocopy-derive-0.7.35.crate) = dbe23573b62a6267d7bc8c744320b75b2fbda03b908c1d175211f7394374fe182bce58021e25485c10671d726b2007f250565dfe53134d51c89293bb607e9feb
Size (zerocopy-derive-0.7.35.crate) = 37829 bytes
+SHA1 (patch-src_kmeans.rs) = 544ffc828efcd7c1496a8f55ea8bc08847fa0118
+SHA1 (patch-src_quant.rs) = ac82039104443c84f84dbe44922952550e554a17
Added files:
Index: pkgsrc/graphics/libimagequant/patches/patch-src_kmeans.rs
diff -u /dev/null pkgsrc/graphics/libimagequant/patches/patch-src_kmeans.rs:1.1
--- /dev/null Mon Aug 5 08:30:32 2024
+++ pkgsrc/graphics/libimagequant/patches/patch-src_kmeans.rs Mon Aug 5 08:30:31 2024
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_kmeans.rs,v 1.1 2024/08/05 08:30:31 ryoon Exp $
+
+* Revert partially to fix "error[E0277]: `&Box<[HistItem]>` is not an iterator"
+ https://github.com/ImageOptim/libimagequant/commit/d6514e825ed1a9c53513d60ee1db989f5d1ea8ff
+
+--- ../src/kmeans.rs.orig 2024-08-05 08:21:27.147848706 +0000
++++ ../src/kmeans.rs
+@@ -133,7 +133,7 @@ fn replace_unused_colors(palette: &mut P
+ let colors = palette.as_slice();
+ // the search is just for diff, ignoring adjusted_weight,
+ // because the palette already optimizes for the max weight, so it'd likely find another redundant entry.
+- for item in &hist.items {
++ for item in hist.items.iter() {
+ // the early reject avoids running full palette search for every entry
+ let may_be_worst = colors.get(item.likely_palette_index() as usize)
+ .map_or(true, |pal| pal.diff(&item.color) > worst_diff);
Index: pkgsrc/graphics/libimagequant/patches/patch-src_quant.rs
diff -u /dev/null pkgsrc/graphics/libimagequant/patches/patch-src_quant.rs:1.1
--- /dev/null Mon Aug 5 08:30:32 2024
+++ pkgsrc/graphics/libimagequant/patches/patch-src_quant.rs Mon Aug 5 08:30:31 2024
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_quant.rs,v 1.1 2024/08/05 08:30:31 ryoon Exp $
+
+* Revert partially to fix "error[E0277]: `&Box<[HistItem]>` is not an iterator"
+ https://github.com/ImageOptim/libimagequant/commit/d6514e825ed1a9c53513d60ee1db989f5d1ea8ff
+
+--- ../src/quant.rs.orig 2024-08-05 08:22:20.583105566 +0000
++++ ../src/quant.rs
+@@ -441,7 +441,7 @@ fn refine_palette(palette: &mut PalF, at
+ #[cold]
+ fn palette_from_histogram(hist: &HistogramInternal, max_colors: PalLen) -> (PalF, Option<f64>) {
+ let mut hist_pal = PalF::new();
+- for item in &hist.items {
++ for item in hist.items.iter() {
+ hist_pal.push(item.color, PalPop::new(item.perceptual_weight));
+ }
+
Home |
Main Index |
Thread Index |
Old Index