aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2004-09-01 03:06:39 +0800
committergreen <green@FreeBSD.org>2004-09-01 03:06:39 +0800
commitba8f1d57a64885c9686ad8d029d26ce092a21cac (patch)
tree7ca709825fe32be6c51af088e405e59aa7ab9d1d
parentc54138ac8a3f4b203f6f39c86a642f54f41b737c (diff)
downloadfreebsd-ports-gnome-ba8f1d57a64885c9686ad8d029d26ce092a21cac.tar.gz
freebsd-ports-gnome-ba8f1d57a64885c9686ad8d029d26ce092a21cac.tar.zst
freebsd-ports-gnome-ba8f1d57a64885c9686ad8d029d26ce092a21cac.zip
Add SQLite 3 (in beta form).
-rw-r--r--databases/Makefile1
-rw-r--r--databases/sqlite3/Makefile108
-rw-r--r--databases/sqlite3/distinfo2
-rw-r--r--databases/sqlite3/files/example.tcl14
-rw-r--r--databases/sqlite3/files/patch-Makefile.in160
-rw-r--r--databases/sqlite3/files/pkgIndex.tcl1
-rw-r--r--databases/sqlite3/pkg-descr7
-rw-r--r--databases/sqlite3/pkg-plist51
-rw-r--r--databases/sqlite34/Makefile108
-rw-r--r--databases/sqlite34/distinfo2
-rw-r--r--databases/sqlite34/files/example.tcl14
-rw-r--r--databases/sqlite34/files/patch-Makefile.in160
-rw-r--r--databases/sqlite34/files/pkgIndex.tcl1
-rw-r--r--databases/sqlite34/pkg-descr7
-rw-r--r--databases/sqlite34/pkg-plist51
15 files changed, 687 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 19ced962a5e3..0c00610e46bf 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -309,6 +309,7 @@
SUBDIR += ruby-sqlrelay
SUBDIR += slony1
SUBDIR += sqlite
+ SUBDIR += sqlite3
SUBDIR += sqlrelay
SUBDIR += sqsh
SUBDIR += sybase-ocsd
diff --git a/databases/sqlite3/Makefile b/databases/sqlite3/Makefile
new file mode 100644
index 000000000000..dd53b5c8eb4a
--- /dev/null
+++ b/databases/sqlite3/Makefile
@@ -0,0 +1,108 @@
+# ex:ts=8
+# New ports collection makefile for: sqlite
+# Date created: Feb 21, 2001
+# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+# By default, this port depends on TCL for building docs. If you want to build
+# without TCL (and thus get no docs), define NOPORTDOCS.
+# If you want to build the TCL wrapper, you have to choose between
+# SQLITE_WITH_TCL83 and SQLITE_WITH_TCL84.
+
+PORTNAME= sqlite
+PORTVERSION= 3.0.5
+CATEGORIES= databases
+MASTER_SITES= http://www.sqlite.org/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= green@FreeBSD.org
+COMMENT= An SQL database engine in a C library w/ Tcl wrapper (beta)
+
+DOCSDIR= ${PREFIX}/share/doc/sqlite3
+EXAMPLESDIR= ${PREFIX}/share/examples/sqlite3
+NO_LATEST_LINK= yes
+
+# Defaults, for building the docs:
+TCL_V= 8.4
+TCL_SHORT_V= 84
+
+.if defined(SQLITE_WITH_TCL83)
+CATEGORIES+= tcl83
+TCL_V= 8.3
+TCL_SHORT_V= 83
+WITH_TCL= YES
+.endif
+
+.if defined(SQLITE_WITH_TCL84)
+CATEGORIES+= tcl84
+TCL_V= 8.4
+TCL_SHORT_V= 84
+WITH_TCL= YES
+.endif
+
+.if defined(WITH_TCL)
+LIB_DEPENDS+= tcl${TCL_SHORT_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V}
+PLIST_SUB+= WITH_TCL=""
+.else
+PLIST_SUB+= WITH_TCL="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+BUILD_DEPENDS+= tclsh${TCL_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V}
+MAKE_ARGS+= TCLSH=tclsh${TCL_V}
+MAKE_ENV+= TCL_VER=${TCL_V}
+.endif
+
+USE_GMAKE= YES
+USE_LIBTOOL_VER= 13
+GNU_CONFIGURE= YES
+USE_REINPLACE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+ALL_TARGET= all
+.if defined(WITH_TCL)
+ALL_TARGET+= libtclsqlite3.la tclsqlite3
+.endif
+
+INSTALLS_SHLIB= YES
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+post-patch:
+ ${REINPLACE_CMD} -e "s/tclsh \$$(TOP)/\$$(TCLSH) \$$(TOP)/g" \
+ -e "s|%%LIBTOOL%%|${LIBTOOL}|g" \
+ ${WRKSRC}/Makefile.in
+ ${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" >${WRKSRC}/freebsd.hints
+ ${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_SHORT_V}\"" >>${WRKSRC}/freebsd.hints
+ #${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 -pthread\"" >>${WRKSRC}/freebsd.hints
+
+post-build:
+ # Build the docs
+.if !defined(NOPORTDOCS)
+ cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} doc
+.endif
+
+DOCFILES= ${AWK} 'BEGIN {FS="/"}; /^%%PORTDOCS%%%%DOCSDIR%%/{print $$2 }' < pkg-plist
+
+post-install:
+.if defined(WITH_TCL)
+ @${MKDIR} ${PREFIX}/lib/sqlite
+ cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_DATA} \
+ libtclsqlite3.la ${PREFIX}/lib/sqlite/
+ @${RM} ${PREFIX}/lib/sqlite/libtclsqlite3.la
+ ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/
+ ${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin
+.endif
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ for file in `${DOCFILES}`; do \
+ ${INSTALL_DATA} ${WRKSRC}/doc/$${file} ${DOCSDIR}; \
+ done
+ @${MKDIR} ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR}
+
+.endif
+
+.include <bsd.port.mk>
diff --git a/databases/sqlite3/distinfo b/databases/sqlite3/distinfo
new file mode 100644
index 000000000000..bb1caf36645f
--- /dev/null
+++ b/databases/sqlite3/distinfo
@@ -0,0 +1,2 @@
+MD5 (sqlite-3.0.5.tar.gz) = 4133cbac9320f6f674700ed15986f4ff
+SIZE (sqlite-3.0.5.tar.gz) = 1226021
diff --git a/databases/sqlite3/files/example.tcl b/databases/sqlite3/files/example.tcl
new file mode 100644
index 000000000000..765c3f9ba715
--- /dev/null
+++ b/databases/sqlite3/files/example.tcl
@@ -0,0 +1,14 @@
+package require sqlite
+
+if {$argc!=2} {
+ puts stderr "Usage: %s DATABASE SQL-STATEMENT"
+ exit 1
+}
+sqlite db [lindex $argv 0]
+db eval [lindex $argv 1] x {
+ foreach v $x(*) {
+ puts "$v = $x($v)"
+ }
+ puts ""
+}
+db close
diff --git a/databases/sqlite3/files/patch-Makefile.in b/databases/sqlite3/files/patch-Makefile.in
new file mode 100644
index 000000000000..5ab28f4575fb
--- /dev/null
+++ b/databases/sqlite3/files/patch-Makefile.in
@@ -0,0 +1,160 @@
+--- Makefile.in.orig Sat Aug 28 11:22:30 2004
++++ Makefile.in Tue Aug 31 14:13:52 2004
+@@ -33,7 +33,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ INSTALL = @INSTALL@
+-LIBTOOL = ./libtool
++LIBTOOL = /usr/local/bin/libtool13
+ RELEASE = @ALLOWRELEASE@
+
+ # libtool compile/link/install
+@@ -401,25 +401,25 @@
+ # Rules used to build documentation
+ #
+ arch.html: $(TOP)/www/arch.tcl
+- tclsh $(TOP)/www/arch.tcl >arch.html
++ $(TCLSH) $(TOP)/www/arch.tcl >arch.html
+
+ arch2.gif: $(TOP)/www/arch2.gif
+ cp $(TOP)/www/arch2.gif .
+
+ c_interface.html: $(TOP)/www/c_interface.tcl
+- tclsh $(TOP)/www/c_interface.tcl >c_interface.html
++ $(TCLSH) $(TOP)/www/c_interface.tcl >c_interface.html
+
+ capi3.html: $(TOP)/www/capi3.tcl
+- tclsh $(TOP)/www/capi3.tcl >capi3.html
++ $(TCLSH) $(TOP)/www/capi3.tcl >capi3.html
+
+ capi3ref.html: $(TOP)/www/capi3ref.tcl
+- tclsh $(TOP)/www/capi3ref.tcl >capi3ref.html
++ $(TCLSH) $(TOP)/www/capi3ref.tcl >capi3ref.html
+
+ changes.html: $(TOP)/www/changes.tcl
+- tclsh $(TOP)/www/changes.tcl >changes.html
++ $(TCLSH) $(TOP)/www/changes.tcl >changes.html
+
+ copyright.html: $(TOP)/www/copyright.tcl
+- tclsh $(TOP)/www/copyright.tcl >copyright.html
++ $(TCLSH) $(TOP)/www/copyright.tcl >copyright.html
+
+ copyright-release.html: $(TOP)/www/copyright-release.html
+ cp $(TOP)/www/copyright-release.html .
+@@ -431,77 +431,76 @@
+ cp $(TOP)/www/common.tcl .
+
+ conflict.html: $(TOP)/www/conflict.tcl
+- tclsh $(TOP)/www/conflict.tcl >conflict.html
++ $(TCLSH) $(TOP)/www/conflict.tcl >conflict.html
+
+ datatypes.html: $(TOP)/www/datatypes.tcl
+- tclsh $(TOP)/www/datatypes.tcl >datatypes.html
++ $(TCLSH) $(TOP)/www/datatypes.tcl >datatypes.html
+
+ datatype3.html: $(TOP)/www/datatype3.tcl
+- tclsh $(TOP)/www/datatype3.tcl >datatype3.html
++ $(TCLSH) $(TOP)/www/datatype3.tcl >datatype3.html
+
+ docs.html: $(TOP)/www/docs.tcl
+- tclsh $(TOP)/www/docs.tcl >docs.html
++ $(TCLSH) $(TOP)/www/docs.tcl >docs.html
+
+ download.html: $(TOP)/www/download.tcl
+- mkdir doc
+- tclsh $(TOP)/www/download.tcl >download.html
++ $(TCLSH) $(TOP)/www/download.tcl >download.html
+
+ faq.html: $(TOP)/www/faq.tcl
+- tclsh $(TOP)/www/faq.tcl >faq.html
++ $(TCLSH) $(TOP)/www/faq.tcl >faq.html
+
+ fileformat.html: $(TOP)/www/fileformat.tcl
+- tclsh $(TOP)/www/fileformat.tcl >fileformat.html
++ $(TCLSH) $(TOP)/www/fileformat.tcl >fileformat.html
+
+ formatchng.html: $(TOP)/www/formatchng.tcl
+- tclsh $(TOP)/www/formatchng.tcl >formatchng.html
++ $(TCLSH) $(TOP)/www/formatchng.tcl >formatchng.html
+
+ index.html: $(TOP)/www/index.tcl last_change
+- tclsh $(TOP)/www/index.tcl >index.html
++ $(TCLSH) $(TOP)/www/index.tcl >index.html
+
+ lang.html: $(TOP)/www/lang.tcl
+- tclsh $(TOP)/www/lang.tcl >lang.html
++ $(TCLSH) $(TOP)/www/lang.tcl >lang.html
+
+ lockingv3.html: $(TOP)/www/lockingv3.tcl
+- tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html
++ $(TCLSH) $(TOP)/www/lockingv3.tcl >lockingv3.html
+
+ oldnews.html: $(TOP)/www/oldnews.tcl
+- tclsh $(TOP)/www/oldnews.tcl >oldnews.html
++ $(TCLSH) $(TOP)/www/oldnews.tcl >oldnews.html
+
+ omitted.html: $(TOP)/www/omitted.tcl
+- tclsh $(TOP)/www/omitted.tcl >omitted.html
++ $(TCLSH) $(TOP)/www/omitted.tcl >omitted.html
+
+ opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
+- tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
++ $(TCLSH) $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
+
+ mingw.html: $(TOP)/www/mingw.tcl
+- tclsh $(TOP)/www/mingw.tcl >mingw.html
++ $(TCLSH) $(TOP)/www/mingw.tcl >mingw.html
+
+ nulls.html: $(TOP)/www/nulls.tcl
+- tclsh $(TOP)/www/nulls.tcl >nulls.html
++ $(TCLSH) $(TOP)/www/nulls.tcl >nulls.html
+
+ quickstart.html: $(TOP)/www/quickstart.tcl
+- tclsh $(TOP)/www/quickstart.tcl >quickstart.html
++ $(TCLSH) $(TOP)/www/quickstart.tcl >quickstart.html
+
+ speed.html: $(TOP)/www/speed.tcl
+- tclsh $(TOP)/www/speed.tcl >speed.html
++ $(TCLSH) $(TOP)/www/speed.tcl >speed.html
+
+ sqlite.gif: $(TOP)/art/SQLite.gif
+ cp $(TOP)/art/SQLite.gif sqlite.gif
+
+ sqlite.html: $(TOP)/www/sqlite.tcl
+- tclsh $(TOP)/www/sqlite.tcl >sqlite.html
++ $(TCLSH) $(TOP)/www/sqlite.tcl >sqlite.html
+
+ support.html: $(TOP)/www/support.tcl
+- tclsh $(TOP)/www/support.tcl >support.html
++ $(TCLSH) $(TOP)/www/support.tcl >support.html
+
+ tclsqlite.html: $(TOP)/www/tclsqlite.tcl
+- tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
++ $(TCLSH) $(TOP)/www/tclsqlite.tcl >tclsqlite.html
+
+ vdbe.html: $(TOP)/www/vdbe.tcl
+- tclsh $(TOP)/www/vdbe.tcl >vdbe.html
++ $(TCLSH) $(TOP)/www/vdbe.tcl >vdbe.html
+
+ version3.html: $(TOP)/www/version3.tcl
+- tclsh $(TOP)/www/version3.tcl >version3.html
++ $(TCLSH) $(TOP)/www/version3.tcl >version3.html
+
+
+ # Files to be published on the website.
+@@ -548,12 +547,13 @@
+ install: sqlite3 libsqlite3.la sqlite3.h
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
+ $(LTINSTALL) libsqlite3.la $(DESTDIR)$(exec_prefix)/lib
++ rm $(DESTDIR)$(exec_prefix)/lib/libsqlite3.la
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
+ $(LTINSTALL) sqlite3 $(DESTDIR)$(exec_prefix)/bin
+ $(INSTALL) -d $(DESTDIR)$(prefix)/include
+ $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(prefix)/include
+- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
+- $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
++ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/libdata/pkgconfig;
++ $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(exec_prefix)/libdata/pkgconfig;
+
+ clean:
+ rm -f *.lo *.la *.o sqlite3@TARGET_EXEEXT@ libsqlite3.la
diff --git a/databases/sqlite3/files/pkgIndex.tcl b/databases/sqlite3/files/pkgIndex.tcl
new file mode 100644
index 000000000000..d8b6bbc30048
--- /dev/null
+++ b/databases/sqlite3/files/pkgIndex.tcl
@@ -0,0 +1 @@
+package ifneeded sqlite 0.0 [list load [file join $dir libtclsqlite3.so] sqlite]
diff --git a/databases/sqlite3/pkg-descr b/databases/sqlite3/pkg-descr
new file mode 100644
index 000000000000..3cdcbd6b2daf
--- /dev/null
+++ b/databases/sqlite3/pkg-descr
@@ -0,0 +1,7 @@
+SQLite is an SQL database engine in a C library. Programs that link the SQLite
+library can have SQL database access without running a separate RDBMS process.
+The distribution comes with a standalone command-line access program (sqlite)
+that can be used to administer an SQLite database and which serves as an
+example of how to use the SQLite library.
+
+WWW: http://www.sqlite.org/
diff --git a/databases/sqlite3/pkg-plist b/databases/sqlite3/pkg-plist
new file mode 100644
index 000000000000..7d8f2ea654a4
--- /dev/null
+++ b/databases/sqlite3/pkg-plist
@@ -0,0 +1,51 @@
+bin/sqlite3
+%%WITH_TCL%%bin/tclsqlite3
+include/sqlite3.h
+lib/libsqlite3.a
+lib/libsqlite3.so
+lib/libsqlite3.so.8
+libdata/pkgconfig/sqlite3.pc
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.so.8
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.so
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.a
+%%WITH_TCL%%lib/sqlite/pkgIndex.tcl
+%%WITH_TCL%%@dirrm lib/sqlite
+%%PORTDOCS%%%%DOCSDIR%%/affinity.html
+%%PORTDOCS%%%%DOCSDIR%%/arch.html
+%%PORTDOCS%%%%DOCSDIR%%/arch2.gif
+%%PORTDOCS%%%%DOCSDIR%%/c_interface.html
+%%PORTDOCS%%%%DOCSDIR%%/capi3.html
+%%PORTDOCS%%%%DOCSDIR%%/capi3ref.html
+%%PORTDOCS%%%%DOCSDIR%%/changes.html
+%%PORTDOCS%%%%DOCSDIR%%/conflict.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright-release.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright-release.pdf
+%%PORTDOCS%%%%DOCSDIR%%/copyright.html
+%%PORTDOCS%%%%DOCSDIR%%/datatype3.html
+%%PORTDOCS%%%%DOCSDIR%%/datatypes.html
+%%PORTDOCS%%%%DOCSDIR%%/docs.html
+%%PORTDOCS%%%%DOCSDIR%%/download.html
+%%PORTDOCS%%%%DOCSDIR%%/faq.html
+%%PORTDOCS%%%%DOCSDIR%%/fileformat.html
+%%PORTDOCS%%%%DOCSDIR%%/formatchng.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/lang.html
+%%PORTDOCS%%%%DOCSDIR%%/lemon.html
+%%PORTDOCS%%%%DOCSDIR%%/lockingv3.html
+%%PORTDOCS%%%%DOCSDIR%%/mingw.html
+%%PORTDOCS%%%%DOCSDIR%%/nulls.html
+%%PORTDOCS%%%%DOCSDIR%%/oldnews.html
+%%PORTDOCS%%%%DOCSDIR%%/omitted.html
+%%PORTDOCS%%%%DOCSDIR%%/opcode.html
+%%PORTDOCS%%%%DOCSDIR%%/quickstart.html
+%%PORTDOCS%%%%DOCSDIR%%/report1.txt
+%%PORTDOCS%%%%DOCSDIR%%/speed.html
+%%PORTDOCS%%%%DOCSDIR%%/sqlite.gif
+%%PORTDOCS%%%%DOCSDIR%%/sqlite.html
+%%PORTDOCS%%%%DOCSDIR%%/support.html
+%%PORTDOCS%%%%DOCSDIR%%/tclsqlite.html
+%%PORTDOCS%%%%DOCSDIR%%/vdbe.html
+%%PORTDOCS%%%%DOCSDIR%%/version3.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTDOCS%%%%EXAMPLESDIR%%/example.tcl
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
diff --git a/databases/sqlite34/Makefile b/databases/sqlite34/Makefile
new file mode 100644
index 000000000000..dd53b5c8eb4a
--- /dev/null
+++ b/databases/sqlite34/Makefile
@@ -0,0 +1,108 @@
+# ex:ts=8
+# New ports collection makefile for: sqlite
+# Date created: Feb 21, 2001
+# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+# By default, this port depends on TCL for building docs. If you want to build
+# without TCL (and thus get no docs), define NOPORTDOCS.
+# If you want to build the TCL wrapper, you have to choose between
+# SQLITE_WITH_TCL83 and SQLITE_WITH_TCL84.
+
+PORTNAME= sqlite
+PORTVERSION= 3.0.5
+CATEGORIES= databases
+MASTER_SITES= http://www.sqlite.org/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= green@FreeBSD.org
+COMMENT= An SQL database engine in a C library w/ Tcl wrapper (beta)
+
+DOCSDIR= ${PREFIX}/share/doc/sqlite3
+EXAMPLESDIR= ${PREFIX}/share/examples/sqlite3
+NO_LATEST_LINK= yes
+
+# Defaults, for building the docs:
+TCL_V= 8.4
+TCL_SHORT_V= 84
+
+.if defined(SQLITE_WITH_TCL83)
+CATEGORIES+= tcl83
+TCL_V= 8.3
+TCL_SHORT_V= 83
+WITH_TCL= YES
+.endif
+
+.if defined(SQLITE_WITH_TCL84)
+CATEGORIES+= tcl84
+TCL_V= 8.4
+TCL_SHORT_V= 84
+WITH_TCL= YES
+.endif
+
+.if defined(WITH_TCL)
+LIB_DEPENDS+= tcl${TCL_SHORT_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V}
+PLIST_SUB+= WITH_TCL=""
+.else
+PLIST_SUB+= WITH_TCL="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+BUILD_DEPENDS+= tclsh${TCL_V}:${PORTSDIR}/lang/tcl${TCL_SHORT_V}
+MAKE_ARGS+= TCLSH=tclsh${TCL_V}
+MAKE_ENV+= TCL_VER=${TCL_V}
+.endif
+
+USE_GMAKE= YES
+USE_LIBTOOL_VER= 13
+GNU_CONFIGURE= YES
+USE_REINPLACE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+ALL_TARGET= all
+.if defined(WITH_TCL)
+ALL_TARGET+= libtclsqlite3.la tclsqlite3
+.endif
+
+INSTALLS_SHLIB= YES
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+post-patch:
+ ${REINPLACE_CMD} -e "s/tclsh \$$(TOP)/\$$(TCLSH) \$$(TOP)/g" \
+ -e "s|%%LIBTOOL%%|${LIBTOOL}|g" \
+ ${WRKSRC}/Makefile.in
+ ${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" >${WRKSRC}/freebsd.hints
+ ${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_SHORT_V}\"" >>${WRKSRC}/freebsd.hints
+ #${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 -pthread\"" >>${WRKSRC}/freebsd.hints
+
+post-build:
+ # Build the docs
+.if !defined(NOPORTDOCS)
+ cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} doc
+.endif
+
+DOCFILES= ${AWK} 'BEGIN {FS="/"}; /^%%PORTDOCS%%%%DOCSDIR%%/{print $$2 }' < pkg-plist
+
+post-install:
+.if defined(WITH_TCL)
+ @${MKDIR} ${PREFIX}/lib/sqlite
+ cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_DATA} \
+ libtclsqlite3.la ${PREFIX}/lib/sqlite/
+ @${RM} ${PREFIX}/lib/sqlite/libtclsqlite3.la
+ ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/
+ ${INSTALL_PROGRAM} ${WRKSRC}/.libs/tclsqlite3 ${PREFIX}/bin
+.endif
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ for file in `${DOCFILES}`; do \
+ ${INSTALL_DATA} ${WRKSRC}/doc/$${file} ${DOCSDIR}; \
+ done
+ @${MKDIR} ${EXAMPLESDIR}
+ @${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR}
+
+.endif
+
+.include <bsd.port.mk>
diff --git a/databases/sqlite34/distinfo b/databases/sqlite34/distinfo
new file mode 100644
index 000000000000..bb1caf36645f
--- /dev/null
+++ b/databases/sqlite34/distinfo
@@ -0,0 +1,2 @@
+MD5 (sqlite-3.0.5.tar.gz) = 4133cbac9320f6f674700ed15986f4ff
+SIZE (sqlite-3.0.5.tar.gz) = 1226021
diff --git a/databases/sqlite34/files/example.tcl b/databases/sqlite34/files/example.tcl
new file mode 100644
index 000000000000..765c3f9ba715
--- /dev/null
+++ b/databases/sqlite34/files/example.tcl
@@ -0,0 +1,14 @@
+package require sqlite
+
+if {$argc!=2} {
+ puts stderr "Usage: %s DATABASE SQL-STATEMENT"
+ exit 1
+}
+sqlite db [lindex $argv 0]
+db eval [lindex $argv 1] x {
+ foreach v $x(*) {
+ puts "$v = $x($v)"
+ }
+ puts ""
+}
+db close
diff --git a/databases/sqlite34/files/patch-Makefile.in b/databases/sqlite34/files/patch-Makefile.in
new file mode 100644
index 000000000000..5ab28f4575fb
--- /dev/null
+++ b/databases/sqlite34/files/patch-Makefile.in
@@ -0,0 +1,160 @@
+--- Makefile.in.orig Sat Aug 28 11:22:30 2004
++++ Makefile.in Tue Aug 31 14:13:52 2004
+@@ -33,7 +33,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ INSTALL = @INSTALL@
+-LIBTOOL = ./libtool
++LIBTOOL = /usr/local/bin/libtool13
+ RELEASE = @ALLOWRELEASE@
+
+ # libtool compile/link/install
+@@ -401,25 +401,25 @@
+ # Rules used to build documentation
+ #
+ arch.html: $(TOP)/www/arch.tcl
+- tclsh $(TOP)/www/arch.tcl >arch.html
++ $(TCLSH) $(TOP)/www/arch.tcl >arch.html
+
+ arch2.gif: $(TOP)/www/arch2.gif
+ cp $(TOP)/www/arch2.gif .
+
+ c_interface.html: $(TOP)/www/c_interface.tcl
+- tclsh $(TOP)/www/c_interface.tcl >c_interface.html
++ $(TCLSH) $(TOP)/www/c_interface.tcl >c_interface.html
+
+ capi3.html: $(TOP)/www/capi3.tcl
+- tclsh $(TOP)/www/capi3.tcl >capi3.html
++ $(TCLSH) $(TOP)/www/capi3.tcl >capi3.html
+
+ capi3ref.html: $(TOP)/www/capi3ref.tcl
+- tclsh $(TOP)/www/capi3ref.tcl >capi3ref.html
++ $(TCLSH) $(TOP)/www/capi3ref.tcl >capi3ref.html
+
+ changes.html: $(TOP)/www/changes.tcl
+- tclsh $(TOP)/www/changes.tcl >changes.html
++ $(TCLSH) $(TOP)/www/changes.tcl >changes.html
+
+ copyright.html: $(TOP)/www/copyright.tcl
+- tclsh $(TOP)/www/copyright.tcl >copyright.html
++ $(TCLSH) $(TOP)/www/copyright.tcl >copyright.html
+
+ copyright-release.html: $(TOP)/www/copyright-release.html
+ cp $(TOP)/www/copyright-release.html .
+@@ -431,77 +431,76 @@
+ cp $(TOP)/www/common.tcl .
+
+ conflict.html: $(TOP)/www/conflict.tcl
+- tclsh $(TOP)/www/conflict.tcl >conflict.html
++ $(TCLSH) $(TOP)/www/conflict.tcl >conflict.html
+
+ datatypes.html: $(TOP)/www/datatypes.tcl
+- tclsh $(TOP)/www/datatypes.tcl >datatypes.html
++ $(TCLSH) $(TOP)/www/datatypes.tcl >datatypes.html
+
+ datatype3.html: $(TOP)/www/datatype3.tcl
+- tclsh $(TOP)/www/datatype3.tcl >datatype3.html
++ $(TCLSH) $(TOP)/www/datatype3.tcl >datatype3.html
+
+ docs.html: $(TOP)/www/docs.tcl
+- tclsh $(TOP)/www/docs.tcl >docs.html
++ $(TCLSH) $(TOP)/www/docs.tcl >docs.html
+
+ download.html: $(TOP)/www/download.tcl
+- mkdir doc
+- tclsh $(TOP)/www/download.tcl >download.html
++ $(TCLSH) $(TOP)/www/download.tcl >download.html
+
+ faq.html: $(TOP)/www/faq.tcl
+- tclsh $(TOP)/www/faq.tcl >faq.html
++ $(TCLSH) $(TOP)/www/faq.tcl >faq.html
+
+ fileformat.html: $(TOP)/www/fileformat.tcl
+- tclsh $(TOP)/www/fileformat.tcl >fileformat.html
++ $(TCLSH) $(TOP)/www/fileformat.tcl >fileformat.html
+
+ formatchng.html: $(TOP)/www/formatchng.tcl
+- tclsh $(TOP)/www/formatchng.tcl >formatchng.html
++ $(TCLSH) $(TOP)/www/formatchng.tcl >formatchng.html
+
+ index.html: $(TOP)/www/index.tcl last_change
+- tclsh $(TOP)/www/index.tcl >index.html
++ $(TCLSH) $(TOP)/www/index.tcl >index.html
+
+ lang.html: $(TOP)/www/lang.tcl
+- tclsh $(TOP)/www/lang.tcl >lang.html
++ $(TCLSH) $(TOP)/www/lang.tcl >lang.html
+
+ lockingv3.html: $(TOP)/www/lockingv3.tcl
+- tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html
++ $(TCLSH) $(TOP)/www/lockingv3.tcl >lockingv3.html
+
+ oldnews.html: $(TOP)/www/oldnews.tcl
+- tclsh $(TOP)/www/oldnews.tcl >oldnews.html
++ $(TCLSH) $(TOP)/www/oldnews.tcl >oldnews.html
+
+ omitted.html: $(TOP)/www/omitted.tcl
+- tclsh $(TOP)/www/omitted.tcl >omitted.html
++ $(TCLSH) $(TOP)/www/omitted.tcl >omitted.html
+
+ opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
+- tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
++ $(TCLSH) $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
+
+ mingw.html: $(TOP)/www/mingw.tcl
+- tclsh $(TOP)/www/mingw.tcl >mingw.html
++ $(TCLSH) $(TOP)/www/mingw.tcl >mingw.html
+
+ nulls.html: $(TOP)/www/nulls.tcl
+- tclsh $(TOP)/www/nulls.tcl >nulls.html
++ $(TCLSH) $(TOP)/www/nulls.tcl >nulls.html
+
+ quickstart.html: $(TOP)/www/quickstart.tcl
+- tclsh $(TOP)/www/quickstart.tcl >quickstart.html
++ $(TCLSH) $(TOP)/www/quickstart.tcl >quickstart.html
+
+ speed.html: $(TOP)/www/speed.tcl
+- tclsh $(TOP)/www/speed.tcl >speed.html
++ $(TCLSH) $(TOP)/www/speed.tcl >speed.html
+
+ sqlite.gif: $(TOP)/art/SQLite.gif
+ cp $(TOP)/art/SQLite.gif sqlite.gif
+
+ sqlite.html: $(TOP)/www/sqlite.tcl
+- tclsh $(TOP)/www/sqlite.tcl >sqlite.html
++ $(TCLSH) $(TOP)/www/sqlite.tcl >sqlite.html
+
+ support.html: $(TOP)/www/support.tcl
+- tclsh $(TOP)/www/support.tcl >support.html
++ $(TCLSH) $(TOP)/www/support.tcl >support.html
+
+ tclsqlite.html: $(TOP)/www/tclsqlite.tcl
+- tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
++ $(TCLSH) $(TOP)/www/tclsqlite.tcl >tclsqlite.html
+
+ vdbe.html: $(TOP)/www/vdbe.tcl
+- tclsh $(TOP)/www/vdbe.tcl >vdbe.html
++ $(TCLSH) $(TOP)/www/vdbe.tcl >vdbe.html
+
+ version3.html: $(TOP)/www/version3.tcl
+- tclsh $(TOP)/www/version3.tcl >version3.html
++ $(TCLSH) $(TOP)/www/version3.tcl >version3.html
+
+
+ # Files to be published on the website.
+@@ -548,12 +547,13 @@
+ install: sqlite3 libsqlite3.la sqlite3.h
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
+ $(LTINSTALL) libsqlite3.la $(DESTDIR)$(exec_prefix)/lib
++ rm $(DESTDIR)$(exec_prefix)/lib/libsqlite3.la
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
+ $(LTINSTALL) sqlite3 $(DESTDIR)$(exec_prefix)/bin
+ $(INSTALL) -d $(DESTDIR)$(prefix)/include
+ $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(prefix)/include
+- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
+- $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
++ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/libdata/pkgconfig;
++ $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(exec_prefix)/libdata/pkgconfig;
+
+ clean:
+ rm -f *.lo *.la *.o sqlite3@TARGET_EXEEXT@ libsqlite3.la
diff --git a/databases/sqlite34/files/pkgIndex.tcl b/databases/sqlite34/files/pkgIndex.tcl
new file mode 100644
index 000000000000..d8b6bbc30048
--- /dev/null
+++ b/databases/sqlite34/files/pkgIndex.tcl
@@ -0,0 +1 @@
+package ifneeded sqlite 0.0 [list load [file join $dir libtclsqlite3.so] sqlite]
diff --git a/databases/sqlite34/pkg-descr b/databases/sqlite34/pkg-descr
new file mode 100644
index 000000000000..3cdcbd6b2daf
--- /dev/null
+++ b/databases/sqlite34/pkg-descr
@@ -0,0 +1,7 @@
+SQLite is an SQL database engine in a C library. Programs that link the SQLite
+library can have SQL database access without running a separate RDBMS process.
+The distribution comes with a standalone command-line access program (sqlite)
+that can be used to administer an SQLite database and which serves as an
+example of how to use the SQLite library.
+
+WWW: http://www.sqlite.org/
diff --git a/databases/sqlite34/pkg-plist b/databases/sqlite34/pkg-plist
new file mode 100644
index 000000000000..7d8f2ea654a4
--- /dev/null
+++ b/databases/sqlite34/pkg-plist
@@ -0,0 +1,51 @@
+bin/sqlite3
+%%WITH_TCL%%bin/tclsqlite3
+include/sqlite3.h
+lib/libsqlite3.a
+lib/libsqlite3.so
+lib/libsqlite3.so.8
+libdata/pkgconfig/sqlite3.pc
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.so.8
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.so
+%%WITH_TCL%%lib/sqlite/libtclsqlite3.a
+%%WITH_TCL%%lib/sqlite/pkgIndex.tcl
+%%WITH_TCL%%@dirrm lib/sqlite
+%%PORTDOCS%%%%DOCSDIR%%/affinity.html
+%%PORTDOCS%%%%DOCSDIR%%/arch.html
+%%PORTDOCS%%%%DOCSDIR%%/arch2.gif
+%%PORTDOCS%%%%DOCSDIR%%/c_interface.html
+%%PORTDOCS%%%%DOCSDIR%%/capi3.html
+%%PORTDOCS%%%%DOCSDIR%%/capi3ref.html
+%%PORTDOCS%%%%DOCSDIR%%/changes.html
+%%PORTDOCS%%%%DOCSDIR%%/conflict.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright-release.html
+%%PORTDOCS%%%%DOCSDIR%%/copyright-release.pdf
+%%PORTDOCS%%%%DOCSDIR%%/copyright.html
+%%PORTDOCS%%%%DOCSDIR%%/datatype3.html
+%%PORTDOCS%%%%DOCSDIR%%/datatypes.html
+%%PORTDOCS%%%%DOCSDIR%%/docs.html
+%%PORTDOCS%%%%DOCSDIR%%/download.html
+%%PORTDOCS%%%%DOCSDIR%%/faq.html
+%%PORTDOCS%%%%DOCSDIR%%/fileformat.html
+%%PORTDOCS%%%%DOCSDIR%%/formatchng.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/lang.html
+%%PORTDOCS%%%%DOCSDIR%%/lemon.html
+%%PORTDOCS%%%%DOCSDIR%%/lockingv3.html
+%%PORTDOCS%%%%DOCSDIR%%/mingw.html
+%%PORTDOCS%%%%DOCSDIR%%/nulls.html
+%%PORTDOCS%%%%DOCSDIR%%/oldnews.html
+%%PORTDOCS%%%%DOCSDIR%%/omitted.html
+%%PORTDOCS%%%%DOCSDIR%%/opcode.html
+%%PORTDOCS%%%%DOCSDIR%%/quickstart.html
+%%PORTDOCS%%%%DOCSDIR%%/report1.txt
+%%PORTDOCS%%%%DOCSDIR%%/speed.html
+%%PORTDOCS%%%%DOCSDIR%%/sqlite.gif
+%%PORTDOCS%%%%DOCSDIR%%/sqlite.html
+%%PORTDOCS%%%%DOCSDIR%%/support.html
+%%PORTDOCS%%%%DOCSDIR%%/tclsqlite.html
+%%PORTDOCS%%%%DOCSDIR%%/vdbe.html
+%%PORTDOCS%%%%DOCSDIR%%/version3.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTDOCS%%%%EXAMPLESDIR%%/example.tcl
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%