Skip to content

new port: libvips#50188

Draft
angelmixu wants to merge 6 commits intomicrosoft:masterfrom
angelmixu:libvips-port
Draft

new port: libvips#50188
angelmixu wants to merge 6 commits intomicrosoft:masterfrom
angelmixu:libvips-port

Conversation

@angelmixu
Copy link
Contributor

@angelmixu angelmixu commented Feb 26, 2026

  • Changes comply with the maintainer guide.
  • The packaged project shows strong association with the chosen port name. Check this box if at least one of the following criteria is met:
    • The project is in Repology: https://repology.org//versions
    • The project is amongst the first web search results for "" or " C++". Include a screenshot of the search engine results in the PR.
    • The port name follows the 'GitHubOrg-GitHubRepo' form or equivalent Owner-Project form.
  • Optional dependencies of the build are all controlled by the port. A dependency is controlled if it is declared an unconditional dependency in vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGE
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is brief and accurate. See adding-usage for context. Don't add a usage file if the automatically generated usage is correct.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

Hey folkz!

I'd like to add the libvips port :) ( https://github.com/libvips/libvips )
I know it has lib as prefix, but if you look for it everywhere is using libvips as the name, also, the github repo is called libvips/libvips.
In repoloy webpage I can see some repositories using it as libvips, or as vips only. (BTW: the https://repology.org//versions url doesn't seem to work)

libvips on google:
image

Furthermore, if you remove the lib prefix, you can confound it with a sandwich restaurants chain :P

vips on google:
image

I'll let the owner and team of libvips/vips about this PR for if they want to say anything too.

Let me know if I should change the port name to vips only instead.

A couple thing that I'd like to discuss:

  • At this moment I needed to use the head version for Windows because the current release has a bug which prevents to be built.
    I set this in the portfile in the meantime:
#TODO: look for a way to use the --head version for port development
set(VCPKG_USE_HEAD_VERSION TRUE)

Is there any workaround to use the --head flag from my projects' vcpkg.json manifest?
I was taking a look at this conversation: #17805 but I didn't find any way to force using head version.

libvips provides pkg-config modules:

  # C++ API for vips8 image processing library
  vips-cpp

  # Image processing library
  vips

I'm still working on building and linking libvips with the project I'm working on, but I wanted to open this draft PR to discuss anything related or missing about the configuration in the different platforms so we can team up.

Let me know if there's any suggestion, improvement, etc.

Thanks! :)

@angelmixu angelmixu marked this pull request as draft February 26, 2026 12:19
@jcupitt
Copy link

jcupitt commented Feb 26, 2026

Hello, libvips maintainer here.

This looks nice! I noticed:

@angelmixu
Copy link
Contributor Author

angelmixu commented Feb 26, 2026

Hey @jcupitt thanks for coming by! :D

About using HEAD, it's for coming around an issue: libvips/libvips#4819
The change is from Jan 1st ( https://github.com/libvips/libvips/pull/4820/changes )
And the latest release is from Dec 17 2025 ( https://github.com/libvips/libvips/releases/tag/v8.18.0 )
So ideally it would be nice if we could get a 8.18.1 release with that fix for using a proper version in this port, and not HEAD.
I mean, using HEAD is only temporary while I'm building the port.

Thanks for the dependencies list, I think it's up to the comunity to choose which dependencies we need to support.
Or we could add support to every dependency and maybe set a warning when using a not safe one (I don't know if possible, but would be an option maybe).

BTW, regarding dependencies, I'd prefer any way to sync them automatically, so we don't have to keep maintaining different sources of truth every time there's an update

@jcupitt
Copy link

jcupitt commented Feb 26, 2026

Regarding optional dependencies, I don't know the vcpkg policy here.

Homebrew's policy (for example) is to include all possible dependencies and hope that that reduces the need for source compiles by users.

libvips has a feature to make this safe: you can set the env var VIPS_BLOCK_UNTRUSTED and libvips will disable all untrusted loaders at runtime. Ideally the sense would be flipped (so you had to set VIPS_ALLOW_UNTRUSTED to get untrusted loaders to run), but ... we are where we are.

That won't fix licence issues though. For example, poppler is GPL and I expect many vcpkg users will not want to expose themselves to potential legal problems by using it. PDFium would be a safer choice, if possible.

@jcupitt
Copy link

jcupitt commented Feb 26, 2026

We're hoping to get 8.18.1 done in a few days, so hopefully it's not a problem.

regarding dependencies, I'd prefer any way to sync them automatically

It's tricky, unfortunately. Every package manager uses different names for packages (!!!??! argh), and everyone will have strong views about which packages they should include or not include (eg. poppler vs. PDFium).

It would be hard to have a single source of truth :(

@angelmixu
Copy link
Contributor Author

We're hoping to get 8.18.1 done in a few days, so hopefully it's not a problem.

awesome :D

Regarding dependencies, let's see if someone from vcpkg can tell us more about it.
I was looking how to approach it, and the only way I see is the features vcpkg.json parameter, and passing options into the portfile's vcpkg_configure_meson call.

@dg0yt
Copy link
Contributor

dg0yt commented Feb 26, 2026

meson.options is about configuration options, not about the actual dependencies.
There is no general (trivial) way to transform this into vcpkg.json features and dependencies.
There are also other considerations to apply to port features (such as being "additive").
And it is better to have a curated set of reasonable features than to blindly map every rarely used configuration option.

set(VCPKG_USE_HEAD_VERSION TRUE) is not acceptable here because it will use a random source. And it will eventually break. You could pick a particular commit instead (and choose version-date). Or you could apply specific patches. Or you could prepare the port (update) as draft until upstream makes a release with the desired changes. (I test curl release candidates with draft PRs.)

@angelmixu
Copy link
Contributor Author

Yep, the idea is to wait for the new 8.18.1 version to use that one as official :)

And about options and dependencies, the idea also, was to make libvips with the lesser or default options as a minimal build, and through vcpkg features add those options like I have now for adding png support, tiff support, etc.

@jcupitt
Copy link

jcupitt commented Feb 27, 2026

EDIT: oops, now I read a bit more I see vcpkg is source only, sorry for any confusion!

And about options and dependencies, the idea also, was to make libvips with the lesser or default options as a minimal build,

I think that would need users to compile the thing from source, wouldn't it? Doesn't vcpkg ship binaries?

libvips has a plugin mechanism which is used for loaders like heic and openslide, have a look in lib/modules:

$ ls ~/vips/lib/vips-modules-8.19/
vips-heif.so  vips-magick.so     vips-poppler.so
vips-jxl.so   vips-openslide.so

So those could be shipped separately as binaries, but I imagine that's probably too complex. It'd be simpler to have a separate eg. libvips-extras package.

@angelmixu
Copy link
Contributor Author

Oh, I'm don't know about shipping binaries, I think I read somewhere it was discouraged unless it was really necessary.
Maybe an libvips-extra as you mention would be better. Let's see if someone can tell us something about it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants