[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: add the contrib native tools to the PATH
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Apr 20 08:29:33 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fe47c2f2 by Steve Lhomme at 2024-04-20T09:26:46+02:00
contrib: add the contrib native tools to the PATH
Some native tools we build may be usable by other targets.
When looking if a tool comes from the system we don't use our binary
folder so we rebuild it when its dependencies change or it needs a full rebuild.
- - - - -
45693d54 by Steve Lhomme at 2024-04-20T09:26:46+02:00
contrib: add macros to get the (major.minor) version of a system tool
- - - - -
7851d3b1 by Steve Lhomme at 2024-04-20T09:26:46+02:00
contrib: use the simplified macro to check the system tool versions
- - - - -
eaa4b3b4 by Steve Lhomme at 2024-04-20T09:26:46+02:00
contrib: mpcdec: remove references to the building from SVN
We don't use that anymore. The repository still exists though.
- - - - -
c511d743 by Steve Lhomme at 2024-04-20T09:26:46+02:00
contrib: remove SVN define
It's not used anymore.
- - - - -
7 changed files:
- contrib/src/lua/rules.mak
- contrib/src/main.mak
- contrib/src/mpcdec/rules.mak
- contrib/src/protobuf/rules.mak
- contrib/src/qt/rules.mak
- contrib/src/qtdeclarative/rules.mak
- contrib/src/qtshadertools/rules.mak
Changes:
=====================================
contrib/src/lua/rules.mak
=====================================
@@ -49,10 +49,10 @@ endif
endif
endif
-ifeq ($(shell $(HOST)-luac -v 2>/dev/null | head -1 | sed -E 's/Lua ([0-9]+).([0-9]+).*/\1.\2/'),$(LUA_SHORTVERSION))
+ifeq ($(call system_tool_majmin, $(HOST)-luac -v),$(LUA_SHORTVERSION))
PKGS_FOUND += luac
endif
-ifeq ($(shell $(HOST)-luac -v 2>/dev/null | head -1 | sed -E 's/Lua ([0-9]+).([0-9]+).*/\1.\2/'),5.2)
+ifeq ($(call system_tool_majmin, $(HOST)-luac -v),5.2)
PKGS_FOUND += luac
endif
=====================================
contrib/src/main.mak
=====================================
@@ -12,9 +12,6 @@ VLC_TOOLS ?= $(TOPSRC)/../extras/tools/build
CMAKE_GENERATOR ?= Ninja
-PATH :=$(abspath $(VLC_TOOLS)/bin):$(PATH)
-export PATH
-
PKGS_ALL := $(patsubst $(SRC)/%/rules.mak,%,$(wildcard $(SRC)/*/rules.mak))
DATE := $(shell date +%Y%m%d)
VPATH := $(TARBALLS)
@@ -41,6 +38,11 @@ PREFIX := $(abspath $(PREFIX))
BUILDPREFIX ?= $(PREFIX)/..
BUILDPREFIX := $(abspath $(BUILDPREFIX))
BUILDBINDIR ?= $(BUILDPREFIX)/bin
+
+SYSTEM_PATH := $(abspath $(VLC_TOOLS)/bin):$(PATH)
+PATH :=$(abspath $(BUILDBINDIR)):$(SYSTEM_PATH)
+export PATH
+
ifneq ($(HOST),$(BUILD))
HAVE_CROSS_COMPILE = 1
endif
@@ -260,6 +262,11 @@ PKG_CONFIG ?= pkg-config
PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PREFIX)/share/pkgconfig:$(PKG_CONFIG_PATH)
export PKG_CONFIG_PATH
+# Get the version of a system tool $1 and pass it through the $2 command(s)
+system_tool_version = $(shell PATH="${SYSTEM_PATH}" $(1) 2>/dev/null | head -1 | sed -ne 's/[^0-9]*\([0-9]\([0-9a-zA-Z\.\-]*\)\)\(.*\)/\1/p' | $(2))
+# Get the major.minor version of a system tool
+system_tool_majmin = $(call system_tool_version, $(1), cut -d '.' -f -2)
+
ifndef GIT
ifeq ($(shell git --version >/dev/null 2>&1 || echo FAIL),)
GIT = git
@@ -267,13 +274,6 @@ endif
endif
GIT ?= $(error git not found)
-ifndef SVN
-ifeq ($(shell svn --version >/dev/null 2>&1 || echo FAIL),)
-SVN = svn
-endif
-endif
-SVN ?= $(error subversion client (svn) not found)
-
ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
download = curl -f -L -- "$(1)" > "$@"
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
=====================================
contrib/src/mpcdec/rules.mak
=====================================
@@ -15,14 +15,7 @@ $(TARBALLS)/musepack_src_r$(MUSE_REV).tar.gz:
#MUSE_REV := 481
#MUSE_SVN := http://svn.musepack.net/libmpc/trunk/
-#$(TARBALLS)/musepack_src_r$(MUSE_REV).tar.gz:
-# rm -Rf musepack_src_r$(MUSE_REV)
-# $(SVN) export $(MUSE_SVN) -r $(MUSE_REV) musepack_src_r$(MUSE_REV)
-# tar czv musepack_src_r$(MUSE_REV) > $@
-
.sum-mpcdec: musepack_src_r$(MUSE_REV).tar.gz
-# $(warning $@ not implemented)
-# touch $@
musepack: musepack_src_r$(MUSE_REV).tar.gz .sum-mpcdec
$(UNPACK)
=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -20,7 +20,7 @@ endif
endif
PKGS.tools.protoc.path = $(BUILDBINDIR)/protoc
-ifeq ($(shell protoc --version 2>/dev/null | head -1 | sed s/'.* '// | cut -d '.' -f -2),$(PROTOBUF_MAJVERSION))
+ifeq ($(call system_tool_majmin, protoc --version),$(PROTOBUF_MAJVERSION))
PKGS_FOUND += protoc
endif
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -28,7 +28,7 @@ endif
ifndef HAVE_CROSS_COMPILE
PKGS_FOUND += qt-tools
endif
-ifeq ($(shell qt-cmake --version 2>/dev/null | head -1 | sed s/'.* '// | cut -d '.' -f -2),3.22)
+ifeq ($(call system_tool_version, qt-cmake --version),3.22)
PKGS_FOUND += qt-tools
endif
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -25,7 +25,7 @@ endif
ifndef HAVE_CROSS_COMPILE
PKGS_FOUND += qtdeclarative-tools
endif
-ifeq ($(shell qml --version 2>/dev/null | head -1 | sed s/'.* '// | cut -d '.' -f -2),$(QTDECLARATIVE_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, qml --version),$(QTDECLARATIVE_VERSION_MAJOR))
PKGS_FOUND += qtshadertools-tools
endif
=====================================
contrib/src/qtshadertools/rules.mak
=====================================
@@ -29,7 +29,7 @@ endif
ifndef HAVE_CROSS_COMPILE
PKGS_FOUND += qtshadertools-tools
endif
-ifeq ($(shell qsb --version 2>/dev/null | head -1 | sed s/'.* '// | cut -d '.' -f -2),$(QTSHADERTOOLS_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, qsb --version),$(QTSHADERTOOLS_VERSION_MAJOR))
PKGS_FOUND += qtshadertools-tools
endif
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d3f97935d6ab7d9c3a151e7cdbac4c9fc9d1a900...c511d743e201a09d567226d1375e90badfd80102
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d3f97935d6ab7d9c3a151e7cdbac4c9fc9d1a900...c511d743e201a09d567226d1375e90badfd80102
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