diff options
-rw-r--r-- | REFLECTION | 79 | ||||
-rw-r--r-- | php-pecl-pq.spec | 46 | ||||
-rw-r--r-- | pq-upstream.patch | 58 |
3 files changed, 153 insertions, 30 deletions
@@ -1,4 +1,4 @@ -Extension [ <persistent> extension #172 pq version 0.5.5 ] { +Extension [ <persistent> extension #188 pq version 0.6.0RC1 ] { - Dependencies { Dependency [ raphf (Required) ] @@ -66,18 +66,18 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { } - Static methods [3] { - Method [ <internal:date, inherits DateTime> static public method __set_state ] { - } - - Method [ <internal:date, inherits DateTime> static public method createFromFormat ] { + Method [ <internal:pq, overwrites DateTime, prototype DateTime> static public method createFromFormat ] { - Parameters [3] { Parameter #0 [ <required> $format ] - Parameter #1 [ <required> $time ] - Parameter #2 [ <optional> $object ] + Parameter #1 [ <required> $datetime ] + Parameter #2 [ <optional> $timezone ] } } + Method [ <internal:date, inherits DateTime> static public method __set_state ] { + } + Method [ <internal:date, inherits DateTime> static public method getLastErrors ] { - Parameters [0] { @@ -523,7 +523,7 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { - Static methods [0] { } - - Properties [19] { + - Properties [20] { Property [ <default> public $status ] Property [ <default> public $transactionStatus ] Property [ <default> public $socket ] @@ -536,6 +536,7 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { Property [ <default> public $pass ] Property [ <default> public $host ] Property [ <default> public $port ] + Property [ <default> public $params ] Property [ <default> public $options ] Property [ <default> public $eventHandlers ] Property [ <default> public $defaultFetchType ] @@ -550,7 +551,7 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { - Parameters [2] { Parameter #0 [ <required> $dsn ] - Parameter #1 [ <optional> $async ] + Parameter #1 [ <optional> $flags ] } } @@ -1119,12 +1120,14 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { - Static methods [0] { } - - Properties [2] { + - Properties [4] { Property [ <default> public $name ] Property [ <default> public $connection ] + Property [ <default> public $query ] + Property [ <default> public $types ] } - - Methods [6] { + - Methods [10] { Method [ <internal:pq, ctor> public method __construct ] { - Parameters [5] { @@ -1144,10 +1147,15 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { } } - Method [ <internal:pq> public method exec ] { + Method [ <internal:pq> public method deallocate ] { - - Parameters [1] { - Parameter #0 [ <optional> array or NULL $params ] + - Parameters [0] { + } + } + + Method [ <internal:pq> public method deallocateAsync ] { + + - Parameters [0] { } } @@ -1157,6 +1165,20 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { } } + Method [ <internal:pq> public method descAsync ] { + + - Parameters [1] { + Parameter #0 [ <required> $callable ] + } + } + + Method [ <internal:pq> public method exec ] { + + - Parameters [1] { + Parameter #0 [ <optional> array or NULL $params ] + } + } + Method [ <internal:pq> public method execAsync ] { - Parameters [2] { @@ -1165,10 +1187,15 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { } } - Method [ <internal:pq> public method descAsync ] { + Method [ <internal:pq> public method prepare ] { - - Parameters [1] { - Parameter #0 [ <required> $callable ] + - Parameters [0] { + } + } + + Method [ <internal:pq> public method prepareAsync ] { + + - Parameters [0] { } } } @@ -1325,12 +1352,14 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { - Static methods [0] { } - - Properties [2] { + - Properties [4] { Property [ <default> public $name ] Property [ <default> public $connection ] + Property [ <default> public $query ] + Property [ <default> public $flags ] } - - Methods [7] { + - Methods [9] { Method [ <internal:pq, ctor> public method __construct ] { - Parameters [5] { @@ -1348,12 +1377,24 @@ Extension [ <persistent> extension #172 pq version 0.5.5 ] { } } + Method [ <internal:pq> public method openAsync ] { + + - Parameters [0] { + } + } + Method [ <internal:pq> public method close ] { - Parameters [0] { } } + Method [ <internal:pq> public method closeAsync ] { + + - Parameters [0] { + } + } + Method [ <internal:pq> public method fetch ] { - Parameters [1] { diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec index 254de6a..675541a 100644 --- a/php-pecl-pq.spec +++ b/php-pecl-pq.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-pq +# remirepo spec file for php-pecl-pq # # Copyright (c) 2014-2015 Remi Collet # License: CC-BY-SA @@ -13,6 +13,7 @@ %global with_zts 0%{?__ztsphp:1} %global pecl_name pq +%global rcver RC1 %if %{?runselftest}%{!?runselftest:1} # Build using "--without tests" to disable tests %global with_tests %{?_without_tests:0}%{!?_without_tests:1} @@ -30,16 +31,23 @@ Summary: PostgreSQL client library (libpq) binding Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.5.5 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Version: 0.6.0 +%if 0%{?rcver:1} +Release: 0.1.%{rcver}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +%else +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +%endif License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?rcver}.tgz + +# https://github.com/m6w6/ext-pq/issues/2 (to revert) +Patch0: %{pecl_name}-upstream.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel > 9 -BuildRequires: %{?scl_prefix}php-devel > 5.2 +BuildRequires: %{?scl_prefix}php-devel > 5.4 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-pecl-raphf-devel @@ -100,16 +108,18 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version} NTS +mv %{pecl_name}-%{version}%{?rcver} NTS # Don't install tests sed -e '/role="test"/d' -i package.xml cd NTS +%patch0 -p1 -R -b .upstream + # Sanity check, really often broken extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h) -if test "x${extver}" != "x%{version}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}. +if test "x${extver}" != "x%{version}%{?rcver}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?rcver}. exit 1 fi cd .. @@ -130,6 +140,7 @@ EOF cd NTS %{_bindir}/phpize %configure \ + --with-libdir=%{_lib} \ --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} @@ -137,6 +148,7 @@ make %{?_smp_mflags} cd ../ZTS %{_bindir}/zts-phpize %configure \ + --with-libdir=%{_lib} \ --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif @@ -165,12 +177,20 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi %postun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -264,6 +284,10 @@ rm -rf %{buildroot} %changelog +* Wed Jun 10 2015 Remi Collet <remi@fedoraproject.org> - 0.6.0-0.1.RC1 +- Update to 0.6.0RC1 +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.5.5-1.1 - Fedora 21 SCL mass rebuild diff --git a/pq-upstream.patch b/pq-upstream.patch new file mode 100644 index 0000000..793be83 --- /dev/null +++ b/pq-upstream.patch @@ -0,0 +1,58 @@ +From 0e66a82238ad0aacbf646d0016193a064a4b7ecb Mon Sep 17 00:00:00 2001 +From: Chris Wright <daverandom@php.net> +Date: Sun, 14 Dec 2014 14:33:42 +0000 +Subject: [PATCH] Build improvements + +- Allow direct path to headers directory to be specified +- Add apt-get install location to default search path +--- + config9.m4 | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/config9.m4 b/config9.m4 +index ed2e3a3..b63f2ad 100644 +--- a/config9.m4 ++++ b/config9.m4 +@@ -2,14 +2,22 @@ PHP_ARG_WITH(pq, [whether to enable libpq (PostgreSQL) support], + [ --with-pq[=DIR] Include libpq support]) + + if test "$PHP_PQ" != "no"; then +- SEARCH_PATH="/usr/local /usr /opt" ++ SEARCH_PATH="/usr/local /usr /usr/include/postgresql /opt" + if test "$PHP_PQ" != "yes"; then + SEARCH_PATH="$PHP_PQ $SEARCH_PATH" + fi + for i in $SEARCH_PATH; do ++ AC_MSG_CHECKING(for $i/libpq-events.h) ++ if test -f "$i/libpq-events.h"; then ++ PQ_DIR=$i ++ AC_MSG_RESULT(yep) ++ break ++ fi ++ AC_MSG_RESULT(nope) ++ + AC_MSG_CHECKING(for $i/include/libpq-events.h) + if test -f "$i/include/libpq-events.h"; then +- PQ_DIR=$i ++ PQ_DIR=$i/include + AC_MSG_RESULT(yep) + break + fi +@@ -19,7 +27,7 @@ if test "$PHP_PQ" != "no"; then + if test -z "$PQ_DIR"; then + AC_MSG_ERROR(could not find include/libpq-events.h) + fi +- PHP_ADD_INCLUDE($PQ_DIR/include) ++ PHP_ADD_INCLUDE($PQ_DIR) + + ifdef([AC_PROG_EGREP], [ + AC_PROG_EGREP +@@ -32,7 +40,7 @@ if test "$PHP_PQ" != "no"; then + dnl + AC_DEFUN([PQ_CHECK_CONST], [ + AC_MSG_CHECKING(for $1) +- if $EGREP -q $1 $PQ_DIR/include/libpq-fe.h; then ++ if $EGREP -q $1 $PQ_DIR/libpq-fe.h; then + AC_DEFINE(HAVE_$1, 1, [Have $1]) + AC_MSG_RESULT(yep) + else |