[vlc-commits] [Git][videolan/vlc][master] 4 commits: contrib: add a target to build native tools

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Wed Mar 9 16:00:14 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
febcab26 by Steve Lhomme at 2022-03-09T14:51:20+00:00
contrib: add a target to build native tools

We do not build tools that are found on the system.

- - - - -
e0855123 by Steve Lhomme at 2022-03-09T14:51:20+00:00
contrib: protobuf: add protoc to the list of native tools to build

- - - - -
8110ae9c by Steve Lhomme at 2022-03-09T14:51:20+00:00
contrib: lua: add luac to the list of native tools to build

- - - - -
29ac1277 by Steve Lhomme at 2022-03-09T14:51:20+00:00
extras: build native tools when using prebuilt contribs

Rather than force building .luac and .protoc all the time.

- - - - -


9 changed files:

- contrib/src/help.txt
- contrib/src/lua/rules.mak
- contrib/src/main.mak
- contrib/src/protobuf/rules.mak
- extras/ci/gitlab-ci.yml
- extras/package/macosx/build.sh
- extras/package/raspberry/build.sh
- extras/package/snap/snapcraft.yaml
- extras/package/win32/build.sh


Changes:

=====================================
contrib/src/help.txt
=====================================
@@ -3,6 +3,7 @@ Run "make" to start compilation.
 Other targets:
  * make install      same as "make"
  * make prebuilt     fetch and install prebuilt binaries
+ * make tools        build native tools binaries
  * make list         list packages
  * make fetch        fetch required source tarballs
  * make fetch-all    fetch all source tarballs


=====================================
contrib/src/lua/rules.mak
=====================================
@@ -27,6 +27,7 @@ endif
 
 # Feel free to add autodetection if you need to...
 PKGS += lua luac
+PKGS_TOOLS += luac
 PKGS_ALL += luac
 ifeq ($(call need_pkg,"lua >= 5.1"),)
 PKGS_FOUND += lua


=====================================
contrib/src/main.mak
=====================================
@@ -529,6 +529,7 @@ PKGS := $(sort $(PKGS_MANUAL) $(PKGS_DEPS))
 fetch: $(PKGS:%=.sum-%)
 fetch-all: $(PKGS_ALL:%=.sum-%)
 install: $(PKGS:%=.%)
+tools: $(PKGS_TOOLS:%=.dep-%)
 
 mostlyclean:
 	-$(RM) $(foreach p,$(PKGS_ALL),.$(p) .sum-$(p) .dep-$(p))
@@ -578,6 +579,8 @@ endif
 list:
 	@echo All packages:
 	@echo '  $(PKGS_ALL)' | tr " " "\n" | sort | tr "\n" " " |fmt
+	@echo All native tools:
+	@echo '  $(PKGS_TOOLS)' | tr " " "\n" | sort | tr "\n" " " |fmt
 	@echo Distribution-provided packages:
 	@echo '  $(PKGS_FOUND)' | tr " " "\n" | sort | tr "\n" " " |fmt
 	@echo Automatically selected packages:
@@ -594,7 +597,7 @@ list:
 help:
 	@cat $(SRC)/help.txt
 
-.PHONY: all fetch fetch-all install mostlyclean clean distclean package list help prebuilt
+.PHONY: all fetch fetch-all install mostlyclean clean distclean package list help prebuilt tools
 
 CMAKE_SYSTEM_NAME =
 ifdef HAVE_CROSS_COMPILE


=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -4,6 +4,7 @@ PROTOBUF_URL := https://github.com/google/protobuf/releases/download/v$(PROTOBUF
 
 ifndef HAVE_TVOS
 PKGS += protobuf protoc
+PKGS_TOOLS += protoc
 endif # !HAVE_TVOS
 PKGS_ALL += protoc
 ifeq ($(call need_pkg, "protobuf-lite = $(PROTOBUF_VERSION)"),)


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -242,7 +242,7 @@ debian:
         if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
             echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
             make prebuilt PREBUILT_URL="${VLC_PREBUILT_CONTRIBS_URL}"
-            make -j$NCPU --output-sync=recurse .protoc
+            make -j$NCPU --output-sync=recurse tools
         else
             make list
             make -j$NCPU --output-sync=recurse fetch


=====================================
extras/package/macosx/build.sh
=====================================
@@ -183,7 +183,7 @@ if [ ! -e "../$HOST_TRIPLET" ]; then
     else
         make prebuilt
     fi
-    make .luac .protoc
+    make -j$JOBS tools
 fi
 fi
 spopd


=====================================
extras/package/raspberry/build.sh
=====================================
@@ -130,10 +130,10 @@ if [ "$PREBUILT" != "yes" ]; then
     fi
 elif [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
     make prebuilt PREBUILT_URL="$VLC_PREBUILT_CONTRIBS_URL"
-    make -j$JOBS --output-sync=recurse .luac .protoc
+    make -j$JOBS --output-sync=recurse tools
 else
     make prebuilt
-    make -j$JOBS --output-sync=recurse .luac .protoc
+    make -j$JOBS --output-sync=recurse tools
 fi
 cd ../..
 


=====================================
extras/package/snap/snapcraft.yaml
=====================================
@@ -82,7 +82,7 @@ parts:
           --disable-chromaprint
       if [ -v VLC_PREBUILT_CONTRIBS_URL ]; then
           make prebuilt PREBUILT_URL="$VLC_PREBUILT_CONTRIBS_URL"
-          make -j $(getconf _NPROCESSORS_ONLN) .protoc
+          make -j $(getconf _NPROCESSORS_ONLN) tools
       else
           make list
           make -j $(getconf _NPROCESSORS_ONLN) fetch


=====================================
extras/package/win32/build.sh
=====================================
@@ -333,7 +333,7 @@ else
     else
         make prebuilt
     fi
-    make .luac .protoc
+    make -j$JOBS tools
 fi
 cd ../..
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b68cc9074c5f16c2f8d7b64ce82a381d2decad9b...29ac127718393bfc88240d6d37a631b9e32726b7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b68cc9074c5f16c2f8d7b64ce82a381d2decad9b...29ac127718393bfc88240d6d37a631b9e32726b7
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