On Sun, Nov 10, 2019 at 10:13:38AM +0100, Landry Breuil wrote:
> On Sat, Nov 09, 2019 at 03:55:18PM +0100, Landry Breuil wrote:
> > Hi,
> >
> > sqlite3-tcl is a bit outdated compared to 'main' sqlite3, so im
> > pondering moving back to the previous situation of having them as a
> > single port with multipackages (which was the case before sqlite3 got
> > imported into base) - and while here i hacked my way around to be able
> > to run the tcl test suite. Right now its still running (and seems hung)
> > but that allows to run those natively for each updates.
> >
> > - we need to switch to the -src tarball which is the only one containing
> > tests
> > - that requires horrible hacks to generate configure in the autoconf/tea
> > subdir, + generate tclsqlite3.c wrapper.
> > - that means rerunning configure/building in do-test as the WRKDIST dir
> > changes
> >
> > so its a gross hack, more an interesting exercise in ports wrestling,
> > but finally having sqlite tests. even if it doesnt build with the same
> > options as the main sqlite3 port.. some of the SQLITE_ENABLE_XX choices
> > look rather arbitrary.
>
> And the resulting libsqlite3 tcl library is actually completely broken,
> so yeah its a gross hack. But that said, i managed to run the complete
> tcl testsuite, which resulted after smth like 7h in not so bad results:
>
> SQLite 2019-10-10 20:19:45
> 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt1
>
> 13 errors out of 3444413 tests on c64.proxmox2 OpenBSD 64-bit little-endian
>
> !Failures on these tests: backup2-10 loadext-2.1 loadext-2.2 loadext-2.3
> loadext-3.2 sort3-3 memsubsys1.backup2-10 memsubsys2.backup2-10
> no_mutex_try.backup2-10 journaltest.backup2-10 inmemory_journal.backup2-10
> prepare.backup2-10 mm-backup2-10
>
> (and i think the failures are not actual failures)
>
> so still, this *might* be interesting to be able to run those tests somehow,
> so
> that one updating sqlite3 can be a bit more comfortable with testing.
And now a much better version that produces a working tcl sqlite library
(tested by running tdbc-sqlite3 tests) *and* running tests. Went the
simpler route by adding the complete -src tarball as an additional
distfile, and building/running tests from its source dir. A bit gross,
but works.
Now, opinions ? Yays/Nays ? General apathy on the subject ?
Landry
? Makefile.oot
? sqlite3-tcl-3.30.1-with-tests.diff
? pkg/PLIST.new
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/sqlite3-tcl/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile 12 Jul 2019 20:44:02 -0000 1.10
+++ Makefile 10 Nov 2019 09:34:10 -0000
@@ -2,10 +2,11 @@
COMMENT = Tcl bindings for SQLite3
-V = 3.24.0
+V = 3.30.1
VER = ${V:S/.//g}
DISTNAME = sqlite-autoconf-${VER:C/.$/0\0/}00
+DISTFILES = ${DISTNAME}${EXTRACT_SUFX}
sqlite-src-${VER:C/.$/0\0/}00.zip
PKGNAME = sqlite3-tcl-${V}
CATEGORIES = databases
HOMEPAGE = http://www.sqlite.org/
@@ -16,11 +17,12 @@
WANTLIB = pthread
-MASTER_SITES = ${HOMEPAGE}2018/
+MASTER_SITES = ${HOMEPAGE}2019/
MODULES = lang/tcl
BUILD_DEPENDS = ${MODTCL_BUILD_DEPENDS}
RUN_DEPENDS = ${MODTCL_RUN_DEPENDS}
+MODTCL_VERSION = 8.6
FAKE_FLAGS = PKG_DIR=sqlite3
SEPARATE_BUILD = Yes
@@ -29,8 +31,6 @@
CONFIGURE_ARGS = --with-tcl=${MODTCL_LIBDIR} \
--libdir=${MODTCL_TCLDIR}
-NO_TEST = Yes
-
CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS=1 \
@@ -47,5 +47,12 @@
WRKSRC = ${WRKDIST}/tea
SUBST_VARS = VER
+
+do-test:
+ sed -i -e 's#editline/readline.h#readline/readline.h#'
${WRKDIR}/sqlite-src-${VER:C/.$/0\0/}00/src/shell.c.in
+ cd ${WRKDIR}/sqlite-src-${VER:C/.$/0\0/}00 && \
+ ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} fulltest
+
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/sqlite3-tcl/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo 25 Jun 2018 17:47:01 -0000 1.7
+++ distinfo 10 Nov 2019 09:34:10 -0000
@@ -1,2 +1,4 @@
-SHA256 (sqlite-autoconf-3240000.tar.gz) =
2dFOiMb7bWjenKDR+Xl0d9gvw67WE1WPh/+9u8XOt0o=
-SIZE (sqlite-autoconf-3240000.tar.gz) = 2699252
+SHA256 (sqlite-autoconf-3300100.tar.gz) =
jFpQ2wib0qGwjbxbANICdgLKf/I4unZY+rykVNQpjmA=
+SHA256 (sqlite-src-3300100.zip) = RpA3BzcYkUnJ6DREFKo3H4mnDjdEujF87xpJ+w7oHOE=
+SIZE (sqlite-autoconf-3300100.tar.gz) = 2848951
+SIZE (sqlite-src-3300100.zip) = 12648162
Index: patches/patch-tea_configure
===================================================================
RCS file: /cvs/ports/databases/sqlite3-tcl/patches/patch-tea_configure,v
retrieving revision 1.3
diff -u -r1.3 patch-tea_configure
--- patches/patch-tea_configure 22 Nov 2017 20:54:18 -0000 1.3
+++ patches/patch-tea_configure 10 Nov 2019 09:34:10 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-tea_configure,v 1.3 2017/11/22 20:54:18 stu Exp $
---- tea/configure.orig Wed Apr 26 16:58:46 2017
-+++ tea/configure Wed Apr 26 16:59:16 2017
-@@ -7237,7 +7237,7 @@ fi
+Index: tea/configure
+--- tea/configure.orig
++++ tea/configure
+@@ -7249,7 +7249,7 @@ fi
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}