summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README-DEV4
-rw-r--r--libsqlite3/libsqlite3/buildfile7
-rw-r--r--libsqlite3/manifest2
-rw-r--r--repositories.manifest4
-rw-r--r--sqlite3/.gitignore4
-rw-r--r--sqlite3/buildfile16
-rw-r--r--sqlite3/manifest3
-rw-r--r--sqlite3/test.out1
-rw-r--r--sqlite3/testscript23
9 files changed, 46 insertions, 18 deletions
diff --git a/README-DEV b/README-DEV
index 34435d2..dc70319 100644
--- a/README-DEV
+++ b/README-DEV
@@ -77,6 +77,10 @@ Fedora:
--enable-threads-override-locks
--enable-load-extension
+Note that if zlib.h is present in the system then upstream's configure script
+automatically enables functionality that uses zlib, which is the case for both
+distributions.
+
Translating the configure script options into the macro definitions and adding
the unconditionally defined macros (see upstream's Makefile.am for details) we
end up with:
diff --git a/libsqlite3/libsqlite3/buildfile b/libsqlite3/libsqlite3/buildfile
index c915442..73a3ba2 100644
--- a/libsqlite3/libsqlite3/buildfile
+++ b/libsqlite3/libsqlite3/buildfile
@@ -17,15 +17,14 @@ clang_msvc = ($c.id == 'clang' && $c.target.system == 'win32-msvc')
# 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).
+# that it is possible to override the defaults by specifying them as =0.
#
# PREUPDATE_HOOK is required by SESSION
#
# Note that if disabling any previously-released features, then will need to
# increment abi_major.
#
-cc.poptions =+ \
+c.poptions =+ \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_DBPAGE_VTAB=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
@@ -57,7 +56,7 @@ if! $windows
# Note that the upstream package normally defines a number of other HAVE_*
# macros, which we currently don't care about.
#
- cc.poptions =+ -DHAVE_USLEEP=1
+ c.poptions =+ -DHAVE_USLEEP=1
# SQLITE_THREADSAFE requres -lpthread
# SQLITE_ENABLE_LOAD_EXTENSION requires -ldl
diff --git a/libsqlite3/manifest b/libsqlite3/manifest
index f84318e..4bb435f 100644
--- a/libsqlite3/manifest
+++ b/libsqlite3/manifest
@@ -1,6 +1,6 @@
: 1
name: libsqlite3
-version: 3.27.2
+version: 3.27.2+1
project: sqlite
summary: SQL database engine as an in-process C library
license: public domain
diff --git a/repositories.manifest b/repositories.manifest
index e7867b2..e5e90e6 100644
--- a/repositories.manifest
+++ b/repositories.manifest
@@ -1,2 +1,6 @@
: 1
summary: SQLite build2 package repository
+
+:
+role: prerequisite
+location: ../../zlib/zlib.git##HEAD
diff --git a/sqlite3/.gitignore b/sqlite3/.gitignore
index 7a3c058..9e8f177 100644
--- a/sqlite3/.gitignore
+++ b/sqlite3/.gitignore
@@ -19,3 +19,7 @@
*.pc
sqlite3
+
+# Testscript output directory (can be symlink).
+#
+test-sqlite3
diff --git a/sqlite3/buildfile b/sqlite3/buildfile
index b85acd4..a8e7466 100644
--- a/sqlite3/buildfile
+++ b/sqlite3/buildfile
@@ -3,9 +3,10 @@
./: exe{sqlite3} doc{INSTALL README} man1{sqlite3} manifest
-import libs = libsqlite3%lib{sqlite3}
+import libs = libsqlite3%lib{sqlite3}
+import libs += libz%lib{z}
-exe{sqlite3}: {h c}{*} $libs
+exe{sqlite3}: {h c}{*} $libs testscript
gcc = ($c.class == 'gcc')
@@ -22,7 +23,8 @@ gcc = ($c.class == 'gcc')
# This is the subset of features that we enable by default in libsqlite3 and
# that affect the shell. They can be overridden in the same way.
#
-cc.poptions =+ -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_SESSION=1
+c.poptions =+ -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_SESSION=1 \
+ -DSQLITE_HAVE_ZLIB
# Both Debian and Fedora add this so gotta be important.
#
@@ -39,14 +41,6 @@ if $gcc
if $gcc
c.coptions += -Wno-extra -Wno-error
-# Smoke test.
-#
-exe{sqlite3}: file{test.out}: test.stdout = true
-exe{sqlite3}: test.arguments = ':memory:' \
-'CREATE TABLE test (id INTEGER PRIMARY KEY);
-INSERT INTO test VALUES(123);
-SELECT * FROM test;'
-
# Don't install INSTALL file.
#
doc{INSTALL}@./: install = false
diff --git a/sqlite3/manifest b/sqlite3/manifest
index e2e8e7a..80556fe 100644
--- a/sqlite3/manifest
+++ b/sqlite3/manifest
@@ -1,6 +1,6 @@
: 1
name: sqlite3
-version: 3.27.2
+version: 3.27.2+1
project: sqlite
summary: SQLite database engine shell program
license: public domain
@@ -17,3 +17,4 @@ builds: all
depends: * build2 >= 0.11.0
depends: * bpkg >= 0.11.0
depends: libsqlite3 == $
+depends: libz >= 1.2.1100
diff --git a/sqlite3/test.out b/sqlite3/test.out
deleted file mode 100644
index 190a180..0000000
--- a/sqlite3/test.out
+++ /dev/null
@@ -1 +0,0 @@
-123
diff --git a/sqlite3/testscript b/sqlite3/testscript
new file mode 100644
index 0000000..cfc48c8
--- /dev/null
+++ b/sqlite3/testscript
@@ -0,0 +1,23 @@
+# file : testscript
+# copyright : not copyrighted - public domain
+
+: basics
+:
+{
+ sql = 'CREATE TABLE test (id INTEGER PRIMARY KEY);
+INSERT INTO test VALUES(123);
+SELECT * FROM test;'
+
+ $* ':memory:' "$sql" >'123'
+}
+
+: archive
+:
+{
+ echo 'abc' >=f.txt;
+ $* f.sqlar -Ac f.txt &f.sqlar; # Creates archive adding a file.
+ $* f.sqlar -At >f.txt; # Lists files in archive.
+ rm f.txt;
+ $* f.sqlar -Ax; # Extracts files from archive.
+ cat f.txt >'abc'
+}