packages: php/dep-tests.sh, php/php.spec, php/mysqlnd-shared.patch (NEW) - ...
glen
glen at pld-linux.org
Wed Apr 14 09:19:21 CEST 2010
Author: glen Date: Wed Apr 14 07:19:21 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- mysqlnd as shared ext
---- Files affected:
packages/php:
dep-tests.sh (1.5 -> 1.6) , php.spec (1.864 -> 1.865) , mysqlnd-shared.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/php/dep-tests.sh
diff -u packages/php/dep-tests.sh:1.5 packages/php/dep-tests.sh:1.6
--- packages/php/dep-tests.sh:1.5 Tue Mar 16 11:36:51 2010
+++ packages/php/dep-tests.sh Wed Apr 14 09:19:15 2010
@@ -1,10 +1,13 @@
#!/bin/sh
# inter-dependencies checker.
+with_mysqlnd=mysqlnd
+
dep_spl="pcre simplexml"
dep_filter='pcre'
dep_eaccelerator='session'
-dep_mysqli="$dep_spl spl"
+dep_mysql="$with_mysqlnd"
+dep_mysqli="$dep_spl spl $with_mysqlnd"
dep_pdo="$dep_spl spl"
dep_pdo_sqlite="$dep_pdo pdo"
dep_pdo_pgsql="$dep_pdo pdo"
@@ -12,7 +15,7 @@
dep_pdo_odbc="$dep_pdo pdo"
dep_pdo_firebird="$dep_pdo pdo"
dep_pdo_dblib="$dep_pdo pdo"
-dep_pdo_mysql="$dep_pdo pdo"
+dep_pdo_mysql="$dep_pdo pdo $with_mysqlnd"
dep_simplexml="$dep_spl spl"
dep_imap="pcre"
dep_phar="$dep_spl spl"
@@ -29,13 +32,13 @@
tmpini=$(mktemp)
# poldek --sn ac-ready -u php-*
-for ext in $ext_dir/*.so; do
+for ext in $ext_dir/spl.so; do
[ -f $ext ] || continue
ext=${ext##*/}; ext=${ext%.so}
deps=$(eval echo \$dep_$ext)
# add ext itself, if already not in list (spl case)
- [[ $deps = *$ext* ]] || deps="$deps $ext"
+ [[ $deps = *\ $ext\ * ]] || deps="$deps $ext"
echo -n "$ext (deps: ${deps# })..."
================================================================
Index: packages/php/php.spec
diff -u packages/php/php.spec:1.864 packages/php/php.spec:1.865
--- packages/php/php.spec:1.864 Wed Apr 14 00:28:55 2010
+++ packages/php/php.spec Wed Apr 14 09:19:15 2010
@@ -16,8 +16,6 @@
# - make additional headers and checking added by mail patch configurable
# - modularize standard (output from pure php -m)?
# - lib64 patch obsolete by $PHP_LIBDIR ?
-# - move mysqlnd out of libphp-common.so, or link again with mysql-devel? (!!!)
-# make mysqlnd as subpkg like pdo is base for all pdo drivers
# - WARNING: Phar: sha256/sha512 signature support disabled if ext/hash is
# built shared, also PHAR_HAVE_OPENSSL is false if openssl is built shared.
# make it runtime dep and add Suggests (or php warning messages)
@@ -28,7 +26,6 @@
# date
#+ereg
# libxml
-#+mysqlnd
# Reflection
#
# Conditional build:
@@ -44,6 +41,7 @@
%bcond_without ldap # without LDAP extension module
%bcond_without mm # without mm support for session storage
%bcond_without mssql # without MS SQL extension module
+%bcond_without mysqlnd # without mysqlnd support in mysql related extensions
%bcond_without mysqli # without mysqli support (Requires mysql > 4.1)
%bcond_without odbc # without ODBC extension module
%bcond_without openssl # without OpenSSL support and OpenSSL extension (module)
@@ -169,6 +167,7 @@
Patch51: spl-shared.patch
Patch52: pcre-shared.patch
Patch53: fix-test-run.patch
+Patch54: mysqlnd-shared.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}
@@ -942,6 +941,28 @@
Moduł PHP dodający obsługę baz danych MS SQL poprzez bibliotekę
FreeTDS.
+%package mysqlnd
+Summary: MySQL Native Client Driver for PHP
+Group: Libraries
+URL: http://www.php.net/manual/en/book.mysqlnd.php
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(mysqlnd)
+
+%description mysqlnd
+MySQL Native Driver is a replacement for the MySQL Client Library
+(libmysql).
+
+Because MySQL Native Driver is written as a PHP extension, it is
+tightly coupled to the workings of PHP. This leads to gains in
+efficiency, especially when it comes to memory usage, as the driver
+uses the PHP memory management system. It also supports the PHP memory
+limit. Using MySQL Native Driver leads to comparable or better
+performance than using MySQL Client Library, it always ensures the
+most efficient use of memory. One example of the memory efficiency is
+the fact that when using the MySQL Client Library, each row is stored
+in memory twice, whereas with the MySQL Native Driver each row is only
+stored once in memory.
+
%package mysql
Summary: MySQL database module for PHP
Summary(pl.UTF-8): Moduł bazy danych MySQL dla PHP
@@ -949,6 +970,7 @@
Group: Libraries
URL: http://www.php.net/manual/en/book.mysql.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Provides: php(mysql)
%description mysql
@@ -968,6 +990,7 @@
URL: http://www.php.net/manual/en/book.mysqli.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
+%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Provides: php(mysqli)
%description mysqli
@@ -1123,6 +1146,7 @@
URL: http://www.php.net/manual/en/ref.pdo-mysql.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
+%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Provides: php(pdo-mysql)
Obsoletes: php-pecl-PDO_MYSQL
@@ -1784,6 +1808,7 @@
%patch51 -p1
%patch52 -p1
%patch53 -p1
+%patch54 -p1
%if "%{pld_release}" != "ac"
sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
@@ -1948,13 +1973,12 @@
--with-pdo-firebird=shared,/usr \
%endif
--with-mysql-sock=/var/lib/mysql/mysql.sock \
- --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-mysql=shared%{?with_mysqlnd:,mysqlnd} \
%{?with_oci8:--with-pdo-oci=shared} \
%{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
%{?with_pgsql:--with-pdo-pgsql=shared} \
%{?with_sqlite:--with-pdo-sqlite=shared,/usr} \
--without-libexpat-dir \
- --enable-mysqlnd-threading \
--enable-overload=shared \
--enable-posix=shared \
--enable-shared \
@@ -1990,8 +2014,9 @@
--with-mcrypt=shared \
%{?with_mm:--with-mm} \
%{?with_mssql:--with-mssql=shared} \
- --with-mysql=shared,mysqlnd \
- %{?with_mysqli:--with-mysqli=shared,mysqlnd} \
+ %{?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_openssl:--with-openssl=shared} \
--with-kerberos \
@@ -2074,6 +2099,8 @@
[ "$mod" = "pcre" ] && conf="PCRE.ini"
# spl needs to be loaded before mysqli
[ "$mod" = "spl" ] && conf="SPL.ini"
+ # mysqlnd needs to be loaded before mysql,mysqli,pdo_mysqli
+ [ "$mod" = "mysqlnd" ] && conf="MySQLND.ini"
echo "+ $conf"
cat > conf.d/$conf <<-EOF
; Enable $mod extension module
@@ -2333,6 +2360,7 @@
%extension_scripts mbstring
%extension_scripts mcrypt
%extension_scripts mssql
+%extension_scripts mysqlnd
%extension_scripts mysql
%extension_scripts mysqli
%extension_scripts oci8
@@ -2755,6 +2783,13 @@
%attr(755,root,root) %{php_extensiondir}/mssql.so
%endif
+%if %{with mysqlnd}
+%files mysqlnd
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/MySQLND.ini
+%attr(755,root,root) %{php_extensiondir}/mysqlnd.so
+%endif
+
%files mysql
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mysql.ini
@@ -3044,6 +3079,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.865 2010/04/14 07:19:15 glen
+- mysqlnd as shared ext
+
Revision 1.864 2010/04/13 22:28:55 glen
- typo
================================================================
Index: packages/php/mysqlnd-shared.patch
diff -u /dev/null packages/php/mysqlnd-shared.patch:1.1
--- /dev/null Wed Apr 14 09:19:21 2010
+++ packages/php/mysqlnd-shared.patch Wed Apr 14 09:19:15 2010
@@ -0,0 +1,23 @@
+--- php-5.3.2/ext/mysqlnd/config9.m4~ 2009-12-22 21:30:09.000000000 +0200
++++ php-5.3.2/ext/mysqlnd/config9.m4 2010-04-14 01:33:20.435275382 +0300
+@@ -20,7 +20,7 @@
+ mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
+ mysqlnd_block_alloc.c php_mysqlnd.c"
+
+- PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no)
++ PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, yes)
+ PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
+ PHP_INSTALL_HEADERS([ext/mysqlnd/])
+
+--- php-5.3.2/ext/mysqlnd/php_mysqlnd.c~ 2010-01-20 19:09:28.000000000 +0200
++++ php-5.3.2/ext/mysqlnd/php_mysqlnd.c 2010-04-14 09:18:30.725599897 +0300
+@@ -273,6 +273,9 @@
+ };
+ /* }}} */
+
++#ifdef COMPILE_DL_MYSQLND
++ZEND_GET_MODULE(mysqlnd)
++#endif
+
+ /*
+ * Local variables:
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/dep-tests.sh?r1=1.5&r2=1.6&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/php.spec?r1=1.864&r2=1.865&f=u
More information about the pld-cvs-commit
mailing list