[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: do not forcefully add /usr/share

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Jan 25 08:46:45 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
4541dd91 by Rémi Denis-Courmont at 2022-01-25T07:16:26+00:00
contrib: do not forcefully add /usr/share

This was supposed to prevent native .pc files of the build system being
taken into use. But all this really did was add a directory to the
search path.

pkg-config environment variables are a little bit confusing:
- PKG_CONFIG_PATH directories are searched first.
  By default, it is treated as empty.
- PKG_CONFIG_LIBDIR directories are searched second.
  By default, the system native directories are searched, for instance
  /usr/lib/$(BUILD)/pkgconfig and /usr/share/pkgconfig.

If we want to search in /usr/share/pkgconfig, then it should be added to
LIBDIR where it would normally be. PATH is better suited for the contrib
installation directory.

- - - - -
66e6c1e3 by Rémi Denis-Courmont at 2022-01-25T07:16:26+00:00
contrib: look for platform-independent system packages

This is necessary to find "data-only" packages such as xproto and
xcb-proto. xproto is not currently available in contribs, while
xcb-proto seems completely broken in contribs (refs #26507).

- - - - -


1 changed file:

- contrib/src/main.mak


Changes:

=====================================
contrib/src/main.mak
=====================================
@@ -211,15 +211,12 @@ ifeq ($(shell unset PKG_CONFIG_LIBDIR; $(HOST)-pkg-config --version 1>/dev/null
 PKG_CONFIG ?= $(HOST)-pkg-config
 else
 # Use the regular pkg-config and set some PKG_CONFIG_LIBDIR ourselves
-PKG_CONFIG_LIBDIR ?= /usr/$(HOST)/lib/pkgconfig:/usr/lib/$(HOST)/pkgconfig
+PKG_CONFIG_LIBDIR ?= /usr/$(HOST)/lib/pkgconfig:/usr/lib/$(HOST)/pkgconfig:/usr/share/pkgconfig
 export PKG_CONFIG_LIBDIR
 need_pkg = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) $(PKG_CONFIG) $(1) || echo 1)
 endif
-
-# This inhibits .pc file from within the cross-compilation toolchain sysroot.
-# Hopefully, nobody ever needs that.
-PKG_CONFIG_PATH := /usr/share/pkgconfig
 endif # HAVE_CROSS_COMPILE
+
 PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)
 ifeq ($(findstring mingw32,$(BUILD)),mingw32)
 PKG_CONFIG_PATH := $(shell cygpath -pm ${PKG_CONFIG_PATH})



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a15edfde5288f4c30becf126f4f30684838945c9...66e6c1e30d770b509edc7f1e23f3d04486e93eb1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a15edfde5288f4c30becf126f4f30684838945c9...66e6c1e30d770b509edc7f1e23f3d04486e93eb1
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list