aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2012-04-16 21:08:36 +0800
committergahr <gahr@FreeBSD.org>2012-04-16 21:08:36 +0800
commite46fc0066d36d8cb6defdde63f11f01feaa75e90 (patch)
tree0199a0e2dfcea64918260320e08704a050834548 /databases
parenta10b71fd327d0b8e9cbe238b0fcfd8d2be736b05 (diff)
downloadfreebsd-ports-gnome-e46fc0066d36d8cb6defdde63f11f01feaa75e90.tar.gz
freebsd-ports-gnome-e46fc0066d36d8cb6defdde63f11f01feaa75e90.tar.zst
freebsd-ports-gnome-e46fc0066d36d8cb6defdde63f11f01feaa75e90.zip
- New port: databases/tdbc
TDBC is the Tcl Database Connectivity, an abstraction layer for database drivers in the Tcl programming language. It currently supports drivers for MySQL, PostgreSQL, SQLite, and ODBC through either unixODBC or iODBX.
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile1
-rw-r--r--databases/tdbc/Makefile132
-rw-r--r--databases/tdbc/distinfo2
-rw-r--r--databases/tdbc/files/patch-tdbcsqlite3_Makefile.in12
-rw-r--r--databases/tdbc/files/pkgIndex.tcl.in1
-rw-r--r--databases/tdbc/pkg-descr8
-rw-r--r--databases/tdbc/pkg-plist38
7 files changed, 194 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 8cd6a03da213..59010f2b3a10 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -822,6 +822,7 @@
SUBDIR += tarantool
SUBDIR += tcl-Mysql
SUBDIR += tdb
+ SUBDIR += tdbc
SUBDIR += tinycdb
SUBDIR += tokyocabinet
SUBDIR += tokyotyrant
diff --git a/databases/tdbc/Makefile b/databases/tdbc/Makefile
new file mode 100644
index 000000000000..545ac37b93b7
--- /dev/null
+++ b/databases/tdbc/Makefile
@@ -0,0 +1,132 @@
+# New ports collection Makefile for: tdbc
+# Date created: 16 March 2012
+# Whom: Pietro Cerutti <gahr@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= tdbc
+DISTVERSION= 1.0b17
+CATEGORIES= databases
+MASTER_SITES= http://tdbc.tcl.tk/index.cgi/tarball/
+DISTFILES= ${PORTNAME:U}-${FOSSIL_HASH}.${EXTRACT_SUFX}?uuid=${FOSSIL_HASH}
+
+MAINTAINER= gahr@FreeBSD.org
+COMMENT= The common database access interface for Tcl
+
+OPTIONS= MYSQL "Build MySQL driver" off \
+ UODBC "Build ODBC driver (unixODBC)" off \
+ IODBC "Build ODBC driver (iODBC)" off \
+ PGSQL "Build PostgreSQL driver" off \
+ SQLITE "Build SQLite driver" off
+
+FOSSIL_HASH= 9972d7cf7d10b55157773ba027e54713d53e4cee
+
+USE_TCL= 86
+USE_LDCONFIG= yes
+WRKSRC= ${WRKDIR}/${PORTNAME:U}-${FOSSIL_HASH}.
+CONFIGURE_ARGS+=--with-tcl=${TCL_LIBDIR} --with-tcloo=${TCL_LIBDIR} \
+ --prefix=${PREFIX} --exec-prefix=${PREFIX} \
+ --with-tdbc=${WRKSRC}/tdbc --enable-threads
+PLIST_SUB+= VERSION=${DISTVERSION}
+SUB_FILES+= pkgIndex.tcl
+SUB_LIST+= DISTVERSION=${DISTVERSION}
+
+MODULES= tdbc
+
+MAN3= Tdbc_Init.3
+MANN= tdbc.n \
+ tdbc_connection.n \
+ tdbc_mapSqlState.n \
+ tdbc_resultset.n \
+ tdbc_statement.n \
+ tdbc_tokenize.n
+
+.include <bsd.port.options.mk>
+
+#
+# MySQL
+#
+.if defined(WITH_MYSQL)
+MODULES+= tdbcmysql
+PLIST_SUB+= MYSQL=""
+MANN+= tdbc_mysql.n
+USE_MYSQL= client
+.else
+PLIST_SUB+= MYSQL="@comment "
+.endif
+
+#
+# ODBC
+#
+.if defined(WITH_UODBC) && defined(WITH_IODBC)
+IGNORE= please select either UODBC or IODBC, but not both
+.endif
+
+.if defined(WITH_UODBC) && !defined(WITH_IODBC)
+LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC
+.endif
+
+.if defined(WITH_IODBC) && !defined(WITH_UODBC)
+LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
+.endif
+
+.if defined(WITH_UODBC) || defined(WITH_IODBC)
+MODULES+= tdbcodbc
+PLIST_SUB+= ODBC=""
+MANN+= tdbc_odbc.n
+.else
+PLIST_SUB+= ODBC="@comment "
+.endif
+
+#
+# PostgreSQL
+#
+.if defined(WITH_PGSQL)
+USE_PGSQL= client
+MODULES+= tdbcpostgres
+PLIST_SUB+= PGSQL=""
+MANN+= tdbc_postgres.n
+.else
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+#
+# SQLite
+#
+.if defined(WITH_SQLITE)
+MODULES+= tdbcsqlite3
+PLIST_SUB+= SQLITE="" \
+ TCL_LIBDIR="${TCL_LIBDIR:S/${LOCALBASE}\///}"
+MANN+= tdbc_sqlite3.n
+.else
+PLIST_SUB+= SQLITE="@comment "
+.endif
+
+do-configure:
+.for module in ${MODULES}
+ cd ${WRKSRC}/${module} && ${SH} configure ${CONFIGURE_ARGS}
+.endfor
+
+post-configure:
+ ${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's|tdbcstub10b17|tdbcstub|g'
+
+do-build:
+.for module in ${MODULES}
+ cd ${WRKSRC}/${module} && ${MAKE} ${ALL_TARGET}
+.endfor
+
+do-install:
+.for module in ${MODULES}
+ cd ${WRKSRC}/${module} && ${MAKE} ${INSTALL_TARGET}
+.endfor
+.if defined(WITH_SQLITE)
+ ${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${TCL_LIBDIR}/tdbc
+.endif
+
+test:
+.for module in ${MODULES}
+ cd ${WRKSRC}/${module} && ${MAKE} test
+.endfor
+
+.include <bsd.port.mk>
diff --git a/databases/tdbc/distinfo b/databases/tdbc/distinfo
new file mode 100644
index 000000000000..9356f1429709
--- /dev/null
+++ b/databases/tdbc/distinfo
@@ -0,0 +1,2 @@
+SHA256 (TDBC-9972d7cf7d10b55157773ba027e54713d53e4cee..tar.gz?uuid=9972d7cf7d10b55157773ba027e54713d53e4cee) = 54b1a7fc544cf7e0268fc7e7a4761a0fc552d64bbe98254cef280edd5022903b
+SIZE (TDBC-9972d7cf7d10b55157773ba027e54713d53e4cee..tar.gz?uuid=9972d7cf7d10b55157773ba027e54713d53e4cee) = 921886
diff --git a/databases/tdbc/files/patch-tdbcsqlite3_Makefile.in b/databases/tdbc/files/patch-tdbcsqlite3_Makefile.in
new file mode 100644
index 000000000000..c005a0890f0a
--- /dev/null
+++ b/databases/tdbc/files/patch-tdbcsqlite3_Makefile.in
@@ -0,0 +1,12 @@
+--- tdbcsqlite3/Makefile.in.orig 2011-08-01 16:50:38.000000000 +0200
++++ tdbcsqlite3/Makefile.in 2012-03-16 16:49:20.000000000 +0100
+@@ -72,6 +72,6 @@
+ pkgdatadir = $(datadir)/$(PKG_DIR)
+ pkglibdir = $(libdir)/$(PKG_DIR)
+ pkgincludedir = $(includedir)/$(PKG_DIR)
+-tmdir = $(libdir)/tcl$(TCL_MAJOR_VERSION)/$(TCL_VERSION)
++tmdir = $(libdir)/tcl$(TCL_VERSION)
+ pkgslash = `echo $(PACKAGE_NAME) | sed s=tdbc=tdbc/=`
+
+ top_builddir = .
+
diff --git a/databases/tdbc/files/pkgIndex.tcl.in b/databases/tdbc/files/pkgIndex.tcl.in
new file mode 100644
index 000000000000..ea62d963480f
--- /dev/null
+++ b/databases/tdbc/files/pkgIndex.tcl.in
@@ -0,0 +1 @@
+package ifneeded tdbc::sqlite3 %%DISTVERSION%% [list source [file join $dir sqlite3-%%DISTVERSION%%.tm]]
diff --git a/databases/tdbc/pkg-descr b/databases/tdbc/pkg-descr
new file mode 100644
index 000000000000..a9b8fd5b8b50
--- /dev/null
+++ b/databases/tdbc/pkg-descr
@@ -0,0 +1,8 @@
+TDBC is the Tcl Database Connectivity, an abstraction layer for database
+drivers in the Tcl programming language. The interface is described in
+TIP 308 (http://www.tcl.tk/cgi-bin/tct/tip/308) with updates in TIP 350
+(http://www.tcl.tk/cgi-bin/tct/tip/350).
+
+Currently, drivers for MySQL, ODBC, PostgreSQL, and SQLite3 are included.
+
+WWW: http://tdbc.tcl.tk
diff --git a/databases/tdbc/pkg-plist b/databases/tdbc/pkg-plist
new file mode 100644
index 000000000000..07c856117b66
--- /dev/null
+++ b/databases/tdbc/pkg-plist
@@ -0,0 +1,38 @@
+include/tdbc.h
+include/tdbcDecls.h
+include/tdbcInt.h
+lib/tdbc%%VERSION%%/libtdbc.so.1
+lib/tdbc%%VERSION%%/libtdbcstub.a
+lib/tdbc%%VERSION%%/pkgIndex.tcl
+lib/tdbc%%VERSION%%/tdbc.tcl
+lib/tdbc%%VERSION%%/tdbcConfig.sh
+@dirrm lib/tdbc%%VERSION%%
+
+@comment MySQL
+%%MYSQL%%include/fakemysql.h
+%%MYSQL%%include/mysqlStubs.h
+%%MYSQL%%lib/tdbcmysql%%VERSION%%/libtdbcmysql.so.1
+%%MYSQL%%lib/tdbcmysql%%VERSION%%/tdbcmysql.tcl
+%%MYSQL%%lib/tdbcmysql%%VERSION%%/pkgIndex.tcl
+%%MYSQL%%@dirrm lib/tdbcmysql%%VERSION%%
+
+@comment ODBC
+%%ODBC%%include/fakesql.h
+%%ODBC%%include/odbcStubs.h
+%%ODBC%%lib/tdbcodbc%%VERSION%%/libtdbcodbc.so.1
+%%ODBC%%lib/tdbcodbc%%VERSION%%/tdbcodbc.tcl
+%%ODBC%%lib/tdbcodbc%%VERSION%%/pkgIndex.tcl
+%%ODBC%%@dirrm lib/tdbcodbc%%VERSION%%
+
+@comment PGSQL
+%%PGSQL%%include/fakepq.h
+%%PGSQL%%include/pqStubs.h
+%%PGSQL%%lib/tdbcpostgres%%VERSION%%/libtdbcpostgres.so.1
+%%PGSQL%%lib/tdbcpostgres%%VERSION%%/tdbcpostgres.tcl
+%%PGSQL%%lib/tdbcpostgres%%VERSION%%/pkgIndex.tcl
+%%PGSQL%%@dirrm lib/tdbcpostgres%%VERSION%%
+
+@comment SQLITE
+%%SQLITE%%%%TCL_LIBDIR%%/tdbc/sqlite3-%%VERSION%%.tm
+%%SQLITE%%%%TCL_LIBDIR%%/tdbc/pkgIndex.tcl
+%%SQLITE%%@dirrm %%TCL_LIBDIR%%/tdbc