diff --git a/databases/p5-DBD-SQLite/Makefile b/databases/p5-DBD-SQLite/Makefile index 1c8aa774c8a..36482607ad3 100644 --- a/databases/p5-DBD-SQLite/Makefile +++ b/databases/p5-DBD-SQLite/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2008/10/02 20:34:39 simon Exp $ +# $OpenBSD: Makefile,v 1.17 2009/01/24 17:42:22 simon Exp $ SHARED_ONLY= Yes @@ -6,7 +6,7 @@ COMMENT= SQLite drivers for the Perl DBI MODULES= cpan DISTNAME= DBD-SQLite-1.14 -PKGNAME= p5-${DISTNAME}p0v0 +PKGNAME= p5-${DISTNAME}p1v0 CATEGORIES= databases MAINTAINER= Robert Nagy @@ -19,10 +19,15 @@ PERMIT_DISTFILES_FTP= Yes BUILD_DEPENDS= :p5-DBI->=1.08:databases/p5-DBI RUN_DEPENDS= :p5-DBI->=1.08:databases/p5-DBI -LIB_DEPENDS= sqlite3::databases/sqlite3 +LIB_DEPENDS= sqlite3:sqlite3->=3.6.4:databases/sqlite3 CONFIGURE_ARGS= SQLITE_LOCATION=${LOCALBASE} MAKE_FLAGS= CC='${CC}' \ LD='${CC}' +# as DBD::SQLite bundles sqlite3, our patches can't use functions from newer +# versions installed via ports +post-extract: + rm -f ${WRKSRC}/sqlite3.h ${WRKSRC}/sqlite3ext.h + .include diff --git a/databases/p5-DBD-SQLite/patches/patch-dbdimp_c b/databases/p5-DBD-SQLite/patches/patch-dbdimp_c new file mode 100644 index 00000000000..4261991d787 --- /dev/null +++ b/databases/p5-DBD-SQLite/patches/patch-dbdimp_c @@ -0,0 +1,22 @@ +This patch makes sure that prepared statements get closed when +$dbh->disconnect() is called. Ticket created upstream at +http://rt.cpan.org/Public/Bug/Display.html?id=40383 + +$OpenBSD: patch-dbdimp_c,v 1.5 2009/01/24 17:42:22 simon Exp $ +--- dbdimp.c.orig Fri Aug 24 04:51:25 2007 ++++ dbdimp.c Sat Oct 25 22:31:04 2008 +@@ -151,8 +151,13 @@ sqlite_db_disconnect (SV *dbh, imp_dbh_t *imp_dbh) + } + + if (sqlite3_close(imp_dbh->db) == SQLITE_BUSY) { ++ sqlite3_stmt *pStmt; + /* active statements! */ +- warn("closing dbh with active statement handles"); ++ ++ while ((pStmt = sqlite3_next_stmt(imp_dbh->db, NULL)) != NULL) ++ sqlite3_finalize(pStmt); ++ ++ sqlite3_close(imp_dbh->db); + } + imp_dbh->db = NULL; +