ODBC driver for SQLite3. Also a patch to iodbc to add the sqlite odbc driver to the .ini files, and a wantlib tweak.
Tested on amd64 and i386.
$ echo "select fullpkgpath from ports where maintainer like '%Stu%'" |
iodbctest Driver=SQLite3\;Database=/usr/local/share/sqlports
Stu
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/iodbc/Makefile,v
retrieving revision 1.42
diff -u -p -u -p -r1.42 Makefile
--- Makefile 15 Nov 2017 15:45:12 -0000 1.42
+++ Makefile 7 Jun 2018 23:27:35 -0000
@@ -9,6 +9,8 @@ PKGNAME= iodbc-$V
PKGNAME-main= iodbc-$V
PKGNAME-admin= iodbc-admin-$V
+REVISION-main = 0
+
CATEGORIES= databases
SHARED_LIBS += iodbcinst 3.15
@@ -28,7 +30,7 @@ WANTLIB-main += c
WANTLIB-admin += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB-admin += Xrandr Xrender atk-1.0 c cairo expat ffi fontconfig
-WANTLIB-admin += freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0
+WANTLIB-admin += freetype fribidi gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0
WANTLIB-admin += gmodule-2.0 gobject-2.0 graphite2 gthread-2.0 gtk-x11-2.0
WANTLIB-admin += harfbuzz iconv intl iodbc iodbcinst m pango-1.0 pangocairo-1.0
WANTLIB-admin += pangoft2-1.0 pcre pixman-1 png pthread xcb xcb-render
Index: patches/patch-etc_odbc_ini_sample
===================================================================
RCS file: /cvs/ports/databases/iodbc/patches/patch-etc_odbc_ini_sample,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-etc_odbc_ini_sample
--- patches/patch-etc_odbc_ini_sample 16 Jun 2011 01:29:57 -0000 1.1
+++ patches/patch-etc_odbc_ini_sample 7 Jun 2018 23:27:35 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-etc_odbc_ini_sample,v 1.1 2011/06/16 01:29:57 sthen Exp $
---- etc/odbc.ini.sample.orig Mon Jan 18 23:37:33 1999
-+++ etc/odbc.ini.sample Thu Jun 16 02:23:15 2011
-@@ -1,22 +1,20 @@
+Index: etc/odbc.ini.sample
+--- etc/odbc.ini.sample.orig
++++ etc/odbc.ini.sample
+@@ -1,22 +1,26 @@
;
; odbc.ini
;
@@ -13,6 +14,7 @@ $OpenBSD: patch-etc_odbc_ini_sample,v 1.
[ODBC Data Sources]
-OpenLink = OpenLink (MT)
+ExampleTDS = example MS server
++ExampleSQLite3 = example SQLite3 db
-[OpenLink]
-Driver = /home/openlink/lib/oplodbc.so.1
@@ -34,6 +36,11 @@ $OpenBSD: patch-etc_odbc_ini_sample,v 1.
+TDS_Version = 7.0
+language = us_english
++[ExampleSQLite3]
++Description = test ODBC for SQLite3
++Driver = SQLite3
++Database = :memory:
++
[Default]
-Driver = /home/openlink/lib/oplodbc.so.1
+Driver = FreeTDS
Index: patches/patch-etc_odbcinst_ini_sample
===================================================================
RCS file: /cvs/ports/databases/iodbc/patches/patch-etc_odbcinst_ini_sample,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-etc_odbcinst_ini_sample
--- patches/patch-etc_odbcinst_ini_sample 16 Jun 2011 01:29:57 -0000
1.1
+++ patches/patch-etc_odbcinst_ini_sample 7 Jun 2018 23:27:35 -0000
@@ -1,11 +1,13 @@
$OpenBSD: patch-etc_odbcinst_ini_sample,v 1.1 2011/06/16 01:29:57 sthen Exp $
---- etc/odbcinst.ini.sample.orig Thu Jun 16 01:16:51 2011
-+++ etc/odbcinst.ini.sample Thu Jun 16 01:29:28 2011
-@@ -1,6 +1,11 @@
+Index: etc/odbcinst.ini.sample
+--- etc/odbcinst.ini.sample.orig
++++ etc/odbcinst.ini.sample
+@@ -1,6 +1,16 @@
[ODBC Drivers]
-OpenLink (MT) = Installed
+PostgreSQL = Installed
+FreeTDS = Installed
++SQLite3 = Installed
-[OpenLink (MT)]
-Driver = /home/openlink/lib/oplodbc.so.1
@@ -17,3 +19,7 @@ $OpenBSD: patch-etc_odbcinst_ini_sample,
+[FreeTDS]
+Description = FreeTDS ODBC driver for MSSQL
+Driver = ${LOCALBASE}/lib/libtdsodbc.so
++
++[SQLite3]
++Description = ODBC driver for SQLite3
++Driver = ${LOCALBASE}/lib/libsqlite3odbc.so
sqlite3-odbc-0.9996-port.tar.gz
Description: application/gzip
