[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: gather pkg-config variables

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sun Jan 23 19:06:55 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
56a7a350 by Rémi Denis-Courmont at 2022-01-23T15:25:08+02:00
contrib: gather pkg-config variables

This moves the PKG_CONFIG and PKG_CONFIG_LIBDIR initialisation where
PKG_CONFIG_PATH is. Note that the moved code is predicated on
HAVE_CROSS_COMPILE either way.

No functional changes.

- - - - -
95dc6934 by Rémi Denis-Courmont at 2022-01-23T15:25:08+02:00
contrib: always allow to override pkg-config

- - - - -
223177f7 by Rémi Denis-Courmont at 2022-01-23T15:25:08+02:00
contrib: simplify PKG_CONFIG_LIBDIR initialisation

The code ostensibly intended to append to PKG_CONFIG_LIBDIR. But in the
case that it was set from the command line, the code had no actual
effects: indeed, Make will not override a supplied variable unless
'override' is explicitly passed.

Forcefully appending values would have been wrong in any case, as that
have left literally no ways to fully override PKG_CONFIG_LIBDIR.
Concretely it would have become completely impossible to prevent
pkg-config searching in /usr/lib.

So rather than attempt to fix the code, this patch makes the current
behaviour official and removes the useless code.

- - - - -
a17fdcd1 by Rémi Denis-Courmont at 2022-01-23T15:25:08+02:00
rPI: disable fontconfig (refs #26517)

fontconfig cannot be cross-compiled onto Linux with current contribs.
Until this is fixed, we need to turn it off to get CI out of its
metastable state.

- - - - -
40d29a11 by Rémi Denis-Courmont at 2022-01-23T15:25:08+02:00
rPI: disable nonbuildable contrib packages

libmpg123, xcb are not rebuildable in the current CI setup.
upnp builds but breaks the VLC build (refs #24239).

- - - - -


2 changed files:

- contrib/src/main.mak
- extras/package/raspberry/build.sh


Changes:

=====================================
contrib/src/main.mak
=====================================
@@ -46,8 +46,6 @@ ifeq ($(ARCH)-$(HAVE_WIN32),aarch64-1)
 HAVE_WIN64 := 1
 endif
 
-need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
-
 ifeq ($(findstring mingw32,$(BUILD)),mingw32)
 MSYS_BUILD := 1
 endif
@@ -76,7 +74,6 @@ RANLIB ?= ranlib
 STRIP ?= strip
 WIDL ?= widl
 WINDRES ?= windres
-PKG_CONFIG ?= pkg-config
 else
 ifneq ($(findstring $(origin CC),undefined default),)
 CC := $(HOST)-gcc
@@ -95,23 +92,6 @@ RANLIB ?= $(HOST)-ranlib
 STRIP ?= $(HOST)-strip
 WIDL ?= $(HOST)-widl
 WINDRES ?= $(HOST)-windres
-
-# On Debian x86_64-w64-mingw32-pkg-config exists, runs but returns an error when checking packages
-ifeq ($(shell unset PKG_CONFIG_LIBDIR; $(HOST)-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL),)
-PKG_CONFIG ?= $(HOST)-pkg-config
-else
-# Use the regular pkg-config and set some PKG_CONFIG_LIBDIR ourselves
-PKG_CONFIG = pkg-config
-ifeq ($(findstring $(origin PKG_CONFIG_LIBDIR),undefined),)
-# an extra PKG_CONFIG_LIBDIR was provided, use it prioritarily
-PKG_CONFIG_LIBDIR := $(PKG_CONFIG_LIBDIR):/usr/$(HOST)/lib/pkgconfig:/usr/lib/$(HOST)/pkgconfig
-else
-PKG_CONFIG_LIBDIR := /usr/$(HOST)/lib/pkgconfig:/usr/lib/$(HOST)/pkgconfig
-endif
-export PKG_CONFIG_LIBDIR
-need_pkg = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) $(PKG_CONFIG) $(1) || echo 1)
-endif
-
 endif
 
 ifdef HAVE_ANDROID
@@ -222,11 +202,24 @@ export ACLOCAL_AMFLAGS
 # Tools #
 #########
 
+PKG_CONFIG ?= pkg-config
+need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
+
 ifdef HAVE_CROSS_COMPILE
+# Use pkg-config cross-tool if it actually works
+ifeq ($(shell unset PKG_CONFIG_LIBDIR; $(HOST)-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL),)
+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
+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
+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})


=====================================
extras/package/raspberry/build.sh
=====================================
@@ -110,7 +110,7 @@ info "Building contribs"
 mkdir -p contrib/contrib-$SHORTARCH && cd contrib/contrib-$SHORTARCH
 
 # issue with arm detection of the target (detects i686)
-CONTRIBFLAGS="$CONTRIBFLAGS --disable-x265"
+CONTRIBFLAGS="$CONTRIBFLAGS --disable-x265 --disable-fontconfig --disable-ass --disable-bluray --disable-mpg123 --disable-xcb --disable-upnp"
 
 ${SCRIPT_PATH}/../../../contrib/bootstrap --host=$TRIPLET $CONTRIBFLAGS
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ab41404cb85684125d73977cadebf83bbc246f5...40d29a11ac40c349184b85eb9b9882eef705495e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4ab41404cb85684125d73977cadebf83bbc246f5...40d29a11ac40c349184b85eb9b9882eef705495e
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list