diff options
| author | Remi Collet <fedora@famillecollet.com> | 2016-05-04 10:05:05 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2016-05-04 10:05:05 +0200 | 
| commit | 2a13d8647bd9f0ef47fc0d2efe28590aedc1d75f (patch) | |
| tree | 40dca999ea05889cb159ba8f7102c6688066efda | |
php-pecl-svn: 1.0.3 (php 5 only, new package)
| -rw-r--r-- | 3_01.txt | 68 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | REFLECTION | 442 | ||||
| -rw-r--r-- | php-pecl-svn.spec | 239 | ||||
| -rw-r--r-- | svn-upstream.patch | 70 | 
5 files changed, 823 insertions, 0 deletions
| diff --git a/3_01.txt b/3_01.txt new file mode 100644 index 0000000..6059c80 --- /dev/null +++ b/3_01.txt @@ -0,0 +1,68 @@ +--------------------------------------------------------------------  +                  The PHP License, version 3.01 +Copyright (c) 1999 - 2014 The PHP Group. All rights reserved. +--------------------------------------------------------------------  + +Redistribution and use in source and binary forms, with or without +modification, is permitted provided that the following conditions +are met: + +  1. Redistributions of source code must retain the above copyright +     notice, this list of conditions and the following disclaimer. +  +  2. Redistributions in binary form must reproduce the above copyright +     notice, this list of conditions and the following disclaimer in +     the documentation and/or other materials provided with the +     distribution. +  +  3. The name "PHP" must not be used to endorse or promote products +     derived from this software without prior written permission. For +     written permission, please contact group@php.net. +   +  4. Products derived from this software may not be called "PHP", nor +     may "PHP" appear in their name, without prior written permission +     from group@php.net.  You may indicate that your software works in +     conjunction with PHP by saying "Foo for PHP" instead of calling +     it "PHP Foo" or "phpfoo" +  +  5. The PHP Group may publish revised and/or new versions of the +     license from time to time. Each version will be given a +     distinguishing version number. +     Once covered code has been published under a particular version +     of the license, you may always continue to use it under the terms +     of that version. You may also choose to use such covered code +     under the terms of any subsequent version of the license +     published by the PHP Group. No one other than the PHP Group has +     the right to modify the terms applicable to covered code created +     under this License. + +  6. Redistributions of any form whatsoever must retain the following +     acknowledgment: +     "This product includes PHP software, freely available from +     <http://www.php.net/software/>". + +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND  +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A  +PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE PHP +DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,  +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES  +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR  +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------------------------------------  + +This software consists of voluntary contributions made by many +individuals on behalf of the PHP Group. + +The PHP Group can be contacted via Email at group@php.net. + +For more information on the PHP Group and the PHP project,  +please see <http://www.php.net>. + +PHP includes the Zend Engine, freely available at +<http://www.zend.com>. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..7f33ff0 --- /dev/null +++ b/REFLECTION @@ -0,0 +1,442 @@ +Extension [ <persistent> extension #165 svn version 1.0.3 ] { + +  - Constants [60] { +    Constant [ string SVN_AUTH_PARAM_DEFAULT_USERNAME ] { svn:auth:username } +    Constant [ string SVN_AUTH_PARAM_DEFAULT_PASSWORD ] { svn:auth:password } +    Constant [ string SVN_AUTH_PARAM_NON_INTERACTIVE ] { svn:auth:non-interactive } +    Constant [ string SVN_AUTH_PARAM_DONT_STORE_PASSWORDS ] { svn:auth:dont-store-passwords } +    Constant [ string SVN_AUTH_PARAM_NO_AUTH_CACHE ] { svn:auth:no-auth-cache } +    Constant [ string SVN_AUTH_PARAM_SSL_SERVER_FAILURES ] { svn:auth:ssl:failures } +    Constant [ string SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO ] { svn:auth:ssl:cert-info } +    Constant [ string SVN_AUTH_PARAM_CONFIG ] { svn:auth:config-category-servers } +    Constant [ string SVN_AUTH_PARAM_SERVER_GROUP ] { svn:auth:server-group } +    Constant [ string SVN_AUTH_PARAM_CONFIG_DIR ] { svn:auth:config-dir } +    Constant [ string PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS ] { php:svn:auth:ignore-ssl-verify-errors } +    Constant [ string SVN_FS_CONFIG_FS_TYPE ] { fs-type } +    Constant [ string SVN_FS_TYPE_BDB ] { bdb } +    Constant [ string SVN_FS_TYPE_FSFS ] { fsfs } +    Constant [ string SVN_PROP_REVISION_DATE ] { svn:date } +    Constant [ string SVN_PROP_REVISION_ORIG_DATE ] { svn:original-date } +    Constant [ string SVN_PROP_REVISION_AUTHOR ] { svn:author } +    Constant [ string SVN_PROP_REVISION_LOG ] { svn:log } +    Constant [ integer SVN_REVISION_INITIAL ] { 1 } +    Constant [ integer SVN_REVISION_HEAD ] { -1 } +    Constant [ integer SVN_REVISION_BASE ] { -2 } +    Constant [ integer SVN_REVISION_COMMITTED ] { -3 } +    Constant [ integer SVN_REVISION_PREV ] { -4 } +    Constant [ integer SVN_REVISION_UNSPECIFIED ] { -5 } +    Constant [ integer SVN_NON_RECURSIVE ] { 1 } +    Constant [ integer SVN_DISCOVER_CHANGED_PATHS ] { 2 } +    Constant [ integer SVN_OMIT_MESSAGES ] { 4 } +    Constant [ integer SVN_STOP_ON_COPY ] { 8 } +    Constant [ integer SVN_ALL ] { 16 } +    Constant [ integer SVN_SHOW_UPDATES ] { 32 } +    Constant [ integer SVN_NO_IGNORE ] { 64 } +    Constant [ integer SVN_IGNORE_EXTERNALS ] { 128 } +    Constant [ integer SVN_DEPTH_UNKNOWN ] { -2 } +    Constant [ integer SVN_DEPTH_EXCLUDE ] { -1 } +    Constant [ integer SVN_DEPTH_EMPTY ] { 0 } +    Constant [ integer SVN_DEPTH_FILES ] { 1 } +    Constant [ integer SVN_DEPTH_IMMEDIATES ] { 2 } +    Constant [ integer SVN_DEPTH_INFINITY ] { 3 } +    Constant [ integer SVN_WC_STATUS_NONE ] { 1 } +    Constant [ integer SVN_WC_STATUS_UNVERSIONED ] { 2 } +    Constant [ integer SVN_WC_STATUS_NORMAL ] { 3 } +    Constant [ integer SVN_WC_STATUS_ADDED ] { 4 } +    Constant [ integer SVN_WC_STATUS_MISSING ] { 5 } +    Constant [ integer SVN_WC_STATUS_DELETED ] { 6 } +    Constant [ integer SVN_WC_STATUS_REPLACED ] { 7 } +    Constant [ integer SVN_WC_STATUS_MODIFIED ] { 8 } +    Constant [ integer SVN_WC_STATUS_MERGED ] { 9 } +    Constant [ integer SVN_WC_STATUS_CONFLICTED ] { 10 } +    Constant [ integer SVN_WC_STATUS_IGNORED ] { 11 } +    Constant [ integer SVN_WC_STATUS_OBSTRUCTED ] { 12 } +    Constant [ integer SVN_WC_STATUS_EXTERNAL ] { 13 } +    Constant [ integer SVN_WC_STATUS_INCOMPLETE ] { 14 } +    Constant [ integer SVN_NODE_NONE ] { 0 } +    Constant [ integer SVN_NODE_FILE ] { 1 } +    Constant [ integer SVN_NODE_DIR ] { 2 } +    Constant [ integer SVN_NODE_UNKNOWN ] { 3 } +    Constant [ integer SVN_WC_SCHEDULE_NORMAL ] { 0 } +    Constant [ integer SVN_WC_SCHEDULE_ADD ] { 1 } +    Constant [ integer SVN_WC_SCHEDULE_DELETE ] { 2 } +    Constant [ integer SVN_WC_SCHEDULE_REPLACE ] { 3 } +  } + +  - Functions { +    Function [ <internal:svn> function svn_checkout ] { +    } +    Function [ <internal:svn> function svn_cat ] { +    } +    Function [ <internal:svn> function svn_ls ] { +    } +    Function [ <internal:svn> function svn_log ] { +    } +    Function [ <internal:svn> function svn_auth_set_parameter ] { +    } +    Function [ <internal:svn> function svn_auth_get_parameter ] { +    } +    Function [ <internal:svn> function svn_client_version ] { +    } +    Function [ <internal:svn> function svn_config_ensure ] { +    } +    Function [ <internal:svn> function svn_diff ] { +    } +    Function [ <internal:svn> function svn_cleanup ] { +    } +    Function [ <internal:svn> function svn_revert ] { +    } +    Function [ <internal:svn> function svn_resolved ] { +    } +    Function [ <internal:svn> function svn_commit ] { +    } +    Function [ <internal:svn> function svn_lock ] { +    } +    Function [ <internal:svn> function svn_unlock ] { +    } +    Function [ <internal:svn> function svn_add ] { +    } +    Function [ <internal:svn> function svn_status ] { +    } +    Function [ <internal:svn> function svn_update ] { +    } +    Function [ <internal:svn> function svn_update2 ] { +    } +    Function [ <internal:svn> function svn_import ] { +    } +    Function [ <internal:svn> function svn_info ] { +    } +    Function [ <internal:svn> function svn_export ] { +    } +    Function [ <internal:svn> function svn_copy ] { +    } +    Function [ <internal:svn> function svn_switch ] { +    } +    Function [ <internal:svn> function svn_blame ] { +    } +    Function [ <internal:svn> function svn_delete ] { +    } +    Function [ <internal:svn> function svn_mkdir ] { +    } +    Function [ <internal:svn> function svn_move ] { +    } +    Function [ <internal:svn> function svn_proplist ] { +    } +    Function [ <internal:svn> function svn_propget ] { +    } +    Function [ <internal:svn> function svn_propset ] { +    } +    Function [ <internal:svn> function svn_prop_delete ] { +    } +    Function [ <internal:svn> function svn_revprop_get ] { +    } +    Function [ <internal:svn> function svn_revprop_set ] { +    } +    Function [ <internal:svn> function svn_revprop_delete ] { +    } +    Function [ <internal:svn> function svn_repos_create ] { +    } +    Function [ <internal:svn> function svn_repos_recover ] { +    } +    Function [ <internal:svn> function svn_repos_hotcopy ] { +    } +    Function [ <internal:svn> function svn_repos_open ] { +    } +    Function [ <internal:svn> function svn_repos_fs ] { +    } +    Function [ <internal:svn> function svn_repos_fs_begin_txn_for_commit ] { +    } +    Function [ <internal:svn> function svn_repos_fs_commit_txn ] { +    } +    Function [ <internal:svn> function svn_fs_revision_root ] { +    } +    Function [ <internal:svn> function svn_fs_check_path ] { +    } +    Function [ <internal:svn> function svn_fs_revision_prop ] { +    } +    Function [ <internal:svn> function svn_fs_dir_entries ] { +    } +    Function [ <internal:svn> function svn_fs_node_created_rev ] { +    } +    Function [ <internal:svn> function svn_fs_youngest_rev ] { +    } +    Function [ <internal:svn> function svn_fs_file_contents ] { +    } +    Function [ <internal:svn> function svn_fs_file_length ] { +    } +    Function [ <internal:svn> function svn_fs_txn_root ] { +    } +    Function [ <internal:svn> function svn_fs_make_file ] { +    } +    Function [ <internal:svn> function svn_fs_make_dir ] { +    } +    Function [ <internal:svn> function svn_fs_apply_text ] { +    } +    Function [ <internal:svn> function svn_fs_copy ] { +    } +    Function [ <internal:svn> function svn_fs_delete ] { +    } +    Function [ <internal:svn> function svn_fs_begin_txn2 ] { +    } +    Function [ <internal:svn> function svn_fs_is_dir ] { +    } +    Function [ <internal:svn> function svn_fs_is_file ] { +    } +    Function [ <internal:svn> function svn_fs_node_prop ] { +    } +    Function [ <internal:svn> function svn_fs_change_node_prop ] { +    } +    Function [ <internal:svn> function svn_fs_contents_changed ] { +    } +    Function [ <internal:svn> function svn_fs_props_changed ] { +    } +    Function [ <internal:svn> function svn_fs_abort_txn ] { +    } +    Function [ <internal:svn> function svn_fs_open_txn ] { +    } +    Function [ <internal:svn> function svn_fs_txn_prop ] { +    } +  } + +  - Classes [4] { +    Class [ <internal:svn> class Svn ] { + +      - Constants [20] { +        Constant [ integer NON_RECURSIVE ] { 1 } +        Constant [ integer DISCOVER_CHANGED_PATHS ] { 2 } +        Constant [ integer OMIT_MESSAGES ] { 4 } +        Constant [ integer STOP_ON_COPY ] { 8 } +        Constant [ integer ALL ] { 16 } +        Constant [ integer SHOW_UPDATES ] { 32 } +        Constant [ integer NO_IGNORE ] { 64 } +        Constant [ integer IGNORE_EXTERNALS ] { 128 } +        Constant [ integer INITIAL ] { 1 } +        Constant [ integer HEAD ] { -1 } +        Constant [ integer BASE ] { -2 } +        Constant [ integer COMMITTED ] { -3 } +        Constant [ integer PREV ] { -4 } +        Constant [ integer UNSPECIFIED ] { -5 } +        Constant [ integer DEPTH_UNKNOWN ] { -2 } +        Constant [ integer DEPTH_EXCLUDE ] { -1 } +        Constant [ integer DEPTH_EMPTY ] { 0 } +        Constant [ integer DEPTH_FILES ] { 1 } +        Constant [ integer DEPTH_IMMEDIATES ] { 2 } +        Constant [ integer DEPTH_INFINITY ] { 3 } +      } + +      - Static properties [0] { +      } + +      - Static methods [42] { +        Method [ <internal:svn> static public method checkout ] { +        } + +        Method [ <internal:svn> static public method cat ] { +        } + +        Method [ <internal:svn> static public method ls ] { +        } + +        Method [ <internal:svn> static public method log ] { +        } + +        Method [ <internal:svn> static public method auth_set_parameter ] { +        } + +        Method [ <internal:svn> static public method auth_get_parameter ] { +        } + +        Method [ <internal:svn> static public method client_version ] { +        } + +        Method [ <internal:svn> static public method config_ensure ] { +        } + +        Method [ <internal:svn> static public method diff ] { +        } + +        Method [ <internal:svn> static public method cleanup ] { +        } + +        Method [ <internal:svn> static public method revert ] { +        } + +        Method [ <internal:svn> static public method resolved ] { +        } + +        Method [ <internal:svn> static public method commit ] { +        } + +        Method [ <internal:svn> static public method lock ] { +        } + +        Method [ <internal:svn> static public method unlock ] { +        } + +        Method [ <internal:svn> static public method add ] { +        } + +        Method [ <internal:svn> static public method status ] { +        } + +        Method [ <internal:svn> static public method update ] { +        } + +        Method [ <internal:svn> static public method update2 ] { +        } + +        Method [ <internal:svn> static public method import ] { +        } + +        Method [ <internal:svn> static public method info ] { +        } + +        Method [ <internal:svn> static public method export ] { +        } + +        Method [ <internal:svn> static public method copy ] { +        } + +        Method [ <internal:svn> static public method switch ] { +        } + +        Method [ <internal:svn> static public method blame ] { +        } + +        Method [ <internal:svn> static public method delete ] { +        } + +        Method [ <internal:svn> static public method mkdir ] { +        } + +        Method [ <internal:svn> static public method move ] { +        } + +        Method [ <internal:svn> static public method proplist ] { +        } + +        Method [ <internal:svn> static public method propget ] { +        } + +        Method [ <internal:svn> static public method propset ] { +        } + +        Method [ <internal:svn> static public method prop_delete ] { +        } + +        Method [ <internal:svn> static public method revprop_get ] { +        } + +        Method [ <internal:svn> static public method revprop_set ] { +        } + +        Method [ <internal:svn> static public method revprop_delete ] { +        } + +        Method [ <internal:svn> static public method repos_create ] { +        } + +        Method [ <internal:svn> static public method repos_recover ] { +        } + +        Method [ <internal:svn> static public method repos_hotcopy ] { +        } + +        Method [ <internal:svn> static public method repos_open ] { +        } + +        Method [ <internal:svn> static public method repos_fs ] { +        } + +        Method [ <internal:svn> static public method repos_fs_begin_txn_for_commit ] { +        } + +        Method [ <internal:svn> static public method repos_fs_commit_txn ] { +        } +      } + +      - Properties [0] { +      } + +      - Methods [0] { +      } +    } + +    Class [ <internal:svn> class SvnWc ] { + +      - Constants [14] { +        Constant [ integer NONE ] { 1 } +        Constant [ integer UNVERSIONED ] { 2 } +        Constant [ integer NORMAL ] { 3 } +        Constant [ integer ADDED ] { 4 } +        Constant [ integer MISSING ] { 5 } +        Constant [ integer DELETED ] { 6 } +        Constant [ integer REPLACED ] { 7 } +        Constant [ integer MODIFIED ] { 8 } +        Constant [ integer MERGED ] { 9 } +        Constant [ integer CONFLICTED ] { 10 } +        Constant [ integer IGNORED ] { 11 } +        Constant [ integer OBSTRUCTED ] { 12 } +        Constant [ integer EXTERNAL ] { 13 } +        Constant [ integer INCOMPLETE ] { 14 } +      } + +      - Static properties [0] { +      } + +      - Static methods [0] { +      } + +      - Properties [0] { +      } + +      - Methods [0] { +      } +    } + +    Class [ <internal:svn> class SvnWcSchedule ] { + +      - Constants [4] { +        Constant [ integer NORMAL ] { 0 } +        Constant [ integer ADD ] { 1 } +        Constant [ integer DELETE ] { 2 } +        Constant [ integer REPLACE ] { 3 } +      } + +      - Static properties [0] { +      } + +      - Static methods [0] { +      } + +      - Properties [0] { +      } + +      - Methods [0] { +      } +    } + +    Class [ <internal:svn> class SvnNode ] { + +      - Constants [4] { +        Constant [ integer NONE ] { 0 } +        Constant [ integer FILE ] { 1 } +        Constant [ integer DIR ] { 2 } +        Constant [ integer UNKNOWN ] { 3 } +      } + +      - Static properties [0] { +      } + +      - Static methods [0] { +      } + +      - Properties [0] { +      } + +      - Methods [0] { +      } +    } +  } +} + diff --git a/php-pecl-svn.spec b/php-pecl-svn.spec new file mode 100644 index 0000000..eee1705 --- /dev/null +++ b/php-pecl-svn.spec @@ -0,0 +1,239 @@ +# remirepo spec file for php-pecl-svn +# +# Copyright (c) 2016 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%scl_package       php-pecl-svn +%endif + +%global with_zts   0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name  svn +%if "%{php_version}" < "5.6" +%global ini_name    %{pecl_name}.ini +%else +%global ini_name    40-%{pecl_name}.ini +%endif + +Summary:        PHP Bindings for the Subversion Revision control system +Name:           %{?sub_prefix}php-pecl-%{pecl_name} +Version:        1.0.3 +Release:        1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License:        PHP +Group:          Development/Languages +URL:            http://pecl.php.net/package/%{pecl_name} +Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# From headers +Source1:        http://www.php.net/license/3_01.txt + +# http://svn.php.net/viewvc?view=revision&revision=339128 - for apr < 1.5 +# http://svn.php.net/viewvc?view=revision&revision=339129 - fix ZTS +Patch0:         %{pecl_name}-upstream.patch + +BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires:  %{?scl_prefix}php-devel +BuildRequires:  %{?scl_prefix}php-pear +BuildRequires:  subversion-devel >= 1.3 +BuildRequires:  neon-devel + +Requires:       %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires:       %{?scl_prefix}php(api) = %{php_core_api} +Requires:       %{?scl_prefix}php-sockets%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +Provides:       %{?scl_prefix}php-%{pecl_name} = %{version} +Provides:       %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides:       %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides:       %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +%if "%{?scl_prefix}" != "%{?sub_prefix}" +Provides:       %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides:       %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} +# Other third party repo stuff +Obsoletes:     php53-pecl-%{pecl_name}  <= %{version} +Obsoletes:     php53u-pecl-%{pecl_name} <= %{version} +Obsoletes:     php54-pecl-%{pecl_name}  <= %{version} +Obsoletes:     php54w-pecl-%{pecl_name} <= %{version} +%if "%{php_version}" > "5.5" +Obsoletes:     php55u-pecl-%{pecl_name} <= %{version} +Obsoletes:     php55w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "5.6" +Obsoletes:     php56u-pecl-%{pecl_name} <= %{version} +Obsoletes:     php56w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "7.0" +Obsoletes:     php70u-pecl-%{pecl_name} <= %{version} +Obsoletes:     php70w-pecl-%{pecl_name} <= %{version} +%endif +%endif + +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter shared private +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif + + +%description +Bindings for the Subversion revision control system, providing a +method for manipulating a working copy or repository with PHP. + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + + +%prep +%setup -q -c +mv %{pecl_name}-%{version} NTS + +# Don't install/register tests, install examples as doc +sed -e 's/role="test"/role="src"/' \ +    -e '/EXPERIMENTAL/d' \ +    %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ +    -i package.xml + + +cd NTS +cp %{SOURCE1} LICENSE +%patch0 -p3 -b .up +chmod -x *.c *.h + +# Sanity check, really often broken +extver=$(sed -n '/#define PHP_SVN_VERSION/{s/.* "//;s/".*$//;p}' php_svn.h) +if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then +   : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}. +   exit 1 +fi +cd .. + +%if %{with_zts} +# Duplicate source tree for NTS / ZTS build +cp -pr NTS ZTS +%endif + +# Create configuration file +cat << 'EOF' | tee %{ini_name} +; Enable %{summary} extension module +extension=%{pecl_name}.so +EOF + + +%build +peclbuild() { +%configure \ +    --with-svn \ +    --with-php-config=$1 + +make %{?_smp_mflags} +} + +cd NTS +%{_bindir}/phpize +peclbuild %{_bindir}/php-config + +%if %{with_zts} +cd ../ZTS +%{_bindir}/zts-phpize +peclbuild %{_bindir}/zts-php-config +%endif + + +%install +rm -rf %{buildroot} + +make -C NTS install INSTALL_ROOT=%{buildroot} + +# install config file +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +# Install XML package description +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +%if %{with_zts} +make -C ZTS install INSTALL_ROOT=%{buildroot} + +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + +# Documentation +for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + +%{!?_licensedir:install -Dpm 644 NTS/LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE } \ + + +%if 0%{?fedora} < 24 +# 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 -a -x %{__pecl} ] ; then +    %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + + +%check +cd NTS +: Minimal load test for NTS extension +%{__php} --no-php-ini \ +    --define extension=modules/%{pecl_name}.so \ +    --modules | grep %{pecl_name} + +%if %{with_zts} +cd ../ZTS +: Minimal load test for ZTS extension +%{__ztsphp} --no-php-ini \ +    --define extension=modules/%{pecl_name}.so \ +    --modules | grep %{pecl_name} +%endif + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} +%doc %{pecl_docdir}/%{pecl_name} +%{pecl_xmldir}/%{name}.xml + +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + +%if %{with_zts} +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%{php_ztsextdir}/%{pecl_name}.so +%endif + + +%changelog +* Wed May  4 2016 Remi Collet <remi@fedoraproject.org> - 1.0.3-1 +- initial package, version 1.0.3 (stable) +- fix sources permission (upstream rev 339125) +- add LICENSE file       (upstream rev 339126) +- drop EXPERIMENTAL file (upstream rev 339127) +- add fix for apr < 1.5  (upstream rev 339128) +- add fix for ZTS        (upstream rev 339129) + diff --git a/svn-upstream.patch b/svn-upstream.patch new file mode 100644 index 0000000..e60571d --- /dev/null +++ b/svn-upstream.patch @@ -0,0 +1,70 @@ +--- pecl/svn/trunk/svn.c	2016/05/04 06:34:26	339127 ++++ pecl/svn/trunk/svn.c	2016/05/04 07:26:03	339128 +@@ -977,6 +977,7 @@ + 	apr_pool_t *subpool; + 	svn_opt_revision_t peg_revision; + 	const char *true_path; ++	apr_hash_index_t *hi; +  + 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lbb", + 			&repos_url, &repos_url_len, &revision.value.number, &recurse, &peg) == FAILURE) { +@@ -1021,7 +1022,7 @@ +  + 	array_init(return_value); +  +-	for (apr_hash_index_t *hi = apr_hash_first(subpool, dirents); hi; hi = apr_hash_next(hi)) { ++	for (hi = apr_hash_first(subpool, dirents); hi; hi = apr_hash_next(hi)) { + 		const char *utf8_entryname; + 		svn_dirent_t *dirent; + 		apr_time_t now = apr_time_now(); +@@ -1031,9 +1032,10 @@ + 		char timestr[20]; + 		const char   *utf8_timestr; + 		zval 	*row; ++		const char *key; +  +-		svn_utf_cstring_to_utf8 (&utf8_entryname, apr_hash_this_key(hi), subpool); +-		dirent = apr_hash_this_val(hi); ++		apr_hash_this(hi, &key, NULL, &dirent); ++		svn_utf_cstring_to_utf8 (&utf8_entryname, key, subpool); +  + 		/* svn_time_to_human_cstring gives us something *way* too long + 		to use for this, so we have to roll our own.  We include +@@ -1101,6 +1103,7 @@ + { + 	struct php_svn_log_receiver_baton *baton = (struct php_svn_log_receiver_baton*) ibaton; + 	zval  *row, *paths; ++	apr_hash_index_t *hi; + 	TSRMLS_FETCH(); +  + 	if (rev == 0) { +@@ -1127,7 +1130,7 @@ + 		MAKE_STD_ZVAL(paths); + 		array_init(paths); +  +-		for (apr_hash_index_t *hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi)) { ++		for (hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi)) { + 			svn_log_changed_path_t *log_item; + 			zval *zpaths; + 			const char *path; +@@ -1135,8 +1138,7 @@ + 			MAKE_STD_ZVAL(zpaths); + 			array_init(zpaths); +  +-			path = apr_hash_this_key(hi); +-			log_item = apr_hash_this_val(hi); ++			apr_hash_this(hi, &path, NULL, &log_item); +  + 			add_assoc_stringl(zpaths, "action", &(log_item->action), 1,1); + 			add_assoc_string(zpaths, "path", path, 1); +--- pecl/svn/trunk/svn.c	2016/05/04 07:26:03	339128 ++++ pecl/svn/trunk/svn.c	2016/05/04 07:32:45	339129 +@@ -1154,7 +1154,7 @@ + 			add_assoc_zval(paths, path, zpaths); + 		} +  +-		zend_hash_sort(Z_ARRVAL_P(paths), zend_qsort, compare_keys_as_paths, 1); ++		zend_hash_sort(Z_ARRVAL_P(paths), zend_qsort, compare_keys_as_paths, 1 TSRMLS_CC); + 		add_assoc_zval(row,"paths",paths); + 	} +  | 
