diff --git a/databases/libodbc++/Makefile b/databases/libodbc++/Makefile index 84fb87c37b0b..4e8c49014671 100644 --- a/databases/libodbc++/Makefile +++ b/databases/libodbc++/Makefile @@ -7,7 +7,7 @@ PORTNAME= libodbc++ PORTVERSION= 0.2.3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= databases devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= libodbcxx @@ -40,8 +40,6 @@ CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE} .elif defined(WITH_UNIXODBC) LIB_DEPENDS= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc=${LOCALBASE} - -BROKEN= does not compile .endif DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION} diff --git a/databases/mysql-connector-odbc/Makefile b/databases/mysql-connector-odbc/Makefile index 6b74caa0815c..8d66f8f52217 100644 --- a/databases/mysql-connector-odbc/Makefile +++ b/databases/mysql-connector-odbc/Makefile @@ -8,7 +8,7 @@ PORTNAME= mysql-connector-odbc PORTVERSION= 3.51.26 DISTVERSIONSUFFIX= r1127 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= Connector-ODBC/3.51 @@ -45,9 +45,8 @@ WITH_UNIXODBC?= yes .endif .if defined(WITH_UNIXODBC) -BROKEN= does not compile - LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/odbc.ini \ --with-unixODBC=${LOCALBASE} CFLAGS+= ${PTHREAD_LIBS} diff --git a/databases/mysql-connector-odbc/files/patch-driver_myutil.h b/databases/mysql-connector-odbc/files/patch-driver_myutil.h index f1511754f08e..f6b648e76135 100644 --- a/databases/mysql-connector-odbc/files/patch-driver_myutil.h +++ b/databases/mysql-connector-odbc/files/patch-driver_myutil.h @@ -3,8 +3,9 @@ @@ -174,7 +174,7 @@ SQLLEN *pcbValue); SQLRETURN SQL_API my_SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType, - SQLROWOFFSET irow, SQLULEN *pcrow, +- SQLROWOFFSET irow, SQLULEN *pcrow, - SQLUSMALLINT FAR *rgfRowStatus, bool upd_status); ++ SQLLEN irow, SQLULEN *pcrow, + SQLUSMALLINT FAR *rgfRowStatus, my_bool upd_status); SQLRETURN copy_stmt_error(STMT FAR *src, STMT FAR *dst); int unireg_to_c_datatype(MYSQL_FIELD *field); diff --git a/databases/mysql-connector-odbc/files/patch-driver_results.c b/databases/mysql-connector-odbc/files/patch-driver_results.c index fa6b4e9ab290..869465e8940f 100644 --- a/databases/mysql-connector-odbc/files/patch-driver_results.c +++ b/databases/mysql-connector-odbc/files/patch-driver_results.c @@ -1,7 +1,11 @@ ---- driver/results.c.orig 2008-04-11 01:58:44.000000000 -0800 -+++ driver/results.c 2009-01-08 11:46:27.000000000 -0900 -@@ -1248,7 +1248,7 @@ - SQLROWOFFSET irow, +--- driver/results.c.orig 2008-04-11 16:58:44.000000000 +0700 ++++ driver/results.c 2009-01-27 00:01:01.000000000 +0600 +@@ -1245,10 +1245,10 @@ + */ + SQLRETURN SQL_API my_SQLExtendedFetch( SQLHSTMT hstmt, + SQLUSMALLINT fFetchType, +- SQLROWOFFSET irow, ++ SQLLEN irow, SQLULEN *pcrow, SQLUSMALLINT FAR *rgfRowStatus, - bool upd_status ) @@ -9,3 +13,26 @@ { ulong rows_to_fetch; long cur_row, max_row; +@@ -1511,19 +1511,16 @@ + + SQLRETURN SQL_API SQLExtendedFetch( SQLHSTMT hstmt, + SQLUSMALLINT fFetchType, +- SQLROWOFFSET irow, +- SQLROWSETSIZE *pcrow, ++ SQLLEN irow, ++ SQLULEN *pcrow, + SQLUSMALLINT FAR *rgfRowStatus ) + { + SQLRETURN rc; +- SQLULEN rows; + STMT_OPTIONS *options= &((STMT FAR *)hstmt)->stmt_options; + + options->rowStatusPtr_ex= rgfRowStatus; + +- rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, &rows, rgfRowStatus, 1); +- if (pcrow) +- *pcrow= (SQLROWSETSIZE)rows; ++ rc= my_SQLExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 1); + + return rc; + } diff --git a/databases/mysql-connector-odbc/files/patch-driver_utility.c b/databases/mysql-connector-odbc/files/patch-driver_utility.c new file mode 100644 index 000000000000..1276118e6441 --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-driver_utility.c @@ -0,0 +1,38 @@ +--- driver/utility.c.orig 2009-01-27 00:14:43.000000000 +0600 ++++ driver/utility.c 2009-01-27 00:15:46.000000000 +0600 +@@ -504,11 +504,6 @@ + + return field_is_binary ? SQL_BINARY : SQL_CHAR; + +- /* +- MYSQL_TYPE_VARCHAR is never actually sent, this just silences +- a compiler warning. +- */ +- case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_VAR_STRING: + if (buff) + (void)strmov(buff, field_is_binary ? "varbinary" : "varchar"); +@@ -657,7 +652,6 @@ + + case MYSQL_TYPE_ENUM: + case MYSQL_TYPE_SET: +- case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_TINY_BLOB: +@@ -783,7 +777,6 @@ + + case MYSQL_TYPE_ENUM: + case MYSQL_TYPE_SET: +- case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_TINY_BLOB: +@@ -867,7 +860,6 @@ + + case MYSQL_TYPE_ENUM: + case MYSQL_TYPE_SET: +- case MYSQL_TYPE_VARCHAR: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_TINY_BLOB: diff --git a/databases/postgresql-odbc/Makefile b/databases/postgresql-odbc/Makefile index 536753a748af..f3f2c4d00b54 100644 --- a/databases/postgresql-odbc/Makefile +++ b/databases/postgresql-odbc/Makefile @@ -21,6 +21,7 @@ PORTNAME= postgresql PORTVERSION= 08.03.0400 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_PGSQL} MASTER_SITE_SUBDIR= odbc/versions/src @@ -43,9 +44,8 @@ WITH_UNIXODBC= yes .if defined(WITH_UNIXODBC) # I.e. even if WITH_IODBC is defined LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +BUILD_DEPENDS+= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-unixodbc=${LOCALBASE} - -BROKEN= does not compile .else LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+= --with-iodbc=${LOCALBASE} diff --git a/databases/postgresql-odbc/files/patch-odbcapi.c b/databases/postgresql-odbc/files/patch-odbcapi.c new file mode 100644 index 000000000000..b7675e5b93bf --- /dev/null +++ b/databases/postgresql-odbc/files/patch-odbcapi.c @@ -0,0 +1,32 @@ +--- odbcapi.c.orig 2009-01-26 23:29:21.000000000 +0600 ++++ odbcapi.c 2009-01-26 23:30:15.000000000 +0600 +@@ -1111,11 +1111,7 @@ + HSTMT hstmt, + SQLUSMALLINT fFetchType, + SQLLEN irow, +-#ifdef WITH_UNIXODBC +- SQLROWSETSIZE *pcrow, +-#else + SQLULEN *pcrow, +-#endif /* WITH_UNIXODBC */ + SQLUSMALLINT *rgfRowStatus) + { + RETCODE ret; +@@ -1125,17 +1121,7 @@ + ENTER_STMT_CS(stmt); + SC_clear_error(stmt); + StartRollbackState(stmt); +-#ifdef WITH_UNIXODBC +- { +- SQLULEN retrieved; +- +- ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, &retrieved, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2); +- if (pcrow) +- *pcrow = retrieved; +- } +-#else + ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2); +-#endif /* WITH_UNIXODBC */ + stmt->transition_status = STMT_TRANSITION_EXTENDED_FETCH; + ret = DiscardStatementSvp(stmt, ret, FALSE); + LEAVE_STMT_CS(stmt); diff --git a/databases/postgresql-odbc/files/patch-odbcapi30.c b/databases/postgresql-odbc/files/patch-odbcapi30.c new file mode 100644 index 000000000000..58d277bdffd6 --- /dev/null +++ b/databases/postgresql-odbc/files/patch-odbcapi30.c @@ -0,0 +1,13 @@ +--- odbcapi30.c.orig 2009-01-26 23:20:59.000000000 +0600 ++++ odbcapi30.c 2009-01-26 23:21:47.000000000 +0600 +@@ -118,9 +118,7 @@ + SQLPOINTER CharacterAttribute, + SQLSMALLINT BufferLength, + SQLSMALLINT *StringLength, +-#if defined(_WIN64) +- SQLLEN *NumericAttribute +-#elif defined(WITH_UNIXODBC) || defined(WIN32) ++#if defined(WIN32) + SQLPOINTER NumericAttribute + #else + SQLLEN *NumericAttribute diff --git a/databases/postgresql-odbc/files/patch-odbcapi30w.c b/databases/postgresql-odbc/files/patch-odbcapi30w.c new file mode 100644 index 000000000000..65e83482a4b5 --- /dev/null +++ b/databases/postgresql-odbc/files/patch-odbcapi30w.c @@ -0,0 +1,11 @@ +--- odbcapi30w.c.orig 2009-01-26 23:23:19.000000000 +0600 ++++ odbcapi30w.c 2009-01-26 23:24:07.000000000 +0600 +@@ -255,7 +255,7 @@ + SQLPOINTER pCharAttr, + SQLSMALLINT cbCharAttrMax, + SQLSMALLINT *pcbCharAttr, +-#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64)) ++#if defined(WIN32) + SQLPOINTER pNumAttr + #else + SQLLEN *pNumAttr diff --git a/databases/postgresql-odbc/files/patch-psqlodbc.h b/databases/postgresql-odbc/files/patch-psqlodbc.h new file mode 100644 index 000000000000..648746558d9a --- /dev/null +++ b/databases/postgresql-odbc/files/patch-psqlodbc.h @@ -0,0 +1,16 @@ +--- psqlodbc.h.orig 2008-09-21 22:35:44.000000000 +0700 ++++ psqlodbc.h 2009-01-26 23:19:02.000000000 +0600 +@@ -140,13 +140,8 @@ + #if (SIZEOF_VOID_P == 8) + #define FORMAT_INTEGER "%d" /* SQLINTEGER */ + #define FORMAT_UINTEGER "%u" /* SQLUINTEGER */ +-#if defined(WITH_UNIXODBC) && !defined(BUILD_REAL_64_BIT_MODE) +-#define FORMAT_LEN "%d" /* SQLLEN */ +-#define FORMAT_ULEN "%u" /* SQLULEN */ +-#else + #define FORMAT_LEN "%ld" /* SQLLEN */ + #define FORMAT_ULEN "%lu" /* SQLULEN */ +-#endif /* WITH_UNIXODBC */ + #else + #define FORMAT_LEN "%ld" /* SQLLEN */ + #define FORMAT_ULEN "%lu" /* SQLULEN */ diff --git a/databases/qt-odbc-plugin/Makefile b/databases/qt-odbc-plugin/Makefile index 1e1e53296ea4..d38c05c6b2f0 100644 --- a/databases/qt-odbc-plugin/Makefile +++ b/databases/qt-odbc-plugin/Makefile @@ -8,7 +8,7 @@ PORTNAME= qt-${DB}-plugin PORTVERSION= 3.3.8 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_QT} DISTNAME= qt-x11-free-${PORTVERSION} @@ -25,6 +25,7 @@ BROKEN= does not compile LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC \ qt-mt:${PORTSDIR}/x11-toolkits/qt33 +BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC USE_BZIP2= yes PLUGIN= plugins/src/sqldrivers/${DB} diff --git a/databases/qt-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp b/databases/qt-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp new file mode 100644 index 000000000000..bb07b52f8acc --- /dev/null +++ b/databases/qt-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp @@ -0,0 +1,21 @@ +--- src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-01-26 23:43:41.000000000 +0600 ++++ src/sql/drivers/odbc/qsql_odbc.cpp 2009-01-26 23:43:53.000000000 +0600 +@@ -57,18 +57,8 @@ + #endif + + // newer platform SDKs use SQLLEN instead of SQLINTEGER +-#ifdef SQLLEN + # define QSQLLEN SQLLEN +-#else +-# define QSQLLEN SQLINTEGER +-#endif +- +-#ifdef SQLULEN + # define QSQLULEN SQLULEN +-#else +-# define QSQLULEN SQLUINTEGER +-#endif +- + + static const QSQLLEN COLNAMESIZE = 256; + //Map Qt parameter types to ODBC types diff --git a/databases/qt4-odbc-plugin/Makefile b/databases/qt4-odbc-plugin/Makefile index 32cd7558b22f..8e698e6e0c07 100644 --- a/databases/qt4-odbc-plugin/Makefile +++ b/databases/qt4-odbc-plugin/Makefile @@ -8,6 +8,7 @@ PORTNAME= qt4-${DB}-plugin PORTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_QT} DISTNAME= qt-x11-opensource-src-${PORTVERSION} @@ -19,8 +20,7 @@ COMMENT= Qt ODBC database plugin DB= odbc LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC - -BROKEN= does not compile +BUILD_DEPENDS= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC USE_QT_VER= 4 QT_COMPONENTS= moc_build sql diff --git a/databases/qt4-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp b/databases/qt4-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp new file mode 100644 index 000000000000..9f1d284aa97a --- /dev/null +++ b/databases/qt4-odbc-plugin/files/patch-src-sql-drivers-odbc-qsql_odbc.cpp @@ -0,0 +1,20 @@ +--- src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-01-27 00:11:47.000000000 +0600 ++++ src/sql/drivers/odbc/qsql_odbc.cpp 2009-01-27 00:12:12.000000000 +0600 +@@ -64,17 +64,8 @@ + #endif + + // newer platform SDKs use SQLLEN instead of SQLINTEGER +-#if defined(SQLLEN) || defined(Q_OS_WIN64) + # define QSQLLEN SQLLEN +-#else +-# define QSQLLEN SQLINTEGER +-#endif +- +-#if defined(SQLULEN) || defined(Q_OS_WIN64) + # define QSQLULEN SQLULEN +-#else +-# define QSQLULEN SQLUINTEGER +-#endif + + static const int COLNAMESIZE = 256; + //Map Qt parameter types to ODBC types