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. stu, an opinion about keeping it separate or not ? Landry
? Makefile.oot ? patch-tea_configure ? 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 9 Nov 2019 14:50:22 -0000 @@ -2,11 +2,12 @@ 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 +DISTNAME = sqlite-src-${VER:C/.$/0\0/}00 PKGNAME = sqlite3-tcl-${V} +EXTRACT_SUFX = .zip CATEGORIES = databases HOMEPAGE = http://www.sqlite.org/ MAINTAINER = Stuart Cassoff <s...@users.sourceforge.net> @@ -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 @@ -28,8 +30,7 @@ CONFIGURE_ARGS = --with-tcl=${MODTCL_LIBDIR} \ --libdir=${MODTCL_TCLDIR} - -NO_TEST = Yes +CONFIGURE_ENV = CPPFLAGS=-I${LOCALBASE}/include CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA=1 \ -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ @@ -45,7 +46,20 @@ -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 \ -DSQLITE_SOUNDEX=1 -WRKSRC = ${WRKDIST}/tea SUBST_VARS = VER + +WRKSRC = ${WRKDIST}/autoconf/tea + +do-gen: + # taken from tool/mkautoconfamal.sh + sed -ie "s/AC_INIT(\[sqlite\], .*)/AC_INIT([sqlite], [$V])/" ${WRKSRC}/configure.ac + cd ${WRKSRC} && autoconf-2.69 + mkdir ${WRKSRC}/generic && \ + echo '#include <sqlite3.h>' > ${WRKSRC}/generic/tclsqlite3.c && \ + sed -e 's/"sqlite3.h"/<sqlite3.h>/' ${WRKSRC}/../../src/tclsqlite.c >> ${WRKSRC}/generic/tclsqlite3.c + +do-test: + cd ${WRKDIST} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && ${MAKE} 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 9 Nov 2019 14:50:22 -0000 @@ -1,2 +1,2 @@ -SHA256 (sqlite-autoconf-3240000.tar.gz) = 2dFOiMb7bWjenKDR+Xl0d9gvw67WE1WPh/+9u8XOt0o= -SIZE (sqlite-autoconf-3240000.tar.gz) = 2699252 +SHA256 (sqlite-src-3300100.zip) = RpA3BzcYkUnJ6DREFKo3H4mnDjdEujF87xpJ+w7oHOE= +SIZE (sqlite-src-3300100.zip) = 12648162 Index: patches/patch-autoconf_tea_tclconfig_tcl_m4 =================================================================== RCS file: patches/patch-autoconf_tea_tclconfig_tcl_m4 diff -N patches/patch-autoconf_tea_tclconfig_tcl_m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-autoconf_tea_tclconfig_tcl_m4 9 Nov 2019 14:50:22 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: autoconf/tea/tclconfig/tcl.m4 +--- autoconf/tea/tclconfig/tcl.m4.orig ++++ autoconf/tea/tclconfig/tcl.m4 +@@ -1598,7 +1598,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [ + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} +- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' ++ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + LDFLAGS="-Wl,-export-dynamic" + ;; + esac Index: patches/patch-src_shell_c_in =================================================================== RCS file: patches/patch-src_shell_c_in diff -N patches/patch-src_shell_c_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_shell_c_in 9 Nov 2019 14:50:22 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: src/shell.c.in +--- src/shell.c.in.orig ++++ src/shell.c.in +@@ -98,7 +98,7 @@ typedef unsigned char u8; + #endif + + #if HAVE_EDITLINE +-# include <editline/readline.h> ++# include <readline/readline.h> + #endif + + #if HAVE_EDITLINE || HAVE_READLINE Index: patches/patch-tea_configure =================================================================== RCS file: patches/patch-tea_configure diff -N patches/patch-tea_configure --- patches/patch-tea_configure 22 Nov 2017 20:54:18 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$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 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} -- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' -+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' - LDFLAGS="-Wl,-export-dynamic" - ;; - esac