From 71195395d5d5808978db68a75050f11b9708ea31 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 14 May 2017 17:58:58 +0200 Subject: sync with Fedora --- php-doctrine-annotations.spec | 78 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 40 deletions(-) (limited to 'php-doctrine-annotations.spec') diff --git a/php-doctrine-annotations.spec b/php-doctrine-annotations.spec index c255ca3..430b1fd 100644 --- a/php-doctrine-annotations.spec +++ b/php-doctrine-annotations.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-doctrine-annotations # -# Copyright (c) 2013-2015 Shawn Iwinski +# Copyright (c) 2013-2017 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -36,7 +36,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 4%{?github_release}%{?dist} Summary: PHP docblock annotations parser library Group: Development/Libraries @@ -48,14 +48,15 @@ URL: https://github.com/%{github_owner}/%{github_name} Source0: %{name}-%{version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} ## composer.json -BuildRequires: %{_bindir}/phpunit -BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver} BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver} +BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: php-composer(doctrine/lexer) < %{lexer_max_ver} #BuildRequires: php-composer(doctrine/lexer) >= %%{lexer_min_ver} BuildRequires: php-doctrine-lexer >= %{lexer_min_ver} ## phpcompatinfo (computed from version 1.2.7) @@ -67,11 +68,11 @@ BuildRequires: php-reflection BuildRequires: php-spl BuildRequires: php-tokenizer # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # composer.json -Requires: php(language) >= %{php_min_ver} +Requires: php(language) >= %{php_min_ver} #Requires: php-composer(doctrine/lexer) >= %%{lexer_min_ver} Requires: php-doctrine-lexer >= %{lexer_min_ver} Requires: php-composer(doctrine/lexer) < %{lexer_max_ver} @@ -84,7 +85,7 @@ Requires: php-reflection Requires: php-spl Requires: php-tokenizer # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -95,42 +96,32 @@ Conflicts: php-pear(pear.doctrine-project.org/DoctrineCommon) < 2.4 %description %{summary} (extracted from Doctrine Common). +Autoloader: %{phpdir}/Doctrine/Common/Annotations/autoload.php + %prep %setup -qn %{github_name}-%{github_commit} + +%build : Create autoloader cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Annotations/autoload.php register(); -} +\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Annotations\\', __DIR__); -$fedoraClassLoader->addPrefix('Doctrine\\Common\\Annotations\\', dirname(dirname(dirname(__DIR__)))); - -require_once '%{phpdir}/Doctrine/Common/Lexer/autoload.php'; - -return $fedoraClassLoader; +\Fedora\Autoloader\Dependencies::required(array( + '%{phpdir}/Doctrine/Common/Lexer/autoload.php', +)); AUTOLOAD -%build -# Empty build section, nothing required - - %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir} cp -rp lib/* %{buildroot}%{phpdir}/ @@ -144,26 +135,28 @@ sed "s#require.*autoload.*#require_once '%{buildroot}%{phpdir}/Doctrine/Common/A : Create tests bootstrap cat <<'BOOTSTRAP' | tee bootstrap.php - 1.2.7-4 +- Switch autoloader to php-composer(fedora/autoloader) +- Add max versions to build dependencies +- Test with SCLs if available + * Sat Sep 05 2015 Shawn Iwinski - 1.2.7-1 - Updated to 1.2.7 (RHBZ #1258669 / CVE-2015-5723) - Updated autoloader to load dependencies after self registration -- cgit