diff options
-rw-r--r-- | databases/libdbi-drivers/Makefile | 33 | ||||
-rw-r--r-- | databases/libdbi-drivers/distinfo | 4 | ||||
-rw-r--r-- | databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in | 11 | ||||
-rw-r--r-- | databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c | 66 | ||||
-rw-r--r-- | databases/libdbi-drivers/pkg-plist | 26 |
5 files changed, 114 insertions, 26 deletions
diff --git a/databases/libdbi-drivers/Makefile b/databases/libdbi-drivers/Makefile index 1cc251b92e1c..f485f44defb6 100644 --- a/databases/libdbi-drivers/Makefile +++ b/databases/libdbi-drivers/Makefile @@ -1,13 +1,12 @@ -# ex:ts=8 # Ports collection makefile for: libdbi-drivers -# Date created: Oct 30, 2003 -# Whom: ijliao +# Date created: Oct 30, 2003 +# Whom: ijliao # # $FreeBSD$ # PORTNAME= libdbi-drivers -PORTVERSION= 0.8.0 +PORTVERSION= 0.8.1 CATEGORIES= databases devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -24,21 +23,23 @@ CONFIGURE_ARGS= --disable-static \ DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION} -OPTIONS= MYSQL "With MySQL Driver" on \ +OPTIONS= MYSQL "With MySQL Driver" on \ MSQL "With MSQL Driver" off \ - PGSQL "With PostgreSQL Driver" on \ - SQLITE3 "With SQLite 3 Driver" on \ + PGSQL "With PostgreSQL Driver" on \ SQLITE2 "With SQLite 2 Driver" off \ - FIREBIRD "With Firebird Driver" off + SQLITE3 "With SQLite 3 Driver" on \ + FIREBIRD "With Firebird Driver" off \ + FREETDS "With FreeTDS Driver" off .include <bsd.port.pre.mk> .if defined(WITHOUT_MYSQL) && defined(WITHOUT_MSQL) && defined(WITHOUT_PGSQL) \ - && defined(WITHOUT_SQLITE2) && defined(WITHOUT_SQLITE3) && defined(WITHOUT_FIREBIRD) + && defined(WITHOUT_SQLITE2) && defined(WITHOUT_SQLITE3) \ + && defined(WITHOUT_FIREBIRD) && defined(WITHOUT_FREETDS) IGNORE= You must choose at least one driver .endif -.if defined(WITH_MYSQL) +.if !defined(WITHOUT_MYSQL) USE_MYSQL= yes CONFIGURE_ARGS+= --with-mysql PLIST_SUB+= MYSQL="" @@ -54,7 +55,7 @@ PLIST_SUB+= MSQL="" PLIST_SUB+= MSQL="@comment " .endif -.if defined(WITH_PGSQL) +.if !defined(WITHOUT_PGSQL) USE_PGSQL= yes CONFIGURE_ARGS+= --with-pgsql PLIST_SUB+= PGSQL="" @@ -70,7 +71,7 @@ PLIST_SUB+= SQLITE2="" PLIST_SUB+= SQLITE2="@comment " .endif -.if defined(WITH_SQLITE3) +.if !defined(WITHOUT_SQLITE3) LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 CONFIGURE_ARGS+= --with-sqlite3 PLIST_SUB+= SQLITE3="" @@ -86,6 +87,14 @@ PLIST_SUB+= FIREBIRD="" PLIST_SUB+= FIREBIRD="@comment " .endif +.if defined(WITH_FREETDS) +LIB_DEPENDS+= tds.4:${PORTSDIR}/databases/freetds +CONFIGURE_ARGS+= --with-freetds +PLIST_SUB+= FREETDS="" +.else +PLIST_SUB+= FREETDS="@comment " +.endif + post-patch: @${REINPLACE_CMD} -e 's|-O20|${CFLAGS}|g' ${WRKSRC}/configure diff --git a/databases/libdbi-drivers/distinfo b/databases/libdbi-drivers/distinfo index 3b29c09b5f75..1e691b961db9 100644 --- a/databases/libdbi-drivers/distinfo +++ b/databases/libdbi-drivers/distinfo @@ -1,2 +1,2 @@ -MD5 (libdbi-drivers-0.8.0.tar.gz) = cac2d09b90d2c58b01425d5e855f5499 -SIZE (libdbi-drivers-0.8.0.tar.gz) = 1115598 +MD5 (libdbi-drivers-0.8.1.tar.gz) = bca4dd6184e3e78676c35eb9a7ae1186 +SIZE (libdbi-drivers-0.8.1.tar.gz) = 1147446 diff --git a/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in b/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in new file mode 100644 index 000000000000..2511c1057496 --- /dev/null +++ b/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in @@ -0,0 +1,11 @@ +--- drivers/freetds/Makefile.in.orig Sat Oct 1 23:09:48 2005 ++++ drivers/freetds/Makefile.in Sat Oct 1 23:09:56 2005 +@@ -227,7 +227,7 @@ + # for each driver + @HAVE_FREETDS_TRUE@docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) + @HAVE_FREETDS_FALSE@htmldir = +-@HAVE_FREETDS_TRUE@htmldir = $(docdir)dbd_freetds ++@HAVE_FREETDS_TRUE@htmldir = $(docdir)/dbd_freetds + @HAVE_FREETDS_FALSE@freetds_ltlibs = + #doc_DATA = dbd_freetds.pdf + #html_DATA = dbd_freetds/* diff --git a/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c b/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c new file mode 100644 index 000000000000..3c2e0f098d03 --- /dev/null +++ b/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c @@ -0,0 +1,66 @@ +--- drivers/freetds/dbd_freetds.c.orig Thu Sep 8 16:41:25 2005 ++++ drivers/freetds/dbd_freetds.c Sat Oct 1 23:34:11 2005 +@@ -453,6 +453,7 @@ + { + dbi_result_t *res; + char *sql_cmd; ++ char *current_db = NULL; + + if (db == NULL || db[0] == '\0') { + /* Use current database */ +@@ -460,7 +461,6 @@ + return res; + } + +- char *current_db = NULL; + if (conn->current_db) + /* Reserved current DB name */ + current_db = strdup(conn->current_db); +@@ -508,9 +508,9 @@ + { + /* foo's -> 'foo''s' */ + size_t len; ++ const char *escaped = "\'"; + + strcpy(dest, "\'"); +- const char *escaped = "\'"; + + len = _dbd_freetds_escape_chars(dest + 1, orig, strlen(orig), escaped); + +@@ -559,6 +559,8 @@ + * everything else will be filled in by DBI */ + + unsigned int idx = 0; ++ unsigned short type = 0; ++ unsigned int attribs = 0; + dbi_result_t *result = NULL; + dbi_row_t *row = NULL; + FREETDSCON *tdscon = (FREETDSCON *) conn->connection; +@@ -628,9 +630,6 @@ + return NULL; + } + +- unsigned short type = 0; +- unsigned int attribs = 0; +- + _translate_freetds_type(datafmt[idx], &type, &attribs); + /* Fill fields value in result */ + _dbd_result_add_field(result, idx, datafmt[idx]->name, type, attribs); +@@ -884,6 +883,7 @@ + dbi_row_t *row = NULL; + unsigned int idx = 0; + void *addr = NULL; ++ char **orig; + + FREETDSCON *tdscon = (FREETDSCON *) conn->connection; + +@@ -911,8 +911,7 @@ + dstfmt.format = CS_FMT_UNUSED; + + addr = malloc(sizeof(CS_NUMERIC_TYPE)); +- char **orig = +- &(result->rows[result->numrows_matched]->field_values[idx].d_string); ++ orig = &(result->rows[result->numrows_matched]->field_values[idx].d_string); + + if (cs_convert(tdscon->ctx, datafmt[idx], *orig, &dstfmt, addr, NULL) != + CS_SUCCEED) { diff --git a/databases/libdbi-drivers/pkg-plist b/databases/libdbi-drivers/pkg-plist index 826fe979d6b1..d5dce76742ec 100644 --- a/databases/libdbi-drivers/pkg-plist +++ b/databases/libdbi-drivers/pkg-plist @@ -3,6 +3,7 @@ %%SQLITE2%%lib/dbd/libsqlite.so %%SQLITE3%%lib/dbd/libsqlite3.so %%FIREBIRD%%lib/dbd/libfirebird.so +%%FREETDS%%lib/dbd/libfreetds.so @unexec rmdir %D/lib/dbd 2>/dev/null || true %%MYSQL%%%%DOCSDIR%%/dbd_mysql.pdf %%MYSQL%%%%DOCSDIR%%/dbd_mysql/c136.html @@ -25,29 +26,30 @@ %%PGSQL%%%%DOCSDIR%%/dbd_pgsql/options.html %%PGSQL%%%%DOCSDIR%%/dbd_pgsql/specific.html %%SQLITE2%%%%DOCSDIR%%/dbd_sqlite.pdf -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c101.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c122.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c35.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c46.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/f24.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x125.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x201.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x49.html -%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x63.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c118.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c26.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c37.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/c92.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/f15.html %%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/index.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x121.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x197.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x40.html +%%SQLITE2%%%%DOCSDIR%%/dbd_sqlite/x54.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3.pdf -%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/c115.html +%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/c120.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/c26.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/c39.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/c94.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/f15.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/index.html -%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x118.html -%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x190.html +%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x123.html +%%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x195.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x42.html %%SQLITE3%%%%DOCSDIR%%/dbd_sqlite3/x56.html %%MYSQL%%@dirrm %%DOCSDIR%%/dbd_mysql %%PGSQL%%@dirrm %%DOCSDIR%%/dbd_pgsql %%SQLITE2%%@dirrm %%DOCSDIR%%/dbd_sqlite %%SQLITE3%%@dirrm %%DOCSDIR%%/dbd_sqlite3 +%%FREETDS%%@dirrm %%DOCSDIR%%/dbd_freetds @unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true |