summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL8
-rw-r--r--build/bootstrap.build35
-rw-r--r--build/root.build4
-rw-r--r--sqlite3/buildfile16
4 files changed, 42 insertions, 21 deletions
diff --git a/INSTALL b/INSTALL
index e69de29..75defc1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -0,0 +1,8 @@
+The main aim of this package is to make reading the INSTALL file unnecessary.
+So next time try running:
+
+bpkg build libsqlite3
+
+But if you don't want to use the package manager, then you can also build this
+package manually using the build2 build system. See sqlite3/buildfile for some
+configuration options.
diff --git a/build/bootstrap.build b/build/bootstrap.build
index e6b071f..6e801ed 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -11,15 +11,38 @@ using build@0.4.0-a1
# lot of people in the process) we will always have three components and will
# handle an occasional bugfix release with a revision.
#
+# See also: https://www.sqlite.org/versionnumbers.html
+#
version = 3.14.1
-
-abi_major = 3
-abi_minor = 14
-abi_patch = 1
-abi_prerelease = false
-
revision = 0
+# The SQLite documentation says that as long as the major version stays the
+# same, then it is backwards-compatible. And since we have the major version
+# already embedded into the library name, it doesn't make much sense to repeat
+# it.
+#
+# Note, however, that the binary-compatible API doesn't mean all the builds of
+# SQLite are binary-compatible since they can be built with different sets of
+# enabled/disabled functionality. In fact, one easy way to break backwards-
+# compatibility is to disable some feature that was previously enabled.
+#
+# So what we seem to need is not an ABI version but an ABI id that identifies
+# a specific set of features. And this will not be easy/possible if we want
+# to use platform-native versioning (e.g., libsqlite3.so.<num> on Linux). The
+# only way to make this work would be to "reserve" some range for build2-based
+# builds (e.g., 1000-2000 so that we will have libsqlite3.so.1000; that sure
+# looks weird).
+#
+# Another alternative is to use platform-neutral versioning by embedding the
+# id into the library name, similar to '3'. This is probably better since
+# there is no "newer" semantics here. While ideally we should use something
+# like -build2-0 (i.e., "build2 build, id 0"), that will look rather ugly. So
+# we will use just the number but start with -1 in order not to clash with .0
+# used by the autotools build (which becomes -0 on, e.g., Windows; I don't
+# believe it will ever be incremented though).
+#
+abi_major = 1
+
dist.package = $project-$version
if ($revision != 0)
diff --git a/build/root.build b/build/root.build
index 51c13ed..d28a8bf 100644
--- a/build/root.build
+++ b/build/root.build
@@ -5,7 +5,3 @@ using c
h{*}: extension = h
c{*}: extension = c
-
-# All exe{} in test/ are, well, tests.
-#
-test/exe{*}: test = true
diff --git a/sqlite3/buildfile b/sqlite3/buildfile
index 98c0ee6..8fc111b 100644
--- a/sqlite3/buildfile
+++ b/sqlite3/buildfile
@@ -2,14 +2,7 @@
# copyright : not copyrighted - public domain
lib{sqlite3}: {h c}{sqlite3} h{sqlite3ext}
-
-# For pre-releases use the complete version to make sure they cannot be used
-# in place of another pre-release or the final version.
-#
-if $abi_prerelease
- lib{sqlite3}: bin.lib.version = @-$version
-else
- lib{sqlite3}: bin.lib.version = @-$abi_major.$abi_minor
+lib{sqlite3}: bin.lib.version = @-$abi_major # See bootstrap.build.
# The set of features we enable by default is inspired by Debian, Fedora, and
# the official documentation.
@@ -20,7 +13,10 @@ else
#
# PREUPDATE_HOOK is required by SESSION
#
-# -DSQLITE_ENABLE_SESSION=1 removed due to bug in 3.14.1.
+# -DSQLITE_ENABLE_SESSION=1 removed for now due to bug in 3.14.1.
+#
+# Note that if disabling any previously-released features, then will need to
+# increment abi_major.
#
cc.poptions =+ \
-DSQLITE_THREADSAFE=1 \
@@ -36,8 +32,6 @@ cc.poptions =+ \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS=1
-c.poptions += -I$src_base
-
if ($c.target.class != "windows")
{
cc.poptions =+ -DHAVE_USLEEP=1