aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rw-r--r--lang/php5-extensions/Makefile2
-rw-r--r--lang/php5/Makefile.ext32
-rw-r--r--lang/php53/Makefile.ext32
3 files changed, 55 insertions, 11 deletions
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