libvips / libvips/ruby-vips

Allow to opt-out of automatic msys2_mingw_dependency installation

Open
#332 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Ruby
Stars
904
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hi @jcupitt ,

as discussed in #331 (see comments), we have the need of more fine-grained control on the libvips library version to be used.

When you install the ruby-vips gem on Windows, it would automatically (and unconditionally) install the latest available libvips dependency to your msys2 ruby devkit environment (see here in ruby-vips.gemspec).

There is the %RUBY_DLL_PATH% environment variable which you can point to an external libvips installation (e.g. obtained from libvips/build-win64-mxe releases), but this only works when there is no libvips installation present in the msys2 ruby devkit environment.

So in order to make use of %RUBY_DLL_PATH% to get control of the libvips version being installed, you need to make sure that there is no parallel libvips installation in the msys2 ruby devkit environment. But here's the catch: every time you re-install or update the ruby-vips gem, you will get an msys2 libvips installation as a side effect, breaking the use of the external libvips version in %RUBY_DLL_PATH%.

One solution to this could be to provide a possibility to opt-out of the installation of "msys2_mingw_dependencies" in the gemspec (e.g. via an env var like SKIP_MSYS2_MINGW_DEPENDENCIES=1 or so).

What do you think? Does that sound feasible / sensible? Do you have other suggestions on how to enable better control over the libvips library version?

Cheers,
Torben

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ruby-vips.gemspec around line 26 and review how the msys2_mingw_dependencies installation interacts with RUBY_DLL_PATH on Windows. Define an opt-out that preserves external libvips selection without breaking normal gem installation, then verify the gemspec behavior in the Windows installation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.