aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authortobez <tobez@FreeBSD.org>2006-03-22 22:54:15 +0800
committertobez <tobez@FreeBSD.org>2006-03-22 22:54:15 +0800
commit2c51714255053adca3da6aca070df52242589dec (patch)
tree80c526bc15f874737a79ab5be5ec02a62a590f60 /databases
parentd5db5fe82e1aa6bfe844afe2d88c8eb201430eeb (diff)
downloadfreebsd-ports-gnome-2c51714255053adca3da6aca070df52242589dec.tar.gz
freebsd-ports-gnome-2c51714255053adca3da6aca070df52242589dec.tar.zst
freebsd-ports-gnome-2c51714255053adca3da6aca070df52242589dec.zip
Switch to always using sqlite library from databases/sqlite3 port as
opposed to using the version of the library bundled with this port. Rationale: the recent versions of databases/sqlite3 introduced incompatible changes to the DB file format, and we'd like to keep interoperability between this port and databases/sqlite3. Reported by: edwin PR: 94668
Diffstat (limited to 'databases')
-rw-r--r--databases/p5-DBD-SQLite/Makefile19
-rw-r--r--databases/p5-DBD-SQLite/files/patch-dbdimp.c22
2 files changed, 35 insertions, 6 deletions
diff --git a/databases/p5-DBD-SQLite/Makefile b/databases/p5-DBD-SQLite/Makefile
index 7d86bddb778e..463b8c220cdc 100644
--- a/databases/p5-DBD-SQLite/Makefile
+++ b/databases/p5-DBD-SQLite/Makefile
@@ -7,7 +7,7 @@
PORTNAME= DBD-SQLite
PORTVERSION= 1.11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
@@ -16,8 +16,16 @@ PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Provides access to SQLite3 databases through the DBI
+# We use sqlite3's own library & headers since it is more recent
+# than the bundled version and has an incompatible DB file format.
+# In this way we can be sure DBD::SQLite can interoperate with
+# databases/sqlite3.
+BUILD_DEPENDS= sqlite>=3.3.3:${PORTSDIR}/databases/sqlite3
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
PERL_CONFIGURE= yes
-CONFIGURE_ARGS+= USE_LOCAL_SQLITE=yes
+CONFIGURE_ARGS+= USE_LOCAL_SQLITE=0
+CONFIGURE_ARGS+= SQLITE_LOCATION=${LOCALBASE}
MAN3= DBD::SQLite.3
@@ -31,10 +39,9 @@ BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
.endif
-post-extract:
- @${RM} -f ${WRKSRC}/getsqlite.pl
-
post-patch:
- @${PERL} -i.bak -pe 's/\$$Config{d_usleep}/1/' ${WRKSRC}/Makefile.PL
+ ${RM} -f ${WRKSRC}/getsqlite.pl
+ ${PERL} -pi -e 's/\$$Config{d_usleep}/1/' ${WRKSRC}/Makefile.PL
+ ${PERL} -pi -e '$$_="" if m|getsqlite.pl|' ${WRKSRC}/MANIFEST
.include <bsd.port.post.mk>
diff --git a/databases/p5-DBD-SQLite/files/patch-dbdimp.c b/databases/p5-DBD-SQLite/files/patch-dbdimp.c
new file mode 100644
index 000000000000..c9b329bdb988
--- /dev/null
+++ b/databases/p5-DBD-SQLite/files/patch-dbdimp.c
@@ -0,0 +1,22 @@
+$FreeBSD$
+
+--- dbdimp.c.orig Wed Mar 22 15:21:16 2006
++++ dbdimp.c Wed Mar 22 15:21:38 2006
+@@ -260,7 +260,7 @@ sqlite_st_prepare (SV *sth, imp_sth_t *i
+ imp_sth->retval = SQLITE_OK;
+ imp_sth->params = newAV();
+
+- if ((retval = sqlite3_prepare(imp_dbh->db, statement, 0, &(imp_sth->stmt), &extra))
++ if ((retval = sqlite3_prepare(imp_dbh->db, statement, -1, &(imp_sth->stmt), &extra))
+ != SQLITE_OK)
+ {
+ if (imp_sth->stmt) {
+@@ -320,7 +320,7 @@ sqlite_st_execute (SV *sth, imp_sth_t *i
+ psv = hv_fetch((HV*)SvRV(sth), "Statement", 9, 0);
+ statement = (psv && SvOK(*psv)) ? SvPV_nolen(*psv) : "";
+ sqlite_trace(3, "re-prepare statement %s", statement);
+- if ((retval = sqlite3_prepare(imp_dbh->db, statement, 0, &(imp_sth->stmt), &extra))
++ if ((retval = sqlite3_prepare(imp_dbh->db, statement, -1, &(imp_sth->stmt), &extra))
+ != SQLITE_OK)
+ {
+ if (imp_sth->stmt) {