[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: contrib: lua: use UNPACK_DIR to extract to a different folder for luac

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 21 10:26:56 UTC 2024



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
85398758 by Steve Lhomme at 2024-11-21T09:29:30+00:00
contrib: lua: use UNPACK_DIR to extract to a different folder for luac

(cherry picked from commit c04c755b5378de4affb79ae37fca80d895fd449e)

- - - - -
5a843f83 by Steve Lhomme at 2024-11-21T09:29:30+00:00
contrib: don't show untar'ed files in non verbose mode

This avoids being bombarded with logs when building.

(cherry picked from commit 0a555fa1ac6db47923c9db03faa8d49393f571ec)

- - - - -


2 changed files:

- contrib/src/lua/rules.mak
- contrib/src/main.mak


Changes:

=====================================
contrib/src/lua/rules.mak
=====================================
@@ -94,13 +94,13 @@ LUACVARS=CPPFLAGS="-DLUA_DL_DLL"
 endif
 endif
 
+# DO NOT use the same intermediate directory as the lua target
+luac: UNPACK_DIR=luac-$(LUA_VERSION)
 luac: lua-$(LUA_VERSION).tar.gz .sum-luac
-	# DO NOT use the same intermediate directory as the lua target
-	rm -Rf -- $@-$(LUA_VERSION) $@
-	mkdir -- $@-$(LUA_VERSION)
-	tar -x -v -z -o -C $@-$(LUA_VERSION) --strip-components=1 -f $<
-	(cd luac-$(LUA_VERSION) && patch -p1) < $(SRC)/lua/luac-32bits.patch
-	mv luac-$(LUA_VERSION) luac
+	$(RM) -Rf $@ $(UNPACK_DIR) && mkdir -p $(UNPACK_DIR)
+	tar $(TAR_VERBOSE)xzfo $< -C $(UNPACK_DIR) --strip-components=1
+	$(APPLY) $(SRC)/lua/luac-32bits.patch
+	$(MOVE)
 
 .luac: luac
 	cd $< && $(LUACVARS) $(MAKE) generic


=====================================
contrib/src/main.mak
=====================================
@@ -353,6 +353,10 @@ check_githash = \
 		< "$(<:.tar.xz=.githash)"` && \
 	test "$$h" = "$1"
 
+ifeq ($(V),1)
+TAR_VERBOSE := v
+endif
+
 checksum = \
 	$(foreach f,$(filter $(TARBALLS)/%,$^), \
 		grep -- " $(f:$(TARBALLS)/%=%)$$" \
@@ -361,9 +365,9 @@ checksum = \
 		"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
 CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
 UNPACK = $(RM) -R $@ \
-	$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzfo $(f)) \
-	$(foreach f,$(filter %.tar.bz2,$^), && tar xvjfo $(f)) \
-	$(foreach f,$(filter %.tar.xz,$^), && tar xvJfo $(f)) \
+	$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar $(TAR_VERBOSE)xzfo $(f)) \
+	$(foreach f,$(filter %.tar.bz2,$^), && tar $(TAR_VERBOSE)xjfo $(f)) \
+	$(foreach f,$(filter %.tar.xz,$^), && tar $(TAR_VERBOSE)xJfo $(f)) \
 	$(foreach f,$(filter %.zip,$^), && unzip $(f))
 UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
 APPLY = (cd $(UNPACK_DIR) && patch -fp1) <



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/801e7068ddd8b8110ecb17ed48e0921bab409ff8...5a843f83f9f97ca415497eea9359a778f74e9386

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/801e7068ddd8b8110ecb17ed48e0921bab409ff8...5a843f83f9f97ca415497eea9359a778f74e9386
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