summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php')
-rw-r--r--dev-lang/php/files/php-iodbc-header-location.patch14
-rw-r--r--dev-lang/php/php-7.4.0.ebuild26
2 files changed, 35 insertions, 5 deletions
diff --git a/dev-lang/php/files/php-iodbc-header-location.patch b/dev-lang/php/files/php-iodbc-header-location.patch
new file mode 100644
index 000000000000..e34f09b6ec81
--- /dev/null
+++ b/dev-lang/php/files/php-iodbc-header-location.patch
@@ -0,0 +1,14 @@
+diff -aurN a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4
+--- a/ext/pdo_odbc/config.m4 2019-11-26 15:13:39.000000000 -0500
++++ b/ext/pdo_odbc/config.m4 2019-12-06 10:39:56.296658492 -0500
+@@ -85,6 +85,10 @@
+ PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir"
+ fi
+
++ if test "$pdo_odbc_def_lib" = "iodbc" ; then
++ PDO_ODBC_INCDIR="$PDO_ODBC_INCDIR/iodbc"
++ fi
++
+ AC_MSG_RESULT([$pdo_odbc_flavour
+ libs $PDO_ODBC_LIBDIR,
+ headers $PDO_ODBC_INCDIR])
diff --git a/dev-lang/php/php-7.4.0.ebuild b/dev-lang/php/php-7.4.0.ebuild
index 9f8615b21e65..fbf13a93f6be 100644
--- a/dev-lang/php/php-7.4.0.ebuild
+++ b/dev-lang/php/php-7.4.0.ebuild
@@ -150,6 +150,8 @@ BDEPEND="virtual/pkgconfig"
PHP_MV="$(ver_cut 1)"
+PATCHES=( "${FILESDIR}/php-iodbc-header-location.patch" )
+
php_install_ini() {
local phpsapi="${1}"
@@ -358,10 +360,25 @@ src_configure() {
fi
# ODBC support
- our_conf+=(
- $(use_with odbc unixODBC "${EPREFIX}/usr")
- $(use_with iodbc)
- )
+ if use odbc && use iodbc ; then
+ our_conf+=(
+ --without-unixODBC
+ --with-iodbc
+ $(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
+ )
+ elif use odbc ; then
+ our_conf+=(
+ --with-unixODBC="${EPREFIX}/usr"
+ --without-iodbc
+ $(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
+ )
+ else
+ our_conf+=(
+ --without-unixODBC
+ --without-iodbc
+ --without-pdo-odbc
+ )
+ fi
# Oracle support
our_conf+=( $(use_with oci8-instant-client oci8) )
@@ -374,7 +391,6 @@ src_configure() {
$(use_with postgres pdo-pgsql)
$(use_with sqlite pdo-sqlite)
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
$(use_with oci8-instant-client pdo-oci)
)
fi