[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: only pass the pkg_config_path as meson command-line parameters

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Nov 3 13:52:16 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
ac08cda1 by Steve Lhomme at 2024-11-03T13:09:41+00:00
contrib: only pass the pkg_config_path as meson command-line parameters

meson doesn't need both. And the CLI paramater can be kept upon local
reconfiguration.

- - - - -
eaf68278 by Steve Lhomme at 2024-11-03T13:09:41+00:00
contrib: add the cmake location to the list of tools

So it's not passed via the command-line on each call.

- - - - -
1e5d21b0 by Steve Lhomme at 2024-11-03T13:09:41+00:00
contrib: set the CMake prefix in the meson command-line

So it doesn't rely on environment variables.

- - - - -
dedaffaf by Steve Lhomme at 2024-11-03T13:09:41+00:00
contrib: use HOSTTOOLS instead of HOSTVARS_MESON

They are always the same. No need for an extra variable with a confusing name.

- - - - -
cb0ebea6 by Steve Lhomme at 2024-11-03T13:09:41+00:00
contrib: only pass the tools to meson when not cross-compiling

When cross-compiling they are included in the crossfile.

- - - - -


13 changed files:

- contrib/src/basu/rules.mak
- contrib/src/dav1d/rules.mak
- contrib/src/fribidi/rules.mak
- contrib/src/gen-meson-machinefile.py
- contrib/src/glib/rules.mak
- contrib/src/harfbuzz/rules.mak
- contrib/src/libdsm/rules.mak
- contrib/src/libplacebo/rules.mak
- contrib/src/librist/rules.mak
- contrib/src/main.mak
- contrib/src/medialibrary/rules.mak
- contrib/src/microdns/rules.mak
- contrib/src/opus/rules.mak


Changes:

=====================================
contrib/src/basu/rules.mak
=====================================
@@ -34,6 +34,6 @@ basu: basu-$(BASU_VERSION).tar.gz .sum-basu
 
 .basu: basu crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON)
+	$(MESON)
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/dav1d/rules.mak
=====================================
@@ -21,6 +21,6 @@ dav1d: dav1d-$(DAV1D_VERSION).tar.xz .sum-dav1d
 
 .dav1d: dav1d crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) $(DAV1D_CONF)
+	$(MESON) $(DAV1D_CONF)
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/fribidi/rules.mak
=====================================
@@ -19,6 +19,6 @@ fribidi: fribidi-$(FRIBIDI_VERSION).tar.xz .sum-fribidi
 # FIXME: DEPS_fribidi = iconv $(DEPS_iconv)
 .fribidi: fribidi crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) -Ddocs=false -Dbin=false -Dtests=false
+	$(MESON) -Ddocs=false -Dbin=false -Dtests=false
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/gen-meson-machinefile.py
=====================================
@@ -74,6 +74,7 @@ if args.type == 'internal':
     _add_environ_val('strip', 'STRIP')
     _add_environ_val('pkg-config', 'PKG_CONFIG')
     _add_environ_val('windres', 'WINDRES')
+    _add_environ_val('cmake', 'CMAKE')
 
     # Properties section
     args.file.write("\n[properties]\n")


=====================================
contrib/src/glib/rules.mak
=====================================
@@ -20,6 +20,6 @@ glib: glib-$(GLIB_MINOR_VERSION).tar.xz .sum-glib
 
 .glib: glib
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON)
+	$(MESON)
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/harfbuzz/rules.mak
=====================================
@@ -36,6 +36,6 @@ endif
 
 .harfbuzz: harfbuzz crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) $(HARFBUZZ_CONF)
+	$(MESON) $(HARFBUZZ_CONF)
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/libdsm/rules.mak
=====================================
@@ -25,6 +25,6 @@ endif
 
 .libdsm: libdsm crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) -Dauto_features=disabled -Dbinaries=false
+	$(MESON) -Dauto_features=disabled -Dbinaries=false
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/libplacebo/rules.mak
=====================================
@@ -45,7 +45,7 @@ libplacebo: $(PLACEBO_ARCHIVE) .sum-libplacebo
 
 .libplacebo: libplacebo crossfile.meson .python-venv
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) $(PLACEBOCONF)
+	$(MESON) $(PLACEBOCONF)
 	+$(MESONBUILD)
 # Work-around for full paths to static libraries, which libtool does not like
 # See https://github.com/mesonbuild/meson/issues/5479


=====================================
contrib/src/librist/rules.mak
=====================================
@@ -39,6 +39,6 @@ librist: librist-$(LIBRIST_VERSION).tar.gz .sum-librist
 
 .librist: librist crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) $(LIBRIST_CONF)
+	$(MESON) $(LIBRIST_CONF)
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/main.mak
=====================================
@@ -347,8 +347,6 @@ HOSTTOOLS := \
 	AR="$(AR)" CCAS="$(CCAS)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
 	PKG_CONFIG="$(PKG_CONFIG)"
 
-HOSTVARS_MESON := $(HOSTTOOLS)
-
 ifdef HAVE_BITCODE_ENABLED
 CFLAGS := $(CFLAGS) -fembed-bitcode
 CXXFLAGS := $(CXXFLAGS) -fembed-bitcode
@@ -517,7 +515,7 @@ CMAKE += -DCMAKE_LINK_LIBRARY_SUFFIX:STRING=.a
 endif
 
 MESONFLAGS = $(BUILD_DIR) $< --default-library static --prefix "$(PREFIX)" \
-	--backend ninja -Dlibdir=lib
+	--backend ninja -Dlibdir=lib -Dcmake_prefix_path="$(PREFIX)"
 ifndef WITH_OPTIMIZATION
 MESONFLAGS += --buildtype debug
 else
@@ -544,14 +542,11 @@ ifdef HAVE_CROSS_COMPILE
 # expected.
 MESONFLAGS += --cross-file $(abspath crossfile.meson)
 MESON = env -i PATH="$(PATH)" \
-	PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
-	CMAKE="$(shell command -v cmake)" \
-	CMAKE_PREFIX_PATH="$(PREFIX)" \
 	meson setup -Dpkg_config_path="$(PKG_CONFIG_PATH)" \
 	$(MESONFLAGS)
 
 else
-MESON = meson setup $(MESONFLAGS)
+MESON = $(HOSTTOOLS) meson setup $(MESONFLAGS)
 endif
 MESONCLEAN = rm -rf $(BUILD_DIR)/meson-private
 MESONBUILD = meson compile -C $(BUILD_DIR) $(MESON_BUILD) && meson install -C $(BUILD_DIR)
@@ -813,7 +808,8 @@ endif
 endif
 
 crossfile.meson: $(SRC)/gen-meson-machinefile.py
-	$(HOSTVARS_MESON) \
+	$(HOSTTOOLS) \
+	CMAKE="$(shell command -v cmake)" \
 	WINDRES="$(WINDRES)" \
 	PKG_CONFIG="$(PKG_CONFIG)" \
 	HOST_SYSTEM="$(MESON_SYSTEM_NAME)" \


=====================================
contrib/src/medialibrary/rules.mak
=====================================
@@ -19,7 +19,7 @@ medialibrary: medialibrary-$(MEDIALIBRARY_VERSION).tar.bz2 .sum-medialibrary
 
 .medialibrary: medialibrary crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) -Dlibvlc=disabled -Dlibtool_workaround=true
+	$(MESON) -Dlibvlc=disabled -Dlibtool_workaround=true
 	+$(MESONBUILD)
 	touch $@
 


=====================================
contrib/src/microdns/rules.mak
=====================================
@@ -23,6 +23,6 @@ microdns: microdns-$(LIBMICRODNS_VERSION).tar.xz .sum-microdns
 
 .microdns: microdns crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) -Dauto_features=disabled
+	$(MESON) -Dauto_features=disabled
 	+$(MESONBUILD)
 	touch $@


=====================================
contrib/src/opus/rules.mak
=====================================
@@ -34,6 +34,6 @@ endif
 
 .opus: opus crossfile.meson
 	$(MESONCLEAN)
-	$(HOSTVARS_MESON) $(MESON) $(OPUS_CONF)
+	$(MESON) $(OPUS_CONF)
 	+$(MESONBUILD)
 	touch $@



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/04efc4c90632cbef6b06e7b60ece7cc81a2c90e6...cb0ebea6f3ece814b7b4b70b2d4b7f0eab68f372

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


VideoLAN code repository instance


More information about the vlc-commits mailing list