diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-04-10 16:27:30 -0400 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-04-18 17:22:27 -0400 |
commit | d31c1e77117668ae11a967311d251ad0a4f26d01 (patch) | |
tree | 36ec78e33a87a65e01b2bd8b5d7b20c655a4c964 | |
parent | d71d91cca86ac39b8964b442c41034599d3136ba (diff) | |
download | mongo-d31c1e77117668ae11a967311d251ad0a4f26d01.tar.gz |
SERVER-34058 rearrange sqlite
-rw-r--r-- | src/third_party/SConscript | 2 | ||||
-rwxr-xr-x | src/third_party/scripts/sqlite_get_sources.sh | 44 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/SConscript | 2 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/patches/gethostuuid.patch | 13 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/sqlite/shell.c (renamed from src/third_party/sqlite-amalgamation-3190300/shell.c) | 0 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.c (renamed from src/third_party/sqlite-amalgamation-3190300/sqlite3.c) | 4 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.h (renamed from src/third_party/sqlite-amalgamation-3190300/sqlite3.h) | 0 | ||||
-rw-r--r-- | src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3ext.h (renamed from src/third_party/sqlite-amalgamation-3190300/sqlite3ext.h) | 0 |
8 files changed, 62 insertions, 3 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript index c9b5ad9a2aa..b5d801a9a40 100644 --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -51,7 +51,7 @@ if not use_system_version_of_library('zlib'): if not use_system_version_of_library('sqlite'): thirdPartyIncludePathList.append( - ('sqlite', '#/src/third_party/sqlite' + sqliteSuffix)) + ('sqlite', '#/src/third_party/sqlite' + sqliteSuffix + '/sqlite')) if not use_system_version_of_library('google-benchmark'): thirdPartyIncludePathList.append( diff --git a/src/third_party/scripts/sqlite_get_sources.sh b/src/third_party/scripts/sqlite_get_sources.sh new file mode 100755 index 00000000000..97a3ed062e0 --- /dev/null +++ b/src/third_party/scripts/sqlite_get_sources.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# This script downloads and patches sqlite +# +# Turn on strict error checking, like perl use 'strict' +set -xeuo pipefail +IFS=$'\n\t' + +if [ "$#" -ne 0 ]; then + echo "This script does not take any arguments" + exit 1 +fi + +VERSION=3190300 +NAME=sqlite +PNAME=$NAME-amalgamation-$VERSION + +SRC_ROOT=$(mktemp -d /tmp/$NAME.XXXXXX) +trap "rm -rf $SRC_ROOT" EXIT +SRC=${SRC_ROOT}/${PNAME} +DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/$PNAME +PATCH_DIR=$(git rev-parse --show-toplevel)/src/third_party/$PNAME/patches + +if [ ! -d $SRC ]; then + + pushd $SRC_ROOT + + wget https://sqlite.org/2017/$PNAME.zip + unzip $PNAME.zip + + pushd $SRC + + for patch in $PATCH_DIR/*.patch ; do + patch < $patch + done + + popd + popd +fi + + +test -d $DEST_DIR/$NAME && rm -r $DEST_DIR/$NAME +mkdir -p $DEST_DIR/$NAME + +mv $SRC/* $DEST_DIR/$NAME/ diff --git a/src/third_party/sqlite-amalgamation-3190300/SConscript b/src/third_party/sqlite-amalgamation-3190300/SConscript index b9d25365c33..b412f41ade8 100644 --- a/src/third_party/sqlite-amalgamation-3190300/SConscript +++ b/src/third_party/sqlite-amalgamation-3190300/SConscript @@ -9,6 +9,6 @@ if env.TargetOSIs('windows'): env.Library( target='sqlite3', source=[ - 'sqlite3.c' + 'sqlite/sqlite3.c' ], ) diff --git a/src/third_party/sqlite-amalgamation-3190300/patches/gethostuuid.patch b/src/third_party/sqlite-amalgamation-3190300/patches/gethostuuid.patch new file mode 100644 index 00000000000..65edd1cce83 --- /dev/null +++ b/src/third_party/sqlite-amalgamation-3190300/patches/gethostuuid.patch @@ -0,0 +1,13 @@ +--- a/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.c ++++ b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.c +@@ -29795,7 +29795,9 @@ + && (!defined(TARGET_IPHONE_SIMULATOR) || (TARGET_IPHONE_SIMULATOR==0)) + # define HAVE_GETHOSTUUID 1 + # else +-# warning "gethostuuid() is disabled." ++// MongoDB modification ++// Disable this warning so that this can be built with -Werror ++// # warning "gethostuuid() is disabled." + # endif + #endif + diff --git a/src/third_party/sqlite-amalgamation-3190300/shell.c b/src/third_party/sqlite-amalgamation-3190300/sqlite/shell.c index d36f1fdd19b..d36f1fdd19b 100644 --- a/src/third_party/sqlite-amalgamation-3190300/shell.c +++ b/src/third_party/sqlite-amalgamation-3190300/sqlite/shell.c diff --git a/src/third_party/sqlite-amalgamation-3190300/sqlite3.c b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.c index 9c8fd6204da..0761bda51fa 100644 --- a/src/third_party/sqlite-amalgamation-3190300/sqlite3.c +++ b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.c @@ -29795,7 +29795,9 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ && (!defined(TARGET_IPHONE_SIMULATOR) || (TARGET_IPHONE_SIMULATOR==0)) # define HAVE_GETHOSTUUID 1 # else -# warning "gethostuuid() is disabled." +// MongoDB modification +// Disable this warning so that this can be built with -Werror +// # warning "gethostuuid() is disabled." # endif #endif diff --git a/src/third_party/sqlite-amalgamation-3190300/sqlite3.h b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.h index 3deb9c79bd5..3deb9c79bd5 100644 --- a/src/third_party/sqlite-amalgamation-3190300/sqlite3.h +++ b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3.h diff --git a/src/third_party/sqlite-amalgamation-3190300/sqlite3ext.h b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3ext.h index f25084a1f50..f25084a1f50 100644 --- a/src/third_party/sqlite-amalgamation-3190300/sqlite3ext.h +++ b/src/third_party/sqlite-amalgamation-3190300/sqlite/sqlite3ext.h |