Explorar el Código

Merge pull request #138 from herrhotzenplotz/fix-freebsd-build

Use fetch instead of wget on FreeBSD
Alexey Kutepov hace 5 años
padre
commit
94ec49250a
Se han modificado 1 ficheros con 5 adiciones y 3 borrados
  1. 5 3
      third_party/build_third_party.sh

+ 5 - 3
third_party/build_third_party.sh

@@ -6,13 +6,15 @@ set -e
 FFMPEG_VERSION=4.3
 GIFLIB_VERSION=5.2.1
 MAKE=make
+WGET='wget --no-dns-cache'
 
 # TODO(#102): ./build_third_party.sh does not respect other BSD's or Darwin that might not use GNU make
 # Testing is required and the conditions here may have to be changed accordingly.
 if [ `uname -s` = "FreeBSD" ]; then
-	echo INFO : FreeBSD detected. Setting MAKE to gmake.
+	echo INFO : FreeBSD detected. Using gmake and fetch instead.
 	if test -x "/usr/local/bin/gmake"; then
 		MAKE=gmake
+		WGET=fetch
 	else
 		echo "GNU Make is required to build the third-party dependencies."
 		echo "Aborting..."
@@ -21,7 +23,7 @@ if [ `uname -s` = "FreeBSD" ]; then
 fi
 
 if [ ! -d "ffmpeg-${FFMPEG_VERSION}-dist" ]; then
-    wget --no-dns-cache "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz"
+    $WGET "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz"
     tar fvx "ffmpeg-${FFMPEG_VERSION}.tar.xz"
     mkdir "ffmpeg-${FFMPEG_VERSION}-dist"
     
@@ -33,7 +35,7 @@ if [ ! -d "ffmpeg-${FFMPEG_VERSION}-dist" ]; then
 fi
 
 if [ ! -d "giflib-${GIFLIB_VERSION}-dist" ]; then
-    wget --no-dns-cache "https://deac-riga.dl.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.gz"
+    $WGET "https://deac-riga.dl.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.gz"
     tar fvx "giflib-${GIFLIB_VERSION}.tar.gz"
     # NOTE: Taken from here https://sourceforge.net/p/giflib/bugs/133/
     patch "giflib-${GIFLIB_VERSION}/Makefile" < Makefile.patch