Bug 268908 - graphics/vips: enable libimagequant by default
Summary: graphics/vips: enable libimagequant by default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-12 12:35 UTC by Jan Beich
Modified: 2023-03-21 19:41 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
v1 (apply via "git am") (2.20 KB, patch)
2023-01-12 12:35 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2023-01-12 12:35:48 UTC
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.
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-02-05 13:48:50 UTC
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.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2023-02-05 14:11:08 UTC
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).
Comment 3 Jan Beich freebsd_committer freebsd_triage 2023-02-05 14:20:04 UTC
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
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-02-05 14:51:46 UTC
(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.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2023-02-05 15:45:41 UTC
(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.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2023-02-06 16:19:26 UTC
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.
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-02-20 17:45:51 UTC
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.
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-03-21 19:35:45 UTC
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(-)
Comment 9 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-21 19:41:49 UTC
Committed. Thanks!