[arch-commits] Commit in php/trunk (PKGBUILD mysqlnd-socket.patch)

Pierre Schmitz pierre at archlinux.org
Mon Nov 30 11:42:35 EST 2009


    Date: Monday, November 30, 2009 @ 11:42:35
  Author: pierre
Revision: 60021

use upstream patch

Modified:
  php/trunk/PKGBUILD
  php/trunk/mysqlnd-socket.patch

----------------------+
 PKGBUILD             |    5 -
 mysqlnd-socket.patch |  175 ++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 155 insertions(+), 25 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-30 16:03:48 UTC (rev 60020)
+++ PKGBUILD	2009-11-30 16:42:35 UTC (rev 60021)
@@ -39,7 +39,7 @@
          'd6f94150f47047882c6716575e12e99b'
          '96ca078be6729b665be8a865535a97bf'
          'cd3d068931c3715e35634e9885e35374'
-         '65aaf083ff570fa19ffb4679bdda1ada')
+         '247b79def0a407f5886ae06247a18881')
 
 build() {
 	# ldap-sasl does not compile with --as-needed
@@ -135,7 +135,8 @@
 	# avoid linking against old db version
 	patch -p0 -i ${srcdir}/db-configure.patch || return 1
 
-	# use /var/run/mysqld/mysqld.sock as default socket for mysql
+	# Fixed bug #50231 (Socket path passed using 
+	# --with-mysql-sock is ignored when mysqlnd is enabled)
 	patch -p0 -i ${srcdir}/mysqlnd-socket.patch || return 1
 
 	# apply suhosin patch

Modified: mysqlnd-socket.patch
===================================================================
--- mysqlnd-socket.patch	2009-11-30 16:03:48 UTC (rev 60020)
+++ mysqlnd-socket.patch	2009-11-30 16:42:35 UTC (rev 60021)
@@ -1,28 +1,157 @@
---- ext/mysqlnd/mysqlnd.c	2009-11-19 14:02:01.934775092 +0100
-+++ ext/mysqlnd/mysqlnd.c	2009-11-19 14:08:04.598072581 +0100
-@@ -547,7 +547,7 @@
- #ifndef PHP_WIN32
- 	if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
- 		if (!socket) {
--			socket = "/tmp/mysql.sock";
-+			socket = "/var/run/mysqld/mysqld.sock";
- 		}
- 		transport_len = spprintf(&transport, 0, "unix://%s", socket);
- 		unix_socket = TRUE;
---- ext/pdo_mysql/pdo_mysql.c	2009-10-14 15:51:25.000000000 +0200
-+++ ext/pdo_mysql/pdo_mysql.c	2009-11-19 22:52:13.460628605 +0100
-@@ -40,7 +40,7 @@
+--- ext/mysql/config.m4	2009/11/30 15:07:41	291500
++++ ext/mysql/config.m4	2009/11/30 15:11:29	291501
+@@ -58,18 +58,6 @@
+   PHP_MYSQLND_ENABLED=yes
  
- #ifndef PHP_WIN32
- # ifndef PDO_MYSQL_UNIX_ADDR
--#  define PDO_MYSQL_UNIX_ADDR  "/tmp/mysql.sock"
-+#  define PDO_MYSQL_UNIX_ADDR  "/var/run/mysqld/mysqld.sock"
- # endif
- #endif
+ elif test "$PHP_MYSQL" != "no"; then
+-
+-  AC_MSG_CHECKING([for MySQL UNIX socket location])
+-  if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
+-    MYSQL_SOCK=$PHP_MYSQL_SOCK
+-    AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
+-    AC_MSG_RESULT([$MYSQL_SOCK])
+-  elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
+-    PHP_MYSQL_SOCKET_SEARCH
+-  else
+-    AC_MSG_RESULT([no])
+-  fi
+-
+   MYSQL_DIR=
+   MYSQL_INC_DIR=
  
---- ext/pdo_mysql/pdo_mysql.c	2009-10-14 16:51:25.000000000 +0300
-+++ ext/pdo_mysql/pdo_mysql.c	2009-11-20 14:08:04.000000000 +0200
-@@ -49,7 +49,7 @@ ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql);
+@@ -152,6 +140,17 @@
+ 
+ dnl Enable extension
+ if test "$PHP_MYSQL" != "no"; then
++  AC_MSG_CHECKING([for MySQL UNIX socket location])
++  if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
++    MYSQL_SOCK=$PHP_MYSQL_SOCK
++    AC_DEFINE_UNQUOTED(PHP_MYSQL_UNIX_SOCK_ADDR, "$MYSQL_SOCK", [ ])
++    AC_MSG_RESULT([$MYSQL_SOCK])
++  elif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL_SOCK" = "yes"; then
++    PHP_MYSQL_SOCKET_SEARCH
++  else
++    AC_MSG_RESULT([no])
++  fi
++
+   AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
+   PHP_NEW_EXTENSION(mysql, php_mysql.c, $ext_shared)
+   PHP_SUBST(MYSQL_SHARED_LIBADD)
+--- ext/pdo_mysql/config.m4	2009/11/30 15:07:41	291500
++++ ext/pdo_mysql/config.m4	2009/11/30 15:11:29	291501
+@@ -28,46 +28,42 @@
+     done
+   ])
+ 
++  if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
++    PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
++  elif test "$PHP_PDO_MYSQL" != "yes"; then
++    if test -d "$PHP_PDO_MYSQL" ; then
++      if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
++        PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
++      else
++        PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
++      fi
++    fi
++  else
++    for i in /usr/local /usr ; do
++      if test -x "$i/bin/mysql_config" ; then
++        PDO_MYSQL_CONFIG="$i/bin/mysql_config"
++        break;
++      fi
++      if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
++        PDO_MYSQL_DIR="$i"
++        break;
++      fi
++    done
++  fi
++
+   if test "$PHP_PDO_MYSQL" = "mysqlnd"; then
+     dnl enables build of mysqnd library
+     PHP_MYSQLND_ENABLED=yes
+     AC_DEFINE([PDO_USE_MYSQLND], 1, [Whether pdo_mysql uses mysqlnd])
+   else
+     AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
+-    AC_MSG_CHECKING([for mysql_config])
+ 
+-    if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
+-      PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
+-    elif test "$PHP_PDO_MYSQL" != "yes"; then
+-      if test -d "$PHP_PDO_MYSQL" ; then
+-        if test -x "$PHP_PDO_MYSQL/bin/mysql_config" ; then
+-          PDO_MYSQL_CONFIG="$PHP_PDO_MYSQL/bin/mysql_config"
+-        else
+-          PDO_MYSQL_DIR="$PHP_PDO_MYSQL"
+-        fi
+-      else
+-        AC_MSG_RESULT([$PHP_PDO_MYSQL is not a directory])
+-        AC_MSG_ERROR([can not find mysql under the "$PHP_PDO_MYSQL" that you specified])
+-      fi
+-    else
+-      for i in /usr/local /usr ; do
+-        if test -x "$i/bin/mysql_config" ; then
+-          PDO_MYSQL_CONFIG="$i/bin/mysql_config"
+-          break;
+-        fi
+-        if test -r $i/include/mysql/mysql.h || test -r $i/include/mysql.h ; then
+-          PDO_MYSQL_DIR="$i"
+-          break;
+-        fi
+-      done
+-    fi
+-
+-    if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then
++    AC_MSG_CHECKING([for mysql_config])
++    if test -n "$PDO_MYSQL_CONFIG"; then
+       AC_MSG_RESULT($PDO_MYSQL_CONFIG)
+       if test "x$SED" = "x"; then
+         AC_PATH_PROG(SED, sed)
+       fi
+-
+       if test "$enable_maintainer_zts" = "yes"; then
+         PDO_MYSQL_LIBNAME=mysqlclient_r
+         PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"`
+@@ -76,11 +72,7 @@
+         PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
+       fi
+       PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
+-      PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket` 
+-    elif test -z "$PDO_MYSQL_DIR"; then
+-      AC_MSG_RESULT([not found])
+-      AC_MSG_ERROR([Cannot find MySQL header files under $PDO_MYSQL_DIR])
+-    else
++    elif test -n "$PDO_MYSQL_DIR"; then
+       AC_MSG_RESULT([not found])
+       AC_MSG_CHECKING([for mysql install under $PDO_MYSQL_DIR])
+       if test -r $PDO_MYSQL_DIR/include/mysql; then
+@@ -103,10 +95,11 @@
+ 
+       PHP_ADD_INCLUDE($PDO_MYSQL_INC_DIR)
+       PDO_MYSQL_INCLUDE=-I$PDO_MYSQL_INC_DIR
++    else
++      AC_MSG_RESULT([not found])
++      AC_MSG_ERROR([Unable to find your mysql installation])
+     fi
+ 
+-    AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
+-
+     PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query,
+     [
+       PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
+@@ -159,6 +152,10 @@
+     AC_MSG_RESULT($pdo_inc_path)
+   ])
+ 
++  if test -n "$PDO_MYSQL_CONFIG"; then
++    PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
++    AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ])
++  fi
+ 
+   dnl fix after renaming to pdo_mysql
+   PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path -I)
+--- ext/pdo_mysql/pdo_mysql.c	2009/11/23 15:09:57	291214
++++ ext/pdo_mysql/pdo_mysql.c	2009/11/23 15:45:04	291215
+@@ -52,7 +52,7 @@
  */
  PHP_INI_BEGIN()
  #ifndef PHP_WIN32



More information about the arch-commits mailing list