diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/libsqlite3-sys/upgrade.sh | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/libsqlite3-sys/upgrade.sh')
-rwxr-xr-x | third_party/rust/libsqlite3-sys/upgrade.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/third_party/rust/libsqlite3-sys/upgrade.sh b/third_party/rust/libsqlite3-sys/upgrade.sh new file mode 100755 index 0000000000..5aaef172b1 --- /dev/null +++ b/third_party/rust/libsqlite3-sys/upgrade.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +SCRIPT_DIR=$(cd "$(dirname "$_")" && pwd) +echo "$SCRIPT_DIR" +cd "$SCRIPT_DIR" || { echo "fatal error"; exit 1; } +export SQLITE3_LIB_DIR=$SCRIPT_DIR/sqlite3 + +# Download and extract amalgamation +SQLITE=sqlite-amalgamation-3330000 +curl -O https://sqlite.org/2020/$SQLITE.zip +unzip -p "$SQLITE.zip" "$SQLITE/sqlite3.c" > "$SQLITE3_LIB_DIR/sqlite3.c" +unzip -p "$SQLITE.zip" "$SQLITE/sqlite3.h" > "$SQLITE3_LIB_DIR/sqlite3.h" +unzip -p "$SQLITE.zip" "$SQLITE/sqlite3ext.h" > "$SQLITE3_LIB_DIR/sqlite3ext.h" +rm -f "$SQLITE.zip" + +# Regenerate bindgen file +rm -f "$SQLITE3_LIB_DIR/bindgen_bundled_version.rs" +export SQLITE3_INCLUDE_DIR=$SQLITE3_LIB_DIR +cargo update +# Just to make sure there is only one bindgen.rs file in target dir +find "$SCRIPT_DIR/../target" -type f -name bindgen.rs -exec rm {} \; +env LIBSQLITE3_SYS_BUNDLING=1 cargo build --features "buildtime_bindgen" --no-default-features +find "$SCRIPT_DIR/../target" -type f -name bindgen.rs -exec cp {} "$SQLITE3_LIB_DIR/bindgen_bundled_version.rs" \; +# Sanity check +cd "$SCRIPT_DIR/.." || { echo "fatal error"; exit 1; } +cargo update +cargo test --features "backup blob chrono functions limits load_extension serde_json trace vtab bundled" +echo 'You should increment the version in libsqlite3-sys/Cargo.toml' |