]> git.pld-linux.org Git - packages/php.git/commitdiff
- added instantclient bcond
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 10 Sep 2010 19:15:10 +0000 (19:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-oracle-instantclient.patch -> 1.1
    php.spec -> 1.897

php-oracle-instantclient.patch [new file with mode: 0644]
php.spec

diff --git a/php-oracle-instantclient.patch b/php-oracle-instantclient.patch
new file mode 100644 (file)
index 0000000..120c75a
--- /dev/null
@@ -0,0 +1,63 @@
+--- php-5.3.3/ext/oci8/config.m4.orig  2010-06-25 23:18:09.000000000 +0200
++++ php-5.3.3/ext/oci8/config.m4       2010-09-10 19:37:23.484315002 +0200
+@@ -304,6 +304,9 @@
+     AC_MSG_CHECKING([Oracle Instant Client SDK header directory])
++    dnl Header directory for Instant Client SDK PLD RPM install
++    OCISDKPLDINC=$PHP_OCI8_INSTANT_CLIENT/../include/oracle/client
++
+     dnl Header directory for Instant Client SDK RPM install
+     OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'`
+@@ -313,7 +316,11 @@
+     dnl Header directory for manual installation
+     OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib[/]*$!\1/include!'`
+-    if test -f "$OCISDKRPMINC/oci.h"; then
++    if test -f "$OCISDKPLDINC/oci.h"; then
++      AC_MSG_RESULT($OCISDKPLDINC)
++      PHP_ADD_INCLUDE($OCISDKPLDINC)
++      OCI8INCDIR=$OCISDKPLDINC
++    elif test -f "$OCISDKRPMINC/oci.h"; then
+       AC_MSG_RESULT($OCISDKRPMINC)
+       PHP_ADD_INCLUDE($OCISDKRPMINC)
+       OCI8INCDIR=$OCISDKRPMINC
+--- php-5.3.3/ext/pdo_oci/config.m4~   2010-02-04 02:12:14.000000000 +0100
++++ php-5.3.3/ext/pdo_oci/config.m4    2010-09-10 19:58:31.206315023 +0200
+@@ -6,8 +6,10 @@
+ AC_DEFUN([AC_PDO_OCI_VERSION],[
+   AC_MSG_CHECKING([Oracle version])
+   for OCI_VER in $SUPPORTED_LIB_VERS; do
+-    if test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then
++    if test -f $1/lib/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then
+       PDO_OCI_VERSION="$OCI_VER"
++    elif test -f $1/libclntsh.$SHLIB_SUFFIX_NAME.$OCI_VER; then
++      PDO_OCI_VERSION="$OCI_VER"
+     fi
+   done
+   if test -z "$PDO_OCI_VERSION"; then
+@@ -86,6 +86,9 @@
+     elif test -f $PDO_OCI_IC_PREFIX/client/include/oci.h ; then
+       PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/client/include)
+       AC_MSG_RESULT($PDO_OCI_IC_PREFIX/client/include)
++    elif test -f $PDO_OCI_IC_PREFIX/../include/oracle/client/oci.h ; then
++      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/../include/oracle/client)
++      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/../include/oracle/client)
+     else
+       AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your Instant Client install])
+     fi
+@@ -103,7 +103,12 @@
+     else
+       AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your Instant Client install])
+     fi
+-    PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`"
++    __PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`"
++    if test -n "$__PDO_OCI_VERSION" ; then
++      PDO_OCI_VERSION=$__PDO_OCI_VERSION
++    else
++      AC_PDO_OCI_VERSION($PDO_OCI_IC_PREFIX)
++    fi
+   else
+     AC_PDO_OCI_CHECK_LIB_DIR($PDO_OCI_DIR)
index 85d109117405af44c832be25016c7ac9e023e6ff..c5d94248911f719da0c19e6e3e5e765edbcc299e 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -29,6 +29,7 @@
 %bcond_with    fdf             # with FDF (PDF forms) module           (BR: proprietary lib)
 %bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
 %bcond_with    oci8            # with Oracle oci8 extension module     (BR: proprietary libs)
+%bcond_with    instantclient   # build Oracle oci8 extension module against oracle-instantclient package
 %bcond_with    system_gd       # with system gd (we prefer internal since it enables few more features)
 %bcond_with    litespeed       # build litespeed module
 %bcond_without curl            # without CURL extension module
@@ -182,6 +183,7 @@ Patch56:    bug-51901.patch
 Patch57:       bug-52448.patch
 Patch58:       bug-52533.patch
 Patch59:       %{name}-systzdata.patch
+Patch60:       %{name}-oracle-instantclient.patch
 URL:           http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -231,6 +233,7 @@ BuildRequires:      openssl-devel >= 0.9.7d
 %{?with_gcov:BuildRequires:    lcov}
 %{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
 %{?with_snmp:BuildRequires:    net-snmp-devel >= 5.0.7}
+%{?with_instantclient:BuildRequires:   oracle-instantclient-devel}
 BuildRequires: pam-devel
 %{?with_pcre:BuildRequires:    pcre-devel >= 6.6}
 BuildRequires: pkgconfig
@@ -1843,6 +1846,7 @@ cp php.ini-production php.ini
 %patch57 -p1
 %patch58 -p1
 %patch59 -p1
+%patch60 -p1
 
 %if "%{pld_release}" != "ac"
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
@@ -2017,7 +2021,7 @@ for sapi in $sapis; do
 %endif
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
        --with-pdo-mysql=shared%{?with_mysqlnd:,mysqlnd} \
-       %{?with_oci8:--with-pdo-oci=shared} \
+       %{?with_oci8:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
        %{?with_pgsql:--with-pdo-pgsql=shared} \
        %{?with_sqlite:--with-pdo-sqlite=shared,/usr} \
@@ -2060,7 +2064,7 @@ for sapi in $sapis; do
        %{?with_mysqlnd:--with-mysqlnd=shared} \
        --with-mysql=shared%{?with_mysqlnd:,mysqlnd} \
        %{?with_mysqli:--with-mysqli=shared%{?with_mysqlnd:,mysqlnd}} \
-       %{?with_oci8:--with-oci8=shared} \
+       %{?with_oci8:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_openssl:--with-openssl=shared} \
        --with-kerberos \
        %{__with_without pcre pcre-regex /usr} \
This page took 0.065587 seconds and 4 git commands to generate.