Skip to content

Commit

Permalink
Change default pkgconfig directory on FreeBSD
Browse files Browse the repository at this point in the history
FreeBSD uses ${PREFIX}/libdata/pkgconfig as default pkgconf search path
for non-base libraries. This commit makes that directory the default
install_dir in the pkgconfig module on FreeBSD.
  • Loading branch information
sghctoma authored and jpakkane committed Nov 5, 2019
1 parent bd27769 commit aba8792
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/modules/pkgconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ def parse_variable_list(stringlist):
pcfile = filebase + '.pc'
pkgroot = kwargs.get('install_dir', default_install_dir)
if pkgroot is None:
pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'pkgconfig')
if mesonlib.is_freebsd():
pkgroot = os.path.join(state.environment.coredata.get_builtin_option('prefix'), 'libdata', 'pkgconfig')
else:
pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'pkgconfig')
if not isinstance(pkgroot, str):
raise mesonlib.MesonException('Install_dir must be a string.')
self.generate_pkgconfig_file(state, deps, subdirs, name, description, url,
Expand Down

0 comments on commit aba8792

Please sign in to comment.