diff options
author | Brian Evans <grknight@gentoo.org> | 2019-12-06 12:26:42 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2019-12-06 12:27:10 -0500 |
commit | 52e20370c0d974fb1452c29d755b738b6a8b0523 (patch) | |
tree | 20c95ef9449828ef980e96e84d875732f015f15d /dev-lang/php | |
parent | media-libs/libglvnd: Fix a couple of mistakes (diff) | |
download | gentoo-52e20370c0d974fb1452c29d755b738b6a8b0523.tar.gz gentoo-52e20370c0d974fb1452c29d755b738b6a8b0523.tar.bz2 gentoo-52e20370c0d974fb1452c29d755b738b6a8b0523.zip |
dev-lang/php: Fix locating iODBC for use with PDO
Closes: https://bugs.gentoo.org/702106
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'dev-lang/php')
-rw-r--r-- | dev-lang/php/files/php-iodbc-header-location.patch | 14 | ||||
-rw-r--r-- | dev-lang/php/php-7.4.0.ebuild | 26 |
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 |