aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/sqlite3/Makefile35
-rw-r--r--databases/sqlite3/distinfo5
-rw-r--r--databases/sqlite3/files/patch-test-backup2.test11
3 files changed, 42 insertions, 9 deletions
diff --git a/databases/sqlite3/Makefile b/databases/sqlite3/Makefile
index 7aa1b3e79549..25affcf6b9d8 100644
--- a/databases/sqlite3/Makefile
+++ b/databases/sqlite3/Makefile
@@ -6,11 +6,10 @@
#
PORTNAME= sqlite3
-PORTVERSION= 3.7.3
-PORTREVISION= 1
+PORTVERSION= 3.7.4
CATEGORIES= databases
MASTER_SITES= http://www.sqlite.org/ http://www2.sqlite.org/
-DISTNAME= sqlite-${PORTVERSION}
+DISTNAME= sqlite-src-3070400
MAINTAINER= pavelivolkov@googlemail.com
COMMENT= An SQL database engine in a C library
@@ -22,6 +21,7 @@ LICENSE_TEXT= Description of the license can be obtained from the following URL:
CONFLICTS= sqlite34-[0-9]*
+USE_ZIP= YES
USE_GMAKE= YES
USE_GNOME= pkgconfig gnomehack
USE_LDCONFIG= YES
@@ -38,7 +38,7 @@ RAMTABLE?= yes
# Compilation Options For SQLite http://www.sqlite.org/compile.html
OPTIONS= \
- FTS3 "Enable FTS3 (Full Text Search) module" on \
+ FTS3 "Enable FTS3/4 (Full Text Search) module" on \
ICU "Enable built with \"ICU\"" off \
RTREE "Enable R*Tree module" off \
RAMTABLE "Store temporary tables in RAM = ${RAMTABLE}" off \
@@ -80,6 +80,12 @@ CONFIGURE_ARGS+= --enable-gcov
LDFLAGS+= -fstack-protector
.endif
+# This macro sets the default size of the page-cache for temporary files
+# created by SQLite to store intermediate results, in pages.
+.ifdef TEMP_CACHE_SIZE
+CFLAGS+= -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=${TEMP_CACHE_SIZE}
+.endif
+
.if defined(WITH_MEMMAN)
CFLAGS+= -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
.endif
@@ -161,12 +167,29 @@ MAKE_ENV+= CPPFLAGS="-I. -I./src ${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.include <bsd.port.pre.mk>
.if ${TCL_VER} > 8.4
-BUILD_DEPENDS+= ${LOCALBASE}/lib/tcl8/8.5/msgcat-1.4.3.tm:${PORTSDIR}/lang/tcl-modules
+BUILD_DEPENDS+= ${LOCALBASE}/lib/tcl8/${TCL_VER}:${PORTSDIR}/lang/tcl-modules
.if defined(WITH_TCLWRAPPER)
-RUN_DEPENDS+= ${LOCALBASE}/lib/tcl8/8.5/msgcat-1.4.3.tm:${PORTSDIR}/lang/tcl-modules
+RUN_DEPENDS+= ${LOCALBASE}/lib/tcl8/${TCL_VER}:${PORTSDIR}/lang/tcl-modules
.endif
.endif
+# To test you must specify the value of TESTUSER variable.
+# It must correspond to a normal (not root) user, from which it will be tested.
+# Execute: make TESTUSER=ordinary_user_login_name test
+.ifmake test
+.ifndef TESTUSER
+IGNORE= set the value of the variable TESTUSER corresponding normal (not root) user, from which will be tested
+.endif
+.endif
+
+test: build
+ @(cd ${WRKSRC} && ${CHOWN} ${TESTUSER} ${WRKSRC} && su ${TESTUSER} -c "${MAKE} test"; ${CHOWN} ${USER} ${WRKSRC})
+
+post-build:
+ @${ECHO_CMD}
+ @${ECHO_CMD} "You can test sqlite using supplied with the him tests."
+ @${ECHO_CMD} "Execute: make TESTUSER=ordinary_user_login_name test"
+
post-install:
.if defined(WITH_TCLWRAPPER)
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin
diff --git a/databases/sqlite3/distinfo b/databases/sqlite3/distinfo
index 5df29038a678..b47a1154e275 100644
--- a/databases/sqlite3/distinfo
+++ b/databases/sqlite3/distinfo
@@ -1,3 +1,2 @@
-MD5 (sqlite-3.7.3.tar.gz) = 5437978aae90350cf984993091e0d695
-SHA256 (sqlite-3.7.3.tar.gz) = dbf352e8fbb74829f5e7a88f9f6ceeb80a709537f668c36e4b6cdfb271309ef6
-SIZE (sqlite-3.7.3.tar.gz) = 3410714
+SHA256 (sqlite-src-3070400.zip) = e7540069fad017a9dec374241b346570ce6c360e2960749ddcacac81f965c9b4
+SIZE (sqlite-src-3070400.zip) = 3997962
diff --git a/databases/sqlite3/files/patch-test-backup2.test b/databases/sqlite3/files/patch-test-backup2.test
new file mode 100644
index 000000000000..1cd460339071
--- /dev/null
+++ b/databases/sqlite3/files/patch-test-backup2.test
@@ -0,0 +1,11 @@
+--- test/backup2.test.orig 2010-12-09 13:44:49.000000000 +0300
++++ test/backup2.test 2010-12-09 13:45:39.000000000 +0300
+@@ -155,7 +155,7 @@
+ file mkdir bu3.db
+ set rc [catch {db restore temp bu3.db} res]
+ lappend rc $res
+- } {1 {cannot open source database: disk I/O error}}
++ } {1 {restore failed: file is encrypted or is not a database}}
+ }
+
+ # Try to restore from something that is not a database file.