From be9c16ffae597f03473b6eb1c7b6771731f50c60 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 16 Mar 2016 12:56:26 +0100 Subject: php-sabre-vobject: 3.4.6 (synced with Fedora) --- php-sabre-vobject-autoload.php | 18 ++++++++++ php-sabre-vobject.spec | 74 +++++++++++++++++++++++--------------- sabre-vobject-bin.patch | 80 ++++++++++++++++++++++++++---------------- 3 files changed, 112 insertions(+), 60 deletions(-) create mode 100644 php-sabre-vobject-autoload.php diff --git a/php-sabre-vobject-autoload.php b/php-sabre-vobject-autoload.php new file mode 100644 index 0000000..aa94f26 --- /dev/null +++ b/php-sabre-vobject-autoload.php @@ -0,0 +1,18 @@ +register(); +} + +$fedoraClassLoader->addPrefix('Sabre\\VObject\\', dirname(dirname(__DIR__))); diff --git a/php-sabre-vobject.spec b/php-sabre-vobject.spec index 6ab3783..c974b13 100644 --- a/php-sabre-vobject.spec +++ b/php-sabre-vobject.spec @@ -1,4 +1,4 @@ -# Spec file for php-sabre-vobject +# remirepo/fedora spec file for php-sabre-vobject # # Copyright (c) 2013-2016 Remi Collet # License: CC-BY-SA @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit a064447d7e76dc564ffcf3a830057c2f0c17bfbd +%global gh_commit c2606c5985aabd14f37d444e494d72f67b71d290 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner fruux %global gh_project sabre-vobject @@ -14,22 +14,31 @@ Name: php-%{gh_project} Summary: Library to parse and manipulate iCalendar and vCard objects -Version: 3.2.4 +Version: 3.4.6 Release: 1%{?dist} URL: http://sabre.io/vobject/ -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz License: BSD Group: Development/Libraries +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source1: %{name}-autoload.php -# replace composer autloader by PSR-O trivial one +# replace composer autloader Patch0: %{gh_project}-bin.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} +BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php(language) >= 5.3.1 -BuildRequires: php-phpunit-PHPUnit +BuildRequires: php-mbstring +BuildRequires: php-date +BuildRequires: php-json +BuildRequires: php-pcre +BuildRequires: php-spl +BuildRequires: php-xml +# Autoloader +BuildRequires: php-composer(symfony/class-loader) %endif # From composer.json @@ -37,12 +46,15 @@ BuildRequires: php-phpunit-PHPUnit # "ext-mbstring" : "*" Requires: php(language) >= 5.3.1 Requires: php-mbstring -# From phpcompatinfo report for version 3.2.0 +# From phpcompatinfo report for version 3.4.5 +Requires: php-cli Requires: php-date Requires: php-json Requires: php-pcre Requires: php-spl Requires: php-xml +# Autoloader +Requires: php-composer(symfony/class-loader) Provides: php-composer(sabre/vobject) = %{version} @@ -59,18 +71,8 @@ years. The VObject library has 100% unittest coverage. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p0 -b .psr0 - -: Create trivial PSR0 autoloader for tests -cat < - 3.4.6-1 +- update to 3.4.6 + * Wed Jul 16 2014 Remi Collet - 3.2.4-1 - update to 3.2.4 @@ -129,4 +145,4 @@ phpunit \ - update to 3.1.3 * Tue Dec 31 2013 Remi Collet - 2.1.3-1 -- Initial packaging \ No newline at end of file +- Initial packaging diff --git a/sabre-vobject-bin.patch b/sabre-vobject-bin.patch index 3514fcf..60b7f9a 100644 --- a/sabre-vobject-bin.patch +++ b/sabre-vobject-bin.patch @@ -1,38 +1,56 @@ -diff -up bin/vobject.psr0 bin/vobject ---- bin/vobject.psr0 2014-04-06 09:55:39.145932310 +0200 -+++ bin/vobject 2014-04-06 09:59:04.416686079 +0200 -@@ -1,24 +1,21 @@ --#!/usr/bin/env php -+#!/usr/bin/php - addPsr4('Sabre\\VObject\\',__DIR__ . '/VObject'); +- + if (!defined('SABRE_TEMPDIR')) { + define('SABRE_TEMPDIR', __DIR__ . '/temp/'); + } +@@ -23,3 +21,7 @@ if (!defined('SABRE_TEMPDIR')) { + if (!file_exists(SABRE_TEMPDIR)) { + mkdir(SABRE_TEMPDIR); + } ++ ++// Not catched by autoloader ++require_once __DIR__ . '/VObject/TestCase.php'; ++require_once __DIR__ . '/VObject/ITip/BrokerTester.php'; -- cgit