diff options
Diffstat (limited to 'sqlite3')
-rw-r--r-- | sqlite3/.gitignore | 9 | ||||
-rw-r--r-- | sqlite3/buildfile | 25 | ||||
-rw-r--r-- | sqlite3/manifest | 10 | ||||
-rw-r--r-- | sqlite3/test.out | 1 | ||||
-rw-r--r-- | sqlite3/testscript | 23 |
5 files changed, 52 insertions, 16 deletions
diff --git a/sqlite3/.gitignore b/sqlite3/.gitignore index 7a3c058..144ade9 100644 --- a/sqlite3/.gitignore +++ b/sqlite3/.gitignore @@ -3,9 +3,14 @@ *.d *.t *.i +*.i.* *.ii +*.ii.* *.o *.obj +*.gcm +*.pcm +*.ifc *.so *.dll *.a @@ -19,3 +24,7 @@ *.pc sqlite3 + +# Testscript output directory (can be symlink). +# +test-sqlite3 diff --git a/sqlite3/buildfile b/sqlite3/buildfile index b85acd4..e408acb 100644 --- a/sqlite3/buildfile +++ b/sqlite3/buildfile @@ -3,9 +3,19 @@ ./: 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 + +# @@ TMP Workaround GCC bug 84583: +# +# shell.exe.o.i:165900:40: error: unterminated string literal +# +# Note: on upgrade check if it is still required. +# +if ($c.id == 'gcc' && $c.target.system == 'mingw32') + obj{shell}: cc.reprocess = true gcc = ($c.class == 'gcc') @@ -22,7 +32,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 +50,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 67a2e28..423e071 100644 --- a/sqlite3/manifest +++ b/sqlite3/manifest @@ -1,9 +1,9 @@ : 1 name: sqlite3 -version: 3.27.2-a.0.z +version: 3.39.4+1 project: sqlite summary: SQLite database engine shell program -license: public domain +license: blessing ; SQLite Blessing. topics: SQLite, SQL, relational database description-file: README url: https://sqlite.org/ @@ -14,6 +14,8 @@ email: sqlite-users@mailinglists.sqlite.org ; Mailing list. package-email: packaging@build2.org ; Mailing list. build-error-email: builds@build2.org builds: all -depends: * build2 >= 0.11.0 -depends: * bpkg >= 0.11.0 +builds: -wasm +depends: * build2 >= 0.15.0 +depends: * bpkg >= 0.15.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' +} |