[vlc-devel] [PATCH] Make fetching prebuilt deps work on darwin

Luca Barbato lu_zero at gentoo.org
Sat May 18 14:31:36 CEST 2019


The prebuilt tarball is versioned using only the major version.
Strip the other version components in the fetch url and place the
tarball contents in the right directory.
---
 contrib/bootstrap    | 12 ++++++++++++
 contrib/src/main.mak |  6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index 96c59f71fa..6e62f99b8b 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -378,6 +378,18 @@ case "${OS}" in
 esac
 
 #
+# Fetch the right contrib tarball
+#
+
+case "${OS}" in
+        *-darwin*)
+            add_make "PREBUILT_HOST := ${HOST%%.*}"
+            ;;
+        *)
+            add_make "PREBUILT_HOST := ${HOST}"
+            ;;
+esac
+#
 # Results output
 #
 test -e Makefile && unlink Makefile
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 30a5e1f03a..fcab4970fa 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -459,15 +459,15 @@ distclean: clean
 	$(RM) config.mak
 	unlink Makefile
 
-PREBUILT_URL=http://download.videolan.org/pub/videolan/contrib/$(HOST)/vlc-contrib-$(HOST)-latest.tar.bz2
+PREBUILT_URL=http://download.videolan.org/pub/videolan/contrib/$(PREBUILT_HOST)/vlc-contrib-$(PREBUILT_HOST)-latest.tar.bz2
 
 vlc-contrib-$(HOST)-latest.tar.bz2:
 	$(call download,$(PREBUILT_URL))
 
-prebuilt: vlc-contrib-$(HOST)-latest.tar.bz2
+prebuilt: vlc-contrib-$(PREBUILT_HOST)-latest.tar.bz2
 	-$(UNPACK)
 	$(RM) -r $(TOPDST)/$(HOST)
-	mv $(HOST) $(TOPDST)
+	mv $(PREBUILT_HOST) $(TOPDST)/$(HOST)
 	cd $(TOPDST)/$(HOST) && $(SRC)/change_prefix.sh
 ifdef HAVE_WIN32
 ifndef HAVE_CROSS_COMPILE
-- 
2.12.2



More information about the vlc-devel mailing list