Page MenuHomeFreeBSD

framework: add new variable PKGCONFIG_BASE
ClosedPublic

Authored by tcberner on Jun 15 2022, 4:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 9:13 AM
Unknown Object (File)
Thu, Apr 4, 9:13 AM
Unknown Object (File)
Thu, Apr 4, 9:13 AM
Unknown Object (File)
Feb 15 2024, 7:36 AM
Unknown Object (File)
Jan 17 2024, 6:05 PM
Unknown Object (File)
Jan 16 2024, 7:12 AM
Unknown Object (File)
Dec 20 2023, 3:47 AM
Unknown Object (File)
Dec 4 2023, 3:54 PM
Subscribers

Details

Summary

The base system started to provide certain pkgconfig files for
components it provides. This new variable allows ports to prefer base
copmonents explicitely using for example

PKGCONFIG_BASE=foo

This will create a symlingk of /usr/libdata/pkgconfig/foo.pc to
${WKRDIR}/.pkgconfig and adding said path to pkgconfigs search path.

This allows us to switch easily between base and port implementation
of different components (say openssl) by simply defining the appropriate
variable in (say ssl.mk).

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt requested changes to this revision.Jun 15 2022, 4:03 PM
bapt added inline comments.
Mk/bsd.port.mk
1688

Here that should be PKG_CONFIGi_DIR=${PKG_CONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig

5162

I don't think the realpath call is necessary here.

This revision now requires changes to proceed.Jun 15 2022, 4:03 PM
Mk/bsd.port.mk
5162

this was added, as some pc files are symlinks

  • document realpath usage
  • append default path to environment
Mk/bsd.port.mk
1688

the real variable is PKG_CONFIG_LIBDIR

5162

RLN will expand to install -l rs, which in case of a symlink or symlink will to do the path expansion, so I stand by my the realpath call is not useful:

bapt@lappy:~ $ readlink /usr/libdata/pkgconfig/menu.pc
menuw.pc
bapt@lappy:~ $ install -l rs /usr/libdata/pkgconfig/menu.pc ./bla
bapt@lappy:~ $ readlink bla
../../libdata/pkgconfig/menuw.pc
  • Use proper pkg-config environment variable
  • Remove unnecessary realpath useage, which install (RLN) already handles
  • Also append /usr/libdata/pkgconfig to the environment
  • Use proper pkg-config environment variable
  • Remove unnecessary realpath useage, which install (RLN) already handles
  • Also append /usr/libdata/pkgconfig to the environment
This revision is now accepted and ready to land.Jun 16 2022, 2:09 PM