Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new patch infra. #1239

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions deps/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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"
Expand Down
15 changes: 15 additions & 0 deletions deps/patches/1208.patch
Original file line number Diff line number Diff line change
@@ -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 },
};

/*