summaryrefslogtreecommitdiff
path: root/libsqlite3/libsqlite3
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-11 16:47:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-11 16:47:49 +0300
commit3d3a63d289cdaa8bc4d4a3820d499ea5a3205b43 (patch)
treee608c7ebe88503c670fcec02b6db5f54a6843dd2 /libsqlite3/libsqlite3
parentaa5ecc3b21bf88c5b9b9c17912e4efbd96eeab34 (diff)
Release version 3.18.2+7v3.18.2
Place libsqlite3 and sqlite3 packages into single repository.
Diffstat (limited to 'libsqlite3/libsqlite3')
-rw-r--r--libsqlite3/libsqlite3/buildfile101
l---------libsqlite3/libsqlite3/sqlite3.c1
l---------libsqlite3/libsqlite3/sqlite3.h1
l---------libsqlite3/libsqlite3/sqlite3ext.h1
4 files changed, 104 insertions, 0 deletions
diff --git a/libsqlite3/libsqlite3/buildfile b/libsqlite3/libsqlite3/buildfile
new file mode 100644
index 0000000..d8c2913
--- /dev/null
+++ b/libsqlite3/libsqlite3/buildfile
@@ -0,0 +1,101 @@
+# file : libsqlite3/buildfile
+# copyright : not copyrighted - public domain
+
+lib{sqlite3}: {h c}{*}
+
+tclass = $c.target.class
+
+bsd = ($tclass == 'bsd')
+windows = ($tclass == 'windows')
+
+gcc = ($c.class == 'gcc')
+
+# Build options.
+#
+# The set of features we enable by default is inspired by Debian, Fedora, and
+# the official documentation.
+#
+# Note that we "prefix" them to what might have been specified by the user so
+# that it is possible to override the defaults by specifying them as =0 (it's
+# also the reason we use cc.* instead of c.*, the former comes first).
+#
+# PREUPDATE_HOOK is required by SESSION
+#
+# -DSQLITE_ENABLE_SESSION=1 removed for now due to bug in 3.18.0.
+#
+# Note that if disabling any previously-released features, then will need to
+# increment abi_major.
+#
+cc.poptions =+ \
+-DSQLITE_THREADSAFE=1 \
+-DSQLITE_ENABLE_FTS4=1 \
+-DSQLITE_ENABLE_FTS5=1 \
+-DSQLITE_ENABLE_RTREE=1 \
+-DSQLITE_ENABLE_JSON1=1 \
+-DSQLITE_SECURE_DELETE=1 \
+-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
+-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
+-DSQLITE_ENABLE_LOAD_EXTENSION=1 \
+-DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
+-DSQLITE_ENABLE_COLUMN_METADATA=1 \
+-DSQLITE_ENABLE_FTS3_PARENTHESIS=1
+
+if! $windows
+{
+ cc.poptions =+ -DHAVE_USLEEP=1
+
+ # SQLITE_THREADSAFE requres -lpthread
+ # SQLITE_ENABLE_LOAD_EXTENSION requires -ldl
+ # SQLITE_ENABLE_FTS5 requires -lm (calls log(1))
+ #
+ # You may be wondering why we didn't import them instead. While it would be
+ # almost equivalent, there is a subtle difference: if we import them, then
+ # build2 will start selecting static/shared libraries and we probably don't
+ # want that here. These libraries are in a sense an extension of -lc and we
+ # want them to be linked in the same way as -lc (e.g., the user will have to
+ # specify -static to force static linking and so on).
+ #
+ # We also assume these are implementation dependencies (so there is no
+ # c.export.libs listing them).
+ #
+ c.libs += -lpthread -lm
+
+ if! $bsd
+ c.libs += -ldl
+}
+
+# Both Debian and Fedora add this so gotta be important.
+#
+if $gcc
+ c.coptions += -fno-strict-aliasing
+
+# Disable warnings that pop up with -Wextra. Upstream doesn't seem to care
+# about these and it is not easy to disable specific warnings in a way that
+# works across compilers/version (some -Wno-* options are only recognized in
+# newer versions). Some warnings may still appear for certain (newer)
+# platforms/compilers. We pass them through but disable treating them as
+# errors.
+#
+if $gcc
+ c.coptions += -Wno-extra -Wno-error
+
+# Export options.
+#
+# It would have been cleaner to handle this in a header but that will require
+# modifying sqlite3.h. Note that this is also sub-optimal if we are not using
+# an export stub (no dllimport).
+#
+lib{sqlite3}: cc.export.poptions = "-I$src_base"
+
+if $windows
+{
+ objs{*}: c.poptions += '-DSQLITE_API=__declspec(dllexport)'
+ libs{sqlite3}: cc.export.poptions += '-DSQLITE_API=__declspec(dllimport)'
+}
+
+# See bootstrap.build for details.
+#
+if $version.pre_release
+ lib{sqlite3}: bin.lib.version = @"-$version.project_id"
+else
+ lib{sqlite3}: bin.lib.version = @"-$abi_major"
diff --git a/libsqlite3/libsqlite3/sqlite3.c b/libsqlite3/libsqlite3/sqlite3.c
new file mode 120000
index 0000000..9878295
--- /dev/null
+++ b/libsqlite3/libsqlite3/sqlite3.c
@@ -0,0 +1 @@
+../../upstream/sqlite3.c \ No newline at end of file
diff --git a/libsqlite3/libsqlite3/sqlite3.h b/libsqlite3/libsqlite3/sqlite3.h
new file mode 120000
index 0000000..5ba6981
--- /dev/null
+++ b/libsqlite3/libsqlite3/sqlite3.h
@@ -0,0 +1 @@
+../../upstream/sqlite3.h \ No newline at end of file
diff --git a/libsqlite3/libsqlite3/sqlite3ext.h b/libsqlite3/libsqlite3/sqlite3ext.h
new file mode 120000
index 0000000..040b521
--- /dev/null
+++ b/libsqlite3/libsqlite3/sqlite3ext.h
@@ -0,0 +1 @@
+../../upstream/sqlite3ext.h \ No newline at end of file