use prebuilt sqlite

fixes #31
This commit is contained in:
Colin Dellow 2018-07-05 23:36:30 -04:00
parent 2732f9885a
commit 65e47e5828
2 changed files with 18 additions and 9 deletions

View File

@ -15,7 +15,10 @@ fetch_if_needed() {
build() { build() {
cd sqlite cd sqlite
./configure ./configure
if [ ! -v PREBUILT ]; then
make -j$(nproc) make -j$(nproc)
fi
} }
main() { main() {

View File

@ -33,7 +33,7 @@ install_prerequisites() {
build_sqlite() { build_sqlite() {
if [ ! -e ../../sqlite/sqlite3 ]; then if [ ! -e ../../sqlite/sqlite3 ]; then
make sqlite ( cd "../.." && ./build-sqlite )
fi fi
} }
@ -61,13 +61,18 @@ add_prebuilt_lib() {
} }
fetch_prebuilt_libs() { fetch_prebuilt_libs() {
for lib in "${libs[@]}"; do if [ ! -e "$prebuilt"/complete ]; then
if [ ! -e "$prebuilt/$lib" ]; then (
echo "Fetching prebuilt $lib for Ubuntu $ubuntu" cd "$prebuilt"
curl "https://s3.amazonaws.com/cldellow/public/libparquet/$ubuntu/$lib" > tmp.a curl "https://s3.amazonaws.com/cldellow/public/libparquet/$ubuntu/libs.tar.xz" > libs.tar.xz
mv tmp.a "$prebuilt"/$lib tar xf libs.tar.xz --xform 's#.*/##'
touch "$prebuilt"/complete
)
fi
if [ ! -e "$here"/sqlite/sqlite3 ]; then
ln -s "$prebuilt"/sqlite3 "$here"/sqlite/sqlite3
fi fi
done
add_prebuilt_lib "PARQUET_CPP_LIB" libparquet add_prebuilt_lib "PARQUET_CPP_LIB" libparquet
add_prebuilt_lib "LZ4_LIB" liblz4 add_prebuilt_lib "LZ4_LIB" liblz4
@ -84,6 +89,7 @@ fetch_prebuilt_libs() {
add_prebuilt_lib "BOOST_REGEX_LIB" libboost_regex add_prebuilt_lib "BOOST_REGEX_LIB" libboost_regex
add_prebuilt_lib "BOOST_SYSTEM_LIB" libboost_system add_prebuilt_lib "BOOST_SYSTEM_LIB" libboost_system
add_prebuilt_lib "BOOST_FILESYSTEM_LIB" libboost_filesystem add_prebuilt_lib "BOOST_FILESYSTEM_LIB" libboost_filesystem
} }
main() { main() {