[vlc-commits] [Git][videolan/vlc][master] contrib: amf: update to 1.4.30 using git

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 7 09:25:31 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
7cfdd439 by Steve Lhomme at 2023-09-07T08:17:51+00:00
contrib: amf: update to 1.4.30 using git

It's faster to get the files from git and compress than downloading
the 400 MB+ package.

We don't use download_git which downloads the whole git history of the
given branch. We use git clone and a sparse checkout to only get the
folder we want for the giant repository.

- - - - -


1 changed file:

- contrib/src/amf/rules.mak


Changes:

=====================================
contrib/src/amf/rules.mak
=====================================
@@ -1,7 +1,10 @@
 # AMF
 
-AMF_VERSION := 1.4.29
+AMF_VERSION := 1.4.30
 AMF_URL := $(GITHUB)/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v$(AMF_VERSION).tar.gz
+AMF_GITURL := $(GITHUB)/GPUOpen-LibrariesAndSDKs/AMF.git
+AMF_BRANCH := v$(AMF_VERSION)
+AMF_GITVERSION := a118570647cfa579af8875c3955a314c3ddd7058
 
 ifeq ($(ARCH),x86_64)
 ifdef HAVE_WIN32
@@ -17,9 +20,26 @@ endif
 $(TARBALLS)/AMF-$(AMF_VERSION).tar.gz:
 	$(call download_pkg,$(AMF_URL),AMF)
 
-.sum-amf: AMF-$(AMF_VERSION).tar.gz
+# .sum-amf: AMF-$(AMF_VERSION).tar.gz
 
-amf: AMF-$(AMF_VERSION).tar.gz .sum-amf
+$(TARBALLS)/AMF-$(AMF_GITVERSION).tar.xz:
+	rm -rf "$@" "$(@:.tar.xz=.githash)"
+	rm -rf "$(@:.tar.xz=)"
+	mkdir "$(@:.tar.xz=)"
+	# clone the top of the branch and only checkout amf/public/include
+	cd "$(@:.tar.xz=)" && git clone -n --depth=1 --filter=tree:0 --branch $(AMF_BRANCH) $(AMF_GITURL) "$(notdir $(@:.tar.xz=))"
+	cd "$(@:.tar.xz=)/$(notdir $(@:.tar.xz=))" && git sparse-checkout set --no-cone amf/public/include && git checkout
+	cd "$(@:.tar.xz=)" && tar cJf "$(notdir $(@))" --exclude=$(notdir $(@:.tar.xz=))/.git $(notdir $(@:.tar.xz=))
+	cd "$(@:.tar.xz=)/$(notdir $(@:.tar.xz=))" && echo "`git rev-parse HEAD` $(@)" > "../tmp.githash"
+	mv -f -- "$(@:.tar.xz=)/tmp.githash" "$(@:.tar.xz=.githash)"
+	mv -f -- "$(@:.tar.xz=)/$(notdir $(@))" "$@"
+	rm -rf "$(@:.tar.xz=)"
+
+.sum-amf: AMF-$(AMF_GITVERSION).tar.xz
+	$(call check_githash,$(AMF_GITVERSION))
+
+# amf: AMF-$(AMF_VERSION).tar.gz .sum-amf
+amf: AMF-$(AMF_GITVERSION).tar.xz .sum-amf
 	$(UNPACK)
 	$(MOVE)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7cfdd439b9ba299606456a62de15b144201176c9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7cfdd439b9ba299606456a62de15b144201176c9
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