summaryrefslogtreecommitdiff
path: root/deps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deps.sh')
-rwxr-xr-xdeps.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/deps.sh b/deps.sh
index 9aaabba..78987c3 100755
--- a/deps.sh
+++ b/deps.sh
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file.
# This file downloads the dependencies needed to build JPEG XL into third_party.
-# These dependencies are normally pulled by gtest.
+# These dependencies are normally pulled by git.
set -eu
@@ -13,12 +13,13 @@ MYDIR=$(dirname $(realpath "$0"))
# Git revisions we use for the given submodules. Update these whenever you
# update a git submodule.
-THIRD_PARTY_BROTLI="35ef5c554d888bef217d449346067de05e269b30"
-THIRD_PARTY_HIGHWAY="22e3d7276f4157d4a47586ba9fd91dd6303f441a"
-THIRD_PARTY_SKCMS="64374756e03700d649f897dbd98c95e78c30c7da"
-THIRD_PARTY_SJPEG="868ab558fad70fcbe8863ba4e85179eeb81cc840"
+THIRD_PARTY_BROTLI="36533a866ed1ca4b75cf049f4521e4ec5fe24727"
+THIRD_PARTY_HIGHWAY="ba0900a4957b929390ab73827235557959234fea"
+THIRD_PARTY_SKCMS="42030a771244ba67f86b1c1c76a6493f873c5f91"
+THIRD_PARTY_SJPEG="e5ab13008bb214deb66d5f3e17ca2f8dbff150bf"
THIRD_PARTY_ZLIB="cacf7f1d4e3d44d871b605da3b647f07d718623f"
-THIRD_PARTY_LIBPNG="a40189cf881e9f0db80511c382292a5604c3c3d1"
+THIRD_PARTY_LIBPNG="f135775ad4e5d4408d2e12ffcc71bb36e6b48551" # v1.6.40
+THIRD_PARTY_LIBJPEG_TURBO="8ecba3647edb6dd940463fedf38ca33a8e2a73d1" # 2.1.5.1
# Download the target revision from GitHub.
download_github() {
@@ -26,7 +27,7 @@ download_github() {
local project="$2"
local varname=`echo "$path" | tr '[:lower:]' '[:upper:]'`
- varname="${varname/\//_}"
+ varname="${varname/[\/-]/_}"
local sha
eval "sha=\${${varname}}"
@@ -57,9 +58,16 @@ download_github() {
mv "${local_fn}.tmp" "${local_fn}"
}
+is_git_repository() {
+ local dir="$1"
+ local toplevel=$(git rev-parse --show-toplevel)
+
+ [[ "${dir}" == "${toplevel}" ]]
+}
+
main() {
- if git -C "${MYDIR}" rev-parse; then
+ if is_git_repository "${MYDIR}"; then
cat >&2 <<EOF
Current directory is a git repository, downloading dependencies via git:
@@ -78,6 +86,7 @@ EOF
"https://skia.googlesource.com/skcms/+archive/"
download_github third_party/zlib madler/zlib
download_github third_party/libpng glennrp/libpng
+ download_github third_party/libjpeg-turbo libjpeg-turbo/libjpeg-turbo
echo "Done."
}