diff options
author | ale <ale@FreeBSD.org> | 2011-04-26 20:05:57 +0800 |
---|---|---|
committer | ale <ale@FreeBSD.org> | 2011-04-26 20:05:57 +0800 |
commit | 58445fd0953a3616fb476e94d14eec68d7513d7b (patch) | |
tree | 759cd9a2ddfd3416bea9a1a79e7bed5488867ba3 | |
parent | 099ad65571522c74c821096fedc9e656bf65d959 (diff) | |
download | freebsd-ports-gnome-58445fd0953a3616fb476e94d14eec68d7513d7b.tar.gz freebsd-ports-gnome-58445fd0953a3616fb476e94d14eec68d7513d7b.tar.zst freebsd-ports-gnome-58445fd0953a3616fb476e94d14eec68d7513d7b.zip |
Add support for iODBC (in addition to [default] unixODBC) in php5-odbc and
php-pdo_odbc extensions.
PR: ports/156564
Submitted by: gahr
-rw-r--r-- | databases/php5-odbc/files/patch-config.m4 | 37 | ||||
-rw-r--r-- | lang/php5-extensions/Makefile | 2 | ||||
-rw-r--r-- | lang/php5/Makefile.ext | 32 | ||||
-rw-r--r-- | lang/php53/Makefile.ext | 32 |
4 files changed, 76 insertions, 27 deletions
diff --git a/databases/php5-odbc/files/patch-config.m4 b/databases/php5-odbc/files/patch-config.m4 index 97178e4029c7..c809732b1047 100644 --- a/databases/php5-odbc/files/patch-config.m4 +++ b/databases/php5-odbc/files/patch-config.m4 @@ -1,7 +1,12 @@ ---- config.m4.orig 2007-09-14 08:03:08.000000000 +0200 -+++ config.m4 2007-09-14 08:14:21.000000000 +0200 -@@ -101,7 +101,7 @@ +--- config.m4.orig 2007-07-31 15:02:00.000000000 +0200 ++++ config.m4 2011-04-26 13:57:31.000000000 +0200 +@@ -99,9 +99,12 @@ dnl + dnl configure options + dnl ++PHP_ARG_ENABLE(odbc,, ++[ --enable-odbc Enable ODBC support with selected driver]) ++ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(adabas,, -[ --with-adabas[=DIR] Include Adabas D support [/usr/local]]) @@ -9,7 +14,7 @@ if test "$PHP_ADABAS" != "no"; then AC_MSG_CHECKING([for Adabas support]) -@@ -128,7 +128,7 @@ +@@ -128,7 +131,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(sapdb,, @@ -18,7 +23,7 @@ if test "$PHP_SAPDB" != "no"; then AC_MSG_CHECKING([for SAP DB support]) -@@ -146,7 +146,7 @@ +@@ -146,7 +149,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(solid,, @@ -27,7 +32,7 @@ if test "$PHP_SOLID" != "no"; then AC_MSG_CHECKING(for Solid support) -@@ -171,7 +171,7 @@ +@@ -171,7 +174,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(ibm-db2,, @@ -36,7 +41,7 @@ if test "$PHP_IBM_DB2" != "no"; then AC_MSG_CHECKING(for IBM DB2 support) -@@ -208,7 +208,7 @@ +@@ -208,7 +211,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(ODBCRouter,, @@ -45,7 +50,7 @@ if test "$PHP_ODBCROUTER" != "no"; then AC_MSG_CHECKING(for ODBCRouter.com support) -@@ -229,7 +229,7 @@ +@@ -229,7 +232,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(empress,, [ --with-empress[=DIR] Include Empress support [\$EMPRESSPATH] @@ -54,7 +59,7 @@ if test "$PHP_EMPRESS" != "no"; then AC_MSG_CHECKING(for Empress support) -@@ -253,7 +253,7 @@ +@@ -253,7 +256,7 @@ PHP_ARG_WITH(empress-bcs,, [ --with-empress-bcs[=DIR] Include Empress Local Access support [\$EMPRESSPATH] @@ -63,7 +68,7 @@ if test "$PHP_EMPRESS_BCS" != "no"; then AC_MSG_CHECKING(for Empress local access support) -@@ -291,7 +291,7 @@ +@@ -291,7 +294,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(birdstep,, @@ -72,7 +77,7 @@ if test "$PHP_BIRDSTEP" != "no"; then AC_MSG_CHECKING(for Birdstep support) -@@ -346,7 +346,7 @@ +@@ -346,7 +349,7 @@ running this configure script: CPPFLAGS=\"-DODBC_QNX -DSQLANY_BUG\" LDFLAGS=-lunix @@ -81,7 +86,7 @@ if test "$PHP_CUSTOM_ODBC" != "no"; then AC_MSG_CHECKING(for a custom ODBC support) -@@ -366,7 +366,7 @@ +@@ -366,7 +369,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(iodbc,, @@ -90,7 +95,7 @@ if test "$PHP_IODBC" != "no"; then AC_MSG_CHECKING(for iODBC support) -@@ -387,7 +387,7 @@ +@@ -387,7 +390,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(esoob,, @@ -99,16 +104,16 @@ if test "$PHP_ESOOB" != "no"; then AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support) -@@ -407,7 +407,7 @@ +@@ -407,7 +410,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(unixODBC,, -[ --with-unixODBC[=DIR] Include unixODBC support [/usr/local]]) -+[ --with-unixODBC[=DIR] Include unixODBC support [/usr/local]], no) ++[ --with-unixODBC[=DIR] Include unixODBC support [/usr/local]], no, no) if test "$PHP_UNIXODBC" != "no"; then AC_MSG_CHECKING(for unixODBC support) -@@ -428,7 +428,7 @@ +@@ -428,7 +431,7 @@ if test -z "$ODBC_TYPE"; then PHP_ARG_WITH(dbmaker,, diff --git a/lang/php5-extensions/Makefile b/lang/php5-extensions/Makefile index 3be6a298854e..3cdb60d5cb9a 100644 --- a/lang/php5-extensions/Makefile +++ b/lang/php5-extensions/Makefile @@ -66,7 +66,7 @@ OPTIONS= BCMATH "bc style precision math functions" off \ MSSQL "MS-SQL database support" off \ MYSQL "MySQL database support" off \ MYSQLI "MySQLi database support" off \ - ODBC "unixODBC support" off \ + ODBC "ODBC support" off \ OPENSSL "OpenSSL support" off \ PCNTL "pcntl support (CLI only)" off \ PDF "PDFlib support (implies GD)" off \ diff --git a/lang/php5/Makefile.ext b/lang/php5/Makefile.ext index 47d9eef82c93..2f88592a4bee 100644 --- a/lang/php5/Makefile.ext +++ b/lang/php5/Makefile.ext @@ -194,9 +194,9 @@ OPTIONS= MYSQLND "Use MySQL Native Driver" on .endif .if ${PHP_MODNAME} == "odbc" -LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +CONFIGURE_ARGS+=--enable-odbc -CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE} +OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off .endif .if ${PHP_MODNAME} == "openssl" @@ -240,9 +240,7 @@ USE_PHP_BUILD= yes .endif .if ${PHP_MODNAME} == "pdo_odbc" -LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC - -CONFIGURE_ARGS+=--with-pdo-odbc=unixODBC,${LOCALBASE} +OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off USE_PHP= pdo USE_PHP_BUILD= yes @@ -523,6 +521,18 @@ post-extract: @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 .endif +.if ${PHP_MODNAME} == "odbc" +.if defined(WITH_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc + +CONFIGURE_ARGS+=--with-iodbc=${LOCALBASE} +.else +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC + +CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE} +.endif +.endif + .if ${PHP_MODNAME} == "pdo_dblib" .if defined(WITH_MSSQL) LIB_DEPENDS+= sybdb.5:${PORTSDIR}/databases/freetds-msdblib @@ -531,6 +541,18 @@ LIB_DEPENDS+= ct.4:${PORTSDIR}/databases/freetds .endif .endif +.if ${PHP_MODNAME} == "pdo_odbc" +.if defined(WITH_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc + +CONFIGURE_ARGS+=--with-pdo-odbc=iODBC,${LOCALBASE} +.else +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC + +CONFIGURE_ARGS+=--with-pdo-odbc=unixODBC,${LOCALBASE} +.endif +.endif + .if ${PHP_MODNAME} == "pdo_mysql" . if defined(WITH_MYSQLND) CONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd diff --git a/lang/php53/Makefile.ext b/lang/php53/Makefile.ext index 47d9eef82c93..2f88592a4bee 100644 --- a/lang/php53/Makefile.ext +++ b/lang/php53/Makefile.ext @@ -194,9 +194,9 @@ OPTIONS= MYSQLND "Use MySQL Native Driver" on .endif .if ${PHP_MODNAME} == "odbc" -LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +CONFIGURE_ARGS+=--enable-odbc -CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE} +OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off .endif .if ${PHP_MODNAME} == "openssl" @@ -240,9 +240,7 @@ USE_PHP_BUILD= yes .endif .if ${PHP_MODNAME} == "pdo_odbc" -LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC - -CONFIGURE_ARGS+=--with-pdo-odbc=unixODBC,${LOCALBASE} +OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off USE_PHP= pdo USE_PHP_BUILD= yes @@ -523,6 +521,18 @@ post-extract: @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 .endif +.if ${PHP_MODNAME} == "odbc" +.if defined(WITH_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc + +CONFIGURE_ARGS+=--with-iodbc=${LOCALBASE} +.else +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC + +CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE} +.endif +.endif + .if ${PHP_MODNAME} == "pdo_dblib" .if defined(WITH_MSSQL) LIB_DEPENDS+= sybdb.5:${PORTSDIR}/databases/freetds-msdblib @@ -531,6 +541,18 @@ LIB_DEPENDS+= ct.4:${PORTSDIR}/databases/freetds .endif .endif +.if ${PHP_MODNAME} == "pdo_odbc" +.if defined(WITH_IODBC) +LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc + +CONFIGURE_ARGS+=--with-pdo-odbc=iODBC,${LOCALBASE} +.else +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC + +CONFIGURE_ARGS+=--with-pdo-odbc=unixODBC,${LOCALBASE} +.endif +.endif + .if ${PHP_MODNAME} == "pdo_mysql" . if defined(WITH_MYSQLND) CONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd |