Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]: fix pc file #66186

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Dec 3, 2020

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

The generated pc file points to lua[@5.4], not [email protected]. This commit
fixes that. After this change:

❯ export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
❯ pkg-config --libs --cflags lua5.3
-I/usr/local/opt/[email protected]/include/lua -L/usr/local/opt/[email protected]/lib -llua.5.3 -lm

One caveat is that adding [email protected] to PKG_CONFIG_PATH now means that
using pkg-config to generate build flags for lua without specifying a
version will point to [email protected]. I'm not hugely bothered by this, since
[email protected] is keg-only. One can also work around this by specifying
versions explicitly.

The generated pc file points to `lua[@5.4]`, not `[email protected]`. This commit
fixes that. After this change:

    ❯ export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
    ❯ pkg-config --libs --cflags lua5.3
    -I/usr/local/opt/[email protected]/include/lua -L/usr/local/opt/[email protected]/lib -llua.5.3 -lm

One caveat is that adding `[email protected]` to `PKG_CONFIG_PATH` now means that
using `pkg-config` to generate build flags for lua without specifying a
version will point to `[email protected]`. I'm not hugely bothered by this, since
`[email protected]` is keg-only.
@BrewTestBot BrewTestBot added the legacy Relates to a versioned @ formula label Dec 3, 2020
@carlocab carlocab mentioned this pull request Dec 3, 2020
27 tasks
@fxcoudert
Copy link
Member

Given the pc file was wrong, doesn't that mean we have no formula that actually uses it? If so, we should simply remove it.

@carlocab
Copy link
Member Author

carlocab commented Dec 3, 2020

It is true that we have no formulae that use it. However, I'm inclined to keep the pc file, for three reasons:

  1. [email protected] is keg-only now, which makes it trickier to use as it won't be in default search paths. This (arguably) makes the pc file more useful for users now than it was when it wasn't keg-only.
  2. lua and [email protected] both have pc files one can use if one needs to. I would find it surprising and unintuitive to discover that [email protected] doesn't (especially if I were using it when [email protected] was the unversioned lua formula).
  3. As written, it imposes essentially no maintenance burden even with future revisions of the formula.

I would suggest instead that we keep it for now. If it causes any sort of problems, then I would be happy to remove it.

@fxcoudert
Copy link
Member

OK

@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 4, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy Relates to a versioned @ formula outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants