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

Pierre Schmitz pierre at archlinux.org
Sun Mar 28 16:25:27 CEST 2010


    Date: Sunday, March 28, 2010 @ 10:25:27
  Author: pierre
Revision: 73785

upgpkg: php 5.3.2-4
enable mhash; fix mysql port issue

Added:
  php/trunk/mysqlnd_default_port.patch
Modified:
  php/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   31 +++++++++++++++++--------------
 mysqlnd_default_port.patch |   23 +++++++++++++++++++++++
 2 files changed, 40 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-03-28 14:05:59 UTC (rev 73784)
+++ PKGBUILD	2010-03-28 14:25:27 UTC (rev 73785)
@@ -22,7 +22,7 @@
          'php-tidy'
          'php-xsl')
 pkgver=5.3.2
-pkgrel=3
+pkgrel=4
 _suhosinver=${pkgver}-0.9.9.1
 arch=('i686' 'x86_64')
 license=('PHP')
@@ -34,19 +34,22 @@
 options=('!makeflags')
 source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
         "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
-        'php.ini.patch' 'apache.conf' 'db-configure.patch')
+        'php.ini.patch' 'apache.conf' 'db-configure.patch'
+        'mysqlnd_default_port.patch')
 md5sums=('46f500816125202c48a458d0133254a4'
          '4647b05330862d6a1fc4469245cc6ade'
          'd6f94150f47047882c6716575e12e99b'
          '96ca078be6729b665be8a865535a97bf'
-         'e04e6a3abf327dd40ddb2b7dc21677c4')
+         'e04e6a3abf327dd40ddb2b7dc21677c4'
+         'bcf06fcc3324f3443d8402008eb1c01f')
 
 build() {
 	# ldap-sasl does not compile with --as-needed
 	export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
 	export LDFLAGS="${LDFLAGS//,--as-needed}"
 
-	phpconfig="--prefix=/usr \
+	phpconfig="--srcdir=../${pkgbase}-${pkgver} \
+		--prefix=/usr \
 		--sysconfdir=/etc/php \
 		--with-layout=GNU \
 		--with-config-file-path=/etc/php \
@@ -100,6 +103,7 @@
 		--with-ldap=shared \
 		--with-ldap-sasl \
 		--with-mcrypt=shared \
+		--with-mhash \
 		--with-mysql-sock=/var/run/mysqld/mysqld.sock \
 		--with-mysql=shared,mysqlnd \
 		--with-mysqli=shared,mysqlnd \
@@ -141,12 +145,15 @@
 	# adjust paths
 	patch -p0 -i ${srcdir}/php.ini.patch || return 1
 
+	# fix http://bugs.php.net/51242
+	# remove for next upstream release
+	patch -p0 -i ${srcdir}/mysqlnd_default_port.patch || return 1
+
 	# php
 	mkdir ${srcdir}/build-php
 	cd ${srcdir}/build-php
 	ln -s ../${pkgbase}-${pkgver}/configure
-	./configure --srcdir=../${pkgbase}-${pkgver} \
-		${phpconfig} \
+	./configure ${phpconfig} \
 		--disable-cgi \
 		--with-readline \
 		--enable-pcntl \
@@ -157,8 +164,7 @@
 	# reuse the previous run; this will save us a lot of time
 	cp -a ${srcdir}/build-php ${srcdir}/build-cgi
 	cd ${srcdir}/build-cgi
-	./configure --srcdir=../${pkgbase}-${pkgver} \
-		${phpconfig} \
+	./configure ${phpconfig} \
 		--enable-cgi \
 		--disable-cli \
 		${phpextensions} || return 1
@@ -167,8 +173,7 @@
 	# apache
 	cp -a ${srcdir}/build-php ${srcdir}/build-apache
 	cd ${srcdir}/build-apache
-	./configure --srcdir=../${pkgbase}-${pkgver} \
-		${phpconfig} \
+	./configure ${phpconfig} \
 		--with-apxs2 \
 		--disable-cli \
 		${phpextensions} || return 1
@@ -177,8 +182,7 @@
 	# embed
 	cp -a ${srcdir}/build-php ${srcdir}/build-embed
 	cd ${srcdir}/build-embed
-	./configure --srcdir=../${pkgbase}-${pkgver} \
-		${phpconfig} \
+	./configure ${phpconfig} \
 		--enable-embed=shared \
 		--disable-cli \
 		${phpextensions} || return 1
@@ -187,8 +191,7 @@
 	# pear
 	cp -a ${srcdir}/build-php ${srcdir}/build-pear
 	cd ${srcdir}/build-pear
-	./configure --srcdir=../${pkgbase}-${pkgver} \
-		${phpconfig} \
+	./configure ${phpconfig} \
 		--disable-cgi \
 		--with-readline \
 		--enable-pcntl \

Added: mysqlnd_default_port.patch
===================================================================
--- mysqlnd_default_port.patch	                        (rev 0)
+++ mysqlnd_default_port.patch	2010-03-28 14:25:27 UTC (rev 73785)
@@ -0,0 +1,23 @@
+--- ext/mysqlnd/mysqlnd.c	2010-03-09 09:39:20.000000000 +0100
++++ ext/mysqlnd/mysqlnd.c	2010-03-09 09:00:40.000000000 +0100
+@@ -527,9 +527,6 @@
+ 		db = "";
+ 		db_len = 0;
+ 	}
+-	if (!port && !socket) {
+-		port = 3306;
+-	}
+ 	host_len = strlen(host);
+ #ifndef PHP_WIN32
+ 	if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
+@@ -541,6 +538,10 @@
+ 	} else
+ #endif
+ 	{
++		if (!port) {
++			port = 3306;
++		}
++
+ 		transport_len = spprintf(&transport, 0, "tcp://%s:%d", host, port);
+ 	}
+ 	DBG_INF_FMT("transport=%s", transport);



More information about the arch-commits mailing list