This repository was archived by the owner on Oct 15, 2025. It is now read-only.
freeimage: unbundle patches #1002
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to Homebrew/homebrew-core#220708
Will be experimenting with various patches/inreplaces to help unbundle freeimage.
Only bundled dependencies are supported by upstream. Most of unbundling is already done by applying Debian patch (which is a similar patch carried by Fedora, Arch, Gentoo, etc). Went with Debian as we can also get a few CVE fixes.
The extra patches here include:
imath-int64.patch- Similar to https://src.fedoraproject.org/rpms/freeimage/blob/rawhide/f/freeimage-openexr3.patch but the minimal set needed. Debian doesn't have a patch for this. Mainly impacts macOS due to some long vs long long.libtiff-warning.patch- This is patch on top of Debian/Fedora's patched TIFF code. It looks like Fedora logic used in patch will triggerlibtiff's stderr and cause flooding of warning messages seen inperpetualdiff. For now, just disable warning output for the patched logic.macos.patchis based on our3.17.0.patchthough I changed install_name to VERLIBNAME so that linkage happens using versioned path matching the compatibility version. This matches Linux library SONAME and MacPorts https://github.com/macports/macports-ports/blob/master/graphics/freeimage/Portfile#L56debian-to-homebrew.patch- a couple things in Debian patch don't work in HomebrewRevamped the old patches for HEAD usage as it is difficult to carry an unbundle patch there.
In follow up, I may just remove HEAD as it bundled libs don't build on macOS 15.4. On Linux, it builds but something is wrong with bundled
libtiff