Created attachment 239421 [details] v1 (apply via "git am") According to https://www.libvips.org/API/current/VipsForeignSave.html#vips-pngsave palette mode requires libimagequant. Note, libimagequant is enabled in vips package at least on Alpine, Arch, Debian, Fedora, NixPkgs, Void.
I totally agree with you to change it to an option. But since it requires Rust which is a huge dependency,\ even if it's just build-time, I'd like to keep it off by default.
graphics/py-pillow which is maintained by you (sunpoet@) already depends on graphics/libimagequant by default, bringing lang/rust as *indirect* build dependency. If one uses ports-mgmt/poudriere-devel with "-b latest" to prefetch dependencies then lang/rust won't be used for building this port (or other libimagequant consumers).
In this port, LIBRSVG2 option already brings lang/rust as indirect dependency. $ pkg rquery %rn librsvg2-rust | xargs pkg rquery '%o %m' | awk '/sunpoet/ { print $1 }' graphics/rubygem-rsvg2 graphics/vips
(In reply to Jan Beich from comment #2) I added IMAGEQUANT option to graphics/py-pillow in ports f4ffd8dd2094a2b39254854901869f1ba7b7ef78. graphics/libimagequant was not using Rust then. It changed to Rust when you updated it to 4.0.4 in ports 6a5b2121a0ad6200c59901eff74646bba5015bad which is 7 months later. (In reply to Jan Beich from comment #3) LIBRSVG2 part can be skipped via DEFAULT_VERSIONS+=librsvg2=legacy.
(In reply to Po-Chuan Hsieh from comment #4) > LIBRSVG2 part can be skipped via DEFAULT_VERSIONS+=librsvg2=legacy. I've filed bug 269340. It's useless as binary package and only exists to paper over automation/tooling quirks. One can shave build time by using prebuilt packages, disabling options, reverting commits locally (e.g., libimagequant updates) or stubbing dependencies.
Binary packages are supposed to follow "batteries included" policy to benefit the largest set of users. lang/rust is mainly a build-only dependency, so it won't impact those. Otherwise, I've exhausted my arguments. Feel free to land with the option disabled by default.
Frankly speaking, I always want to use as many prebuilt packages as possible. It would greatly decrease the required time for poudriere build. But the real problem is when rust changes, the dependent ports bumped and the packages are outdated. To my experience, it needs days or even a week to have the new packages. For example, rust 1.67.1 landed ports tree on Feb 13. However, the official 12-amd64 package is not yet ready. I'll make it an option. We should be able to enable it by default later if the rust part is solved.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1107a3cf1554e900c15f58859d31e8381540e6b3 commit 1107a3cf1554e900c15f58859d31e8381540e6b3 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-03-21 18:57:00 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-03-21 19:22:36 +0000 graphics/vips: Add IMAGEQUANT option PR: 268908 Reported by: jbeich graphics/vips/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Committed. Thanks!