aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaynor Vliegendhart <shinnonoir+git@gmail.com>2017-10-02 14:31:06 +0200
committerGitHub <noreply@github.com>2017-10-02 14:31:06 +0200
commit973b0e534622e010b7591efb7db65ca823ac99ef (patch)
tree9f83ce23711a5b2e5665ef2ac95b8fa4062c7b9b
parent0ecd97a1105db5ab5e29ff273c8b2401e71290cf (diff)
downloadvcpkg-973b0e534622e010b7591efb7db65ca823ac99ef.tar.gz
vcpkg-973b0e534622e010b7591efb7db65ca823ac99ef.zip
[ffmpeg] Deal with case-sensitive env vars
When behind a corporate proxy, one often needs to specify `HTTP_PROXY` and `HTTPS_PROXY` for some command line tools to work properly. However, `pacman` seems to rely on the lowercase equivalent environment variables. In a Windows command prompt environment, it is not possible to set both since Windows environment variables are not case-sensitive. As a workaround, this build script checks for the existence of HTTP_PROXY and HTTPS_PROXY. If they exist, they are exported as lowercase variables.
-rw-r--r--ports/ffmpeg/build.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh
index 3474a111e..eea05c959 100644
--- a/ports/ffmpeg/build.sh
+++ b/ports/ffmpeg/build.sh
@@ -1,6 +1,13 @@
#!/usr/bin/bash
set -e
export PATH=/usr/bin:$PATH
+# Export HTTP(S)_PROXY as http(s)_proxy:
+if [ "$HTTP_PROXY" ]; then
+ export http_proxy=$HTTP_PROXY
+fi
+if [ "$HTTPS_PROXY" ]; then
+ export https_proxy=$HTTPS_PROXY
+fi
pacman -Sy --noconfirm --needed diffutils make
PATH_TO_BUILD_DIR="`cygpath "$1"`"