Skip to content

Let explicit PKG_CONFIG_LIBDIR replace default search paths - #53

Open
OskarEichler wants to merge 2 commits into
ruby-gnome:mainfrom
OskarEichler:codex/respect-explicit-libdir
Open

Let explicit PKG_CONFIG_LIBDIR replace default search paths#53
OskarEichler wants to merge 2 commits into
ruby-gnome:mainfrom
OskarEichler:codex/respect-explicit-libdir

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Use PKG_CONFIG_LIBDIR as the replacement default search path, including when it is explicitly empty; retain higher-priority configured/PKG_CONFIG_PATH entries.

Reproduction and verification

Setting PKG_CONFIG_LIBDIR to a target directory currently still appends host/native and platform defaults. An empty value also leaves host directories enabled. Four isolated path fixtures fail on baseline and pass with the candidate; twelve native pkgconf lookups confirm the replacement/empty semantics. No host package installation or environment persistence is required.

Four configured/environment/empty/multiple-directory cases and twelve native lookup checks pass. Reference: https://github.com/pkgconf/pkgconf/blob/master/man/pkgconf.1 (PKG_CONFIG_LIBDIR environment section).

Existing suite on Ruby 4.0.6 through rbenv: 27 tests, 31 assertions, zero failures/errors, two upstream macOS omissions, baseline and this isolated patch. Combined installed-release consumer also passes the suite, 1,098 focused/model checks, four process cases, five linker-option cases and four path cases. rbenv exec ruby test/run.rb runs the existing suite.

Compatibility and limitations

Intentional compatibility correction: callers that used PKG_CONFIG_LIBDIR as an additive path must use PKG_CONFIG_PATH instead. When LIBDIR is unset, existing platform discovery is unchanged. No complete cross-compilation/toolchain claim.

No tests were added or modified under the consuming repository's no-new-tests policy. Verification uses existing tests and external scratch reproductions. No production changes; older Ruby/Linux/Windows matrices await upstream CI. No unrelated version/dependency changes.

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.

1 participant