diff --git a/deps/download.sh b/deps/download.sh index 743c7da0..78c5d427 100755 --- a/deps/download.sh +++ b/deps/download.sh @@ -88,6 +88,15 @@ make sqlite3.c > /dev/null || exit 1 echo "copying amalgamation..." cp sqlite3.c sqlite3.h sqlite3ext.h "$OUTPUT/" || exit 1 +echo "applying patches..." +cd "$DEPS" || exit 1 +for patch in patches/*.patch; do + # If a patch fails, just skip it an move on. + # By default `patch` tries to be clever and reverse the patch, so we have to specify `--forward`. + # If the patch fails, we # don't write .orig and .rej files, so we have to specify `--no-backup-if-mismatch` and `--reject-file=-`. + patch --batch --forward --no-backup-if-mismatch --reject-file=- -p2 < "$patch" +done + echo "updating gyp configs..." GYP="$DEPS/defines.gypi" printf "# THIS FILE IS AUTOMATICALLY GENERATED BY deps/download.sh (DO NOT EDIT)\n\n{\n 'defines': [\n" > "$GYP" diff --git a/deps/patches/1208.patch b/deps/patches/1208.patch new file mode 100644 index 00000000..08d88ca5 --- /dev/null +++ b/deps/patches/1208.patch @@ -0,0 +1,15 @@ +diff --git a/deps/sqlite3/sqlite3.c b/deps/sqlite3/sqlite3.c +index b1a807f..38bd1e6 100644 +--- a/deps/sqlite3/sqlite3.c ++++ b/deps/sqlite3/sqlite3.c +@@ -24887,8 +24887,8 @@ static const struct { + /* 1 */ { 6, "minute", 7.7379e+12, 60.0 }, + /* 2 */ { 4, "hour", 1.2897e+11, 3600.0 }, + /* 3 */ { 3, "day", 5373485.0, 86400.0 }, +- /* 4 */ { 5, "month", 176546.0, 30.0*86400.0 }, +- /* 5 */ { 4, "year", 14713.0, 365.0*86400.0 }, ++ /* 4 */ { 5, "month", 176546.0, 2592000.0 }, ++ /* 5 */ { 4, "year", 14713.0, 31536000.0 }, + }; + + /*