diff options
author | mnag <mnag@FreeBSD.org> | 2006-01-18 04:50:46 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2006-01-18 04:50:46 +0800 |
commit | 20320915d093edb996783a14ed17aaddcd55089b (patch) | |
tree | ac6b65208c5f772c9405b9eadae417d515c1937a /databases/mysql-connector-odbc | |
parent | 9f009641b6e55ef39e74bd7992eb296923c564aa (diff) | |
download | freebsd-ports-gnome-20320915d093edb996783a14ed17aaddcd55089b.tar.gz freebsd-ports-gnome-20320915d093edb996783a14ed17aaddcd55089b.tar.zst freebsd-ports-gnome-20320915d093edb996783a14ed17aaddcd55089b.zip |
Move databases/myodbc -> databases/mysql-connector-odbc
* MOVED
Added antry about move
* databases/Makefile
Remove databases/myodbc
Add databases/mysql-connector-odbc
* databases/myodbc
Removed
* databases/mysql-connector-odbc
Update to 3.51.12
Reorganize Makefile
Now default DRIVER_MANAGER is unixodbc
PR: 89939
Submitted by: Sergey Prikhodko <sergey@network-asp.biz> (maintainer)
Repocopy by: marcus
Diffstat (limited to 'databases/mysql-connector-odbc')
11 files changed, 132 insertions, 56 deletions
diff --git a/databases/mysql-connector-odbc/Makefile b/databases/mysql-connector-odbc/Makefile index 58538d79840e..067a27e11b7c 100644 --- a/databases/mysql-connector-odbc/Makefile +++ b/databases/mysql-connector-odbc/Makefile @@ -5,73 +5,72 @@ # $FreeBSD$ # -PORTNAME= myodbc -PORTVERSION= 3.51.11 +PORTNAME= mysql-connector-odbc +PORTVERSION= 3.51.12 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} -MASTER_SITE_SUBDIR=MyODBC3 -DISTNAME= MyODBC-${PORTVERSION} +MASTER_SITE_SUBDIR= MyODBC3 +PKGNAMESUFFIX= -${DRIVER_MANAGER}-mysql${MYSQL_VER} MAINTAINER= sergey@network-asp.biz -COMMENT= ODBC driver for MySQL +COMMENT= ODBC driver for MySQL${MYSQL_VER} / ${DRIVER_MANAGER} USE_MYSQL= yes -USE_GMAKE= yes -USE_AUTOTOOLS= libtool:13 -INSTALLS_SHLIB= yes -CONFIGURE_ARGS+= --with-mysql-path=${LOCALBASE} --without-samples \ - --disable-gui --enable-test=no +BROKEN_WITH_MYSQL= 323 + +USE_REINOPLACE= yes +USE_GMAKE= yes +USE_AUTOTOOLS= libtool:15 libltdl:15 +INSTALLS_SHLIB= yes +CFLAGS= -L${LOCALBASE}/lib +LDFLAGS= -L${LOCALBASE}/lib +CONFIGURE_ARGS= --with-mysql-path=${LOCALBASE} --without-samples \ + --disable-gui --enable-test=no + +PLIST_SUB= VER=${PORTVERSION} PORTDOCS= README # MyODBC needs an ODBC driver manager to be installed, and it supports both # iODBC and unixODBC. The following variable may be set at built-time to # either "iodbc" or "unixodbc", with the former being the default: -DRIVER_MANAGER?= iodbc +DRIVER_MANAGER?= unixodbc -CONFIGURE_ARGS+= .if ${DRIVER_MANAGER} == "unixodbc" +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/odbc.ini \ --with-unixODBC=${LOCALBASE} -LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +CFLAGS+= ${PTHREAD_LIBS} .else # assume we're using iodbc LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc -EXTRA_PATCHES= ${PATCHDIR}/myodbc-iodbc-patch CONFIGURE_ARGS+= --with-iODBC=${LOCALBASE} \ --with-iodbc-includes=${LOCALBASE}/include \ --with-iodbc-libs=${LOCALBASE}/lib \ --with-odbc-ini=${LOCALBASE}/etc/libiodbc/odbc.ini +EXTRA_PATCHES= ${PATCHDIR}/myodbc-iodbc-patch .endif -PKGNAMESUFFIX= -${DRIVER_MANAGER}-mysql${MYSQL_VER} -COMMENT+= ${MYSQL_VER} / ${DRIVER_MANAGER} - -.include <bsd.port.pre.mk> - -.if ${ARCH} != "i386" && ${OSVERSION} >= 503000 -BROKEN= "Does not compile on FreeBSD >=5.x on !i386" -.endif - +post-patch: # Allow a new value of ODBCVER to be set at build-time .if defined(ODBCVER) -post-patch: - cd ${WRKSRC}; \ - ${MV} myodbc.h myodbc.h.orig; \ - ${SED} -e "s/ODBCVER 0x0250/ODBCVER ${ODBCVER}/" < myodbc.h.orig > myodbc.h + @${REINPLACE_CMD} -e "s|ODBCVER 0x0250|ODBCVER ${ODBCVER}|" ${WRKSRC}/myodbc.h .endif # XXX untested .if defined(STATIC) -CONFIGURE_ARGS+= --enable-shared=no \ - --enable-static=yes +CONFIGURE_ARGS+= --enable-shared=no --enable-static=yes .endif post-install: .if !defined(NOPORTDOCS) - @ ${MKDIR} ${DOCSDIR} - @ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif +.if !exists(${PREFIX}/lib/libmyodbc3.so.0) + @${LN} -s ${PREFIX}/lib/libmyodbc3-${PORTVERSION}.so ${PREFIX}/lib/libmyodbc3.so.0 +.endif +.if !exists(${PREFIX}/lib/libmyodbc3_r.so.0) + @${LN} -s ${PREFIX}/lib/libmyodbc3_r-${PORTVERSION}.so ${PREFIX}/lib/libmyodbc3_r.so.0 .endif - [ -f ${PREFIX}/lib/libmyodbc3.so.0 ] || ${LN} -s ${PREFIX}/lib/libmyodbc3.so ${PREFIX}/lib/libmyodbc3.so.0 - [ -f ${PREFIX}/lib/libmyodbc3_r.so.0 ] || ${LN} -s ${PREFIX}/lib/libmyodbc3_r.so ${PREFIX}/lib/libmyodbc3_r.so.0 -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/databases/mysql-connector-odbc/distinfo b/databases/mysql-connector-odbc/distinfo index 5e2483ae57d9..1c2376557dfa 100644 --- a/databases/mysql-connector-odbc/distinfo +++ b/databases/mysql-connector-odbc/distinfo @@ -1,2 +1,3 @@ -MD5 (MyODBC-3.51.11.tar.gz) = fb295a2a07dab09caf608f2227b531ef -SIZE (MyODBC-3.51.11.tar.gz) = 971989 +MD5 (mysql-connector-odbc-3.51.12.tar.gz) = a484f590464fb823a8f821b2f1fd7fef +SHA256 (mysql-connector-odbc-3.51.12.tar.gz) = 7a9c19bd4ee140e7afe77fdcaecee53b4ce4bbbeb35a158c9548aa7ab9482c74 +SIZE (mysql-connector-odbc-3.51.12.tar.gz) = 979942 diff --git a/databases/mysql-connector-odbc/files/myodbc-iodbc-patch b/databases/mysql-connector-odbc/files/myodbc-iodbc-patch index bdb641e84a0d..a96f83af97d2 100644 --- a/databases/mysql-connector-odbc/files/myodbc-iodbc-patch +++ b/databases/mysql-connector-odbc/files/myodbc-iodbc-patch @@ -1,11 +1,11 @@ ---- driver/results.c.orig Sun Feb 27 00:59:11 2005 -+++ driver/results.c Sun Feb 27 00:59:19 2005 -@@ -544,7 +544,7 @@ - SQLPOINTER CharacterAttributePtr, - SQLSMALLINT BufferLength, - SQLSMALLINT *StringLengthPtr, -- SQLPOINTER NumericAttributePtr) -+ SQLLEN * NumericAttributePtr) +--- driver/results.c.orig Sun Oct 9 22:33:40 2005 ++++ driver/results.c Thu Oct 27 16:30:17 2005 +@@ -558,7 +558,7 @@ + SQLPOINTER CharacterAttributePtr, + SQLSMALLINT BufferLength, + SQLSMALLINT *StringLengthPtr, +- SQLPOINTER NumericAttributePtr ) ++ SQLLEN *NumericAttributePtr ) + #endif { - return get_col_attr(StatementHandle, ColumnNumber, - FieldIdentifier, CharacterAttributePtr, + return get_col_attr( StatementHandle, diff --git a/databases/mysql-connector-odbc/files/patch-configure b/databases/mysql-connector-odbc/files/patch-configure new file mode 100644 index 000000000000..0670e2b213ef --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-configure @@ -0,0 +1,19 @@ +--- configure.orig Sat Oct 29 20:43:26 2005 ++++ configure Sat Oct 29 21:00:14 2005 +@@ -1650,11 +1650,11 @@ + + # The aliases save the names the user supplied, while $host etc. + # will get canonicalized. +-test -n "$target_alias" && +- test "$program_prefix$program_suffix$program_transform_name" = \ +- NONENONEs,x,x, && +- program_prefix=${target_alias}- +-am__api_version="1.9" ++# test -n "$target_alias" && ++# test "$program_prefix$program_suffix$program_transform_name" = \ ++# NONENONEs,x,x, && ++# program_prefix=${target_alias}- ++# am__api_version="1.9" + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or + # incompatible versions: diff --git a/databases/mysql-connector-odbc/files/patch-driver__connect.c b/databases/mysql-connector-odbc/files/patch-driver__connect.c new file mode 100644 index 000000000000..d0b493d5e674 --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-driver__connect.c @@ -0,0 +1,14 @@ +--- driver/connect.c.orig Sun Oct 9 22:33:40 2005 ++++ driver/connect.c Thu Oct 27 16:44:37 2005 +@@ -141,8 +141,10 @@ + client_flag |= CLIENT_COMPRESS; + if (option_flag & FLAG_IGNORE_SPACE) + client_flag |= CLIENT_IGNORE_SPACE; +- ++ ++#ifdef CLIENT_MULTI_RESULTS + client_flag |= CLIENT_MULTI_RESULTS; ++#endif + #ifdef __WIN__ + if (option_flag & FLAG_NAMED_PIPE) + mysql_options(mysql,MYSQL_OPT_NAMED_PIPE,NullS); diff --git a/databases/mysql-connector-odbc/files/patch-driver__myodbc3.h b/databases/mysql-connector-odbc/files/patch-driver__myodbc3.h new file mode 100644 index 000000000000..6440ea8a2433 --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-driver__myodbc3.h @@ -0,0 +1,15 @@ +--- driver/myodbc3.h.orig Sun Oct 9 22:33:40 2005 ++++ driver/myodbc3.h Thu Oct 27 16:16:05 2005 +@@ -101,7 +101,12 @@ + #include <ltdl.h> + #include <sql.h> + #include <sqlext.h> ++ ++# if defined(HAVE_IODBCINST_H) ++#include <iodbcinst.h> ++#elif defined(HAVE_ODBCINST_H) + #include <odbcinst.h> ++# endif + + #ifndef SYSTEM_ODBC_INI + #define BOTH_ODBC_INI ODBC_BOTH_DSN diff --git a/databases/mysql-connector-odbc/files/patch-myodbcinst__myodbcinst.c b/databases/mysql-connector-odbc/files/patch-myodbcinst__myodbcinst.c new file mode 100644 index 000000000000..7f20ed71147f --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-myodbcinst__myodbcinst.c @@ -0,0 +1,14 @@ +--- myodbcinst/myodbcinst.c.orig Mon Oct 10 05:49:47 2005 ++++ myodbcinst/myodbcinst.c Thu Oct 27 16:33:29 2005 +@@ -56,7 +56,11 @@ + #include <ltdl.h> + #endif + ++# if defined(HAVE_IODBCINST_H) ++#include <iodbcinst.h> ++#elif defined(HAVE_ODBCINST_H) + #include <odbcinst.h> ++# endif + + #include "../util/MYODBCUtil.h" + diff --git a/databases/mysql-connector-odbc/files/patch-strndup b/databases/mysql-connector-odbc/files/patch-strndup index 637906a4d474..bf424d5d5df6 100644 --- a/databases/mysql-connector-odbc/files/patch-strndup +++ b/databases/mysql-connector-odbc/files/patch-strndup @@ -1,11 +1,11 @@ ---- util/MYODBCUtilReadDataSourceStr.c.orig Wed Feb 2 05:01:28 2005 -+++ util/MYODBCUtilReadDataSourceStr.c Sat Mar 5 02:05:08 2005 +--- util/MYODBCUtilReadDataSourceStr.c.orig Sun Oct 9 22:33:40 2005 ++++ util/MYODBCUtilReadDataSourceStr.c Thu Oct 27 16:35:43 2005 @@ -20,7 +20,7 @@ #include "MYODBCUtil.h" --#if defined(__APPLE__) || defined(WIN32) || defined(__SPARC__) -+#if defined(__APPLE__) || defined(WIN32) || defined(__SPARC__) || defined(__FreeBSD__) +-#if defined(__APPLE__) || defined(WIN32) || defined(__sparc) ++#if defined(__APPLE__) || defined(WIN32) || defined(__sparc) || defined(__FreeBSD__) char *strndup( const char *s, size_t n ) { size_t nAvail; diff --git a/databases/mysql-connector-odbc/files/patch-util__MYODBCUtil.h b/databases/mysql-connector-odbc/files/patch-util__MYODBCUtil.h new file mode 100644 index 000000000000..09de6e39a079 --- /dev/null +++ b/databases/mysql-connector-odbc/files/patch-util__MYODBCUtil.h @@ -0,0 +1,14 @@ +--- util/MYODBCUtil.h.orig Sun Oct 9 22:33:40 2005 ++++ util/MYODBCUtil.h Thu Oct 27 16:13:47 2005 +@@ -40,7 +40,11 @@ + #include <sqlext.h> + #endif + ++# if defined(HAVE_IODBCINST_H) ++#include <iodbcinst.h> ++#elif defined(HAVE_ODBCINST_H) + #include <odbcinst.h> ++# endif + + /* + Handle case on OSX where we want to use GetPrivateProfileString (because it diff --git a/databases/mysql-connector-odbc/pkg-descr b/databases/mysql-connector-odbc/pkg-descr index 611162a7817d..43bb7c929332 100644 --- a/databases/mysql-connector-odbc/pkg-descr +++ b/databases/mysql-connector-odbc/pkg-descr @@ -1,4 +1,4 @@ -MyODBC is an ODBC driver for interfacing to MySQL databases. +MySQL Connector ODBC is an ODBC driver for interfacing to MySQL databases. -- Erik H. Bakke +Author: Erik H. Bakke WWW: http://www.mysql.com/ diff --git a/databases/mysql-connector-odbc/pkg-plist b/databases/mysql-connector-odbc/pkg-plist index dc8498288a61..36312c07258d 100644 --- a/databases/mysql-connector-odbc/pkg-plist +++ b/databases/mysql-connector-odbc/pkg-plist @@ -1,10 +1,10 @@ -lib/libmyodbc3-3.51.11.so +bin/myodbc3m +bin/myodbc3i +lib/libmyodbc3-%%VER%%.so lib/libmyodbc3.a -lib/libmyodbc3.la lib/libmyodbc3.so lib/libmyodbc3.so.0 -lib/libmyodbc3_r-3.51.11.so +lib/libmyodbc3_r-%%VER%%.so lib/libmyodbc3_r.a -lib/libmyodbc3_r.la lib/libmyodbc3_r.so lib/libmyodbc3_r.so.0 |