aboutsummaryrefslogtreecommitdiff
path: root/databases/sqlite3
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2010-09-01 17:49:49 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2010-09-01 17:49:49 +0000
commit6199fb6f89ac558274853ce9863b8b2c385b8b2a (patch)
tree0694492e77fe53afae45a000ea3f2b4b9d933bda /databases/sqlite3
parent79daf3959f37c17c8f1e1f1cc1bb7c453c0ed0e3 (diff)
downloadports-6199fb6f89ac558274853ce9863b8b2c385b8b2a.tar.gz
ports-6199fb6f89ac558274853ce9863b8b2c385b8b2a.zip
Notes
Diffstat (limited to 'databases/sqlite3')
-rw-r--r--databases/sqlite3/Makefile114
-rw-r--r--databases/sqlite3/distinfo6
-rw-r--r--databases/sqlite3/files/patch-src-os_unix.c11
-rw-r--r--databases/sqlite3/pkg-plist14
4 files changed, 112 insertions, 33 deletions
diff --git a/databases/sqlite3/Makefile b/databases/sqlite3/Makefile
index 77815bb674b3..9d58b34e5b09 100644
--- a/databases/sqlite3/Makefile
+++ b/databases/sqlite3/Makefile
@@ -6,15 +6,19 @@
#
PORTNAME= sqlite3
-PORTVERSION= 3.6.23.1
-PORTREVISION= 3
+PORTVERSION= 3.7.2
CATEGORIES= databases
-MASTER_SITES= http://www.sqlite.org/
+MASTER_SITES= http://www.sqlite.org/ http://www2.sqlite.org/
DISTNAME= sqlite-${PORTVERSION}
MAINTAINER= pol@opk.ru
COMMENT= An SQL database engine in a C library
+LICENSE= unknown
+LICENSE_NAME= Public Domain
+LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT}
+LICENSE_TEXT= Description of the license can be obtained from the following URL: http://www.sqlite.org/copyright.html
+
CONFLICTS= sqlite34-[0-9]*
USE_GMAKE= YES
@@ -26,16 +30,33 @@ CONFIGURE_ENV+= TCLSH_CMD="${TCLSH}" \
TCLLIBDIR="${PREFIX}/lib/${PORTNAME}" \
ac_cv_search_pthread_create=""
-OPTIONS= DEBUG "Enable debugging & verbose explain" off \
- FTS3 "Enable FTS3 (Full Text Search) module" off \
+# Compilation Options For SQLite http://www.sqlite.org/compile.html
+OPTIONS= \
+ FTS3 "Enable FTS3 (Full Text Search) module" on \
+ ICU "Enable built with \"ICU\"" off \
RTREE "Enable R*Tree module" off \
RAMTABLE "Store temporary tables in RAM" off \
- TCLWRAPPER "Enable TCL wrapper" off \
+ UPD_DEL_LIMIT "ORDER BY and LIMIT on UPDATE and DELETE" off \
+ SOUNDEX "Enables the soundex() SQL function" off \
METADATA "Enable column metadata" on \
+ STAT2 "Help SQLite to chose a better query plan" off \
+ MEMMAN "Allows it to release unused memory" off \
+ SECURE_DELETE "Overwrite deleted information with zeros" on \
+ UNLOCK_NOTIFY "Enable notification on unlocking" on \
THREADSAFE "Build thread-safe library" on \
- EXTENSION "Allow loadable extensions" on
+ OVERRIDE_LOCK "Threads can override each others locks" on \
+ XTHREAD "Allow connection sharing across threads" off \
+ EXTENSION "Allow loadable extensions" on \
+ TCLWRAPPER "Enable TCL wrapper" off \
+ DEBUG "Enable debugging & verbose explain" off \
+ GCOV "Enable coverage testing using gcov" off \
+
+.include <bsd.port.options.mk>
-.include <bsd.port.pre.mk>
+PLIST_FILES= bin/sqlite3 include/sqlite3.h include/sqlite3ext.h \
+ lib/libsqlite3.a lib/libsqlite3.la lib/libsqlite3.so \
+ lib/libsqlite3.so.8 libdata/pkgconfig/sqlite3.pc
+PORTDOCS= *
.if !defined(NO_INSTALL_MANPAGES)
MAN1= sqlite3.1
@@ -47,32 +68,71 @@ EXTRA_PATCHES+= ${FILESDIR}/pthread_equal_stub
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
+CFLAGS+= -Wall
+.endif
+
+.if defined(WITH_GCOV)
+CONFIGURE_ARGS+= --enable-gcov
+LDFLAGS+= -fstack-protector
+.endif
+
+.if defined(WITH_MEMMAN)
+CFLAGS+= -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
+.endif
+
+.if defined(WITH_UPD_DEL_LIMIT)
+CFLAGS+= -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
+.endif
+
+.if defined(WITH_SOUNDEX)
+CFLAGS+= -DSQLITE_SOUNDEX=1
+.endif
+
+.if defined(WITH_STAT2)
+CFLAGS+= -DSQLITE_ENABLE_STAT2=1
.endif
.if defined(WITH_FTS3)
-CFLAGS+= -DSQLITE_ENABLE_FTS3=1
+CFLAGS+= -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1
.endif
.if defined(WITH_RTREE)
CFLAGS+= -DSQLITE_ENABLE_RTREE=1
.endif
+.if defined(WITH_ICU)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/icu-config:${PORTSDIR}/devel/icu
+LIB_DEPENDS+= icudata.38:${PORTSDIR}/devel/icu
+CFLAGS+= -DSQLITE_ENABLE_ICU=1
+CPPFLAGS+= `${LOCALBASE}/bin/icu-config --cppflags`
+LDFLAGS+= `${LOCALBASE}/bin/icu-config --ldflags`
+.endif
+
.if defined(WITH_RAMTABLE)
CONFIGURE_ARGS+= --enable-tempstore=yes
.endif
+.if defined(WITH_SECURE_DELETE)
+CFLAGS+= -DSQLITE_SECURE_DELETE=1
+.endif
+
+.if defined(WITH_UNLOCK_NOTIFY)
+CFLAGS+= -DSQLITE_ENABLE_UNLOCK_NOTIFY=1
+.endif
+
.if defined(WITH_TCLWRAPPER)
CATEGORIES+= lang tcl
COMMENT+= with TCL Wrapper
-USE_TCL_BUILD= 84+
USE_TCL_RUN= 84+
-CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR}
-PLIST_SUB+= WITH_TCLWRAPPER=""
ALL_TARGET= all tclsqlite3
INSTALL_TARGET= install tcl_install
+CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR}
+PORTEXAMPLES+= example.tcl
+PLIST_DIRS+= lib/sqlite3
+PLIST_FILES+= bin/tclsqlite3 lib/sqlite3/libtclsqlite3.so \
+ lib/sqlite3/pkgIndex.tcl
.else
CONFIGURE_ARGS+= --disable-tcl
-PLIST_SUB+= WITH_TCLWRAPPER="@comment "
.endif
.if !defined(WITHOUT_METADATA)
@@ -80,8 +140,13 @@ CFLAGS+= -DSQLITE_ENABLE_COLUMN_METADATA=1
.endif
.if !defined(WITHOUT_THREADSAFE)
-CONFIGURE_ARGS+= --enable-threadsafe \
- --enable-threads-override-locks
+CONFIGURE_ARGS+= --enable-threadsafe
+.if !defined(WITHOUT_XTHREAD)
+CONFIGURE_ARGS+= --enable-threads-override-locks
+.endif
+.if !defined(WITHOUT_OVERRIDE_LOCK)
+CONFIGURE_ARGS+= --enable-cross-thread-connections
+.endif
.else
CONFIGURE_ARGS+= --disable-threadsafe
.endif
@@ -92,6 +157,9 @@ CONFIGURE_ARGS+= --enable-load-extension
CONFIGURE_ARGS+= --disable-load-extension
.endif
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+MAKE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+
post-install:
.if defined(WITH_TCLWRAPPER)
@${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin
@@ -101,5 +169,19 @@ post-install:
.if !defined(NO_INSTALL_MANPAGES)
@${INSTALL_MAN} ${WRKSRC}/sqlite3.1 ${MANPREFIX}/man/man1
.endif
+.ifndef NOPORTDOCS
+.ifdef WITH_FTS3
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/ext/fts3/README.syntax ${WRKSRC}/ext/fts3/README.tokenizers ${DOCSDIR}
+.endif
+.ifdef WITH_RTREE
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/ext/rtree/README ${DOCSDIR}
+.endif
+.ifdef WITH_ICU
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/ext/icu/README.txt ${DOCSDIR}
+.endif
+.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/databases/sqlite3/distinfo b/databases/sqlite3/distinfo
index af281aa5262c..f03b6cbc1afa 100644
--- a/databases/sqlite3/distinfo
+++ b/databases/sqlite3/distinfo
@@ -1,3 +1,3 @@
-MD5 (sqlite-3.6.23.1.tar.gz) = d99f1b31da0eb33271464bee15cec701
-SHA256 (sqlite-3.6.23.1.tar.gz) = 1a0517438a573a68ab73e8ed75d194086d55d75883542ab1d5ae1080bbddd492
-SIZE (sqlite-3.6.23.1.tar.gz) = 3086807
+MD5 (sqlite-3.7.2.tar.gz) = 5f1853c4c1eba3330b6104f274918673
+SHA256 (sqlite-3.7.2.tar.gz) = bb53cad58f1c502662644d88e24a552dc8de982d650f80d8debaf13b15bb3b8a
+SIZE (sqlite-3.7.2.tar.gz) = 3309139
diff --git a/databases/sqlite3/files/patch-src-os_unix.c b/databases/sqlite3/files/patch-src-os_unix.c
new file mode 100644
index 000000000000..2247e61c392d
--- /dev/null
+++ b/databases/sqlite3/files/patch-src-os_unix.c
@@ -0,0 +1,11 @@
+--- src/os_unix.c.orig 2010-08-31 10:44:29.000000000 +0400
++++ src/os_unix.c 2010-08-31 10:44:48.000000000 +0400
+@@ -4841,7 +4841,7 @@
+ char *zErr;
+ UNUSED_PARAMETER(NotUsed);
+ unixEnterMutex();
+- zErr = dlerror();
++ zErr = (char *)dlerror();
+ if( zErr ){
+ sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
+ }
diff --git a/databases/sqlite3/pkg-plist b/databases/sqlite3/pkg-plist
deleted file mode 100644
index 66b4440492f4..000000000000
--- a/databases/sqlite3/pkg-plist
+++ /dev/null
@@ -1,14 +0,0 @@
-bin/sqlite3
-%%WITH_TCLWRAPPER%%bin/tclsqlite3
-include/sqlite3.h
-include/sqlite3ext.h
-lib/libsqlite3.a
-lib/libsqlite3.la
-lib/libsqlite3.so
-lib/libsqlite3.so.8
-libdata/pkgconfig/sqlite3.pc
-%%WITH_TCLWRAPPER%%lib/sqlite3/libtclsqlite3.so
-%%WITH_TCLWRAPPER%%lib/sqlite3/pkgIndex.tcl
-%%WITH_TCLWRAPPER%%@dirrm lib/sqlite3
-%%WITH_TCLWRAPPER%%%%EXAMPLESDIR%%/example.tcl
-%%WITH_TCLWRAPPER%%@dirrm %%EXAMPLESDIR%%