Skip to content
Snippets Groups Projects
Commit 7cfdd439 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

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.
parent e0d33454
No related branches found
No related tags found
1 merge request!4207contrib: AMF: download a smaller version of the git
Pipeline #382175 passed with warnings with stage
in 52 minutes and 42 seconds
# 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment