diff options
| -rw-r--r-- | php-webmozart-assert.spec | 35 | 
1 files changed, 26 insertions, 9 deletions
diff --git a/php-webmozart-assert.spec b/php-webmozart-assert.spec index 0f955b3..91b047e 100644 --- a/php-webmozart-assert.spec +++ b/php-webmozart-assert.spec @@ -10,6 +10,8 @@  # Please preserve changelog entries  # +# enable bootstrap when need to provide a new autoloader +%global bootstrap 0  %global github_owner     webmozart  %global github_name      assert  %global github_version   1.3.0 @@ -21,14 +23,19 @@  # "php": "^5.3.3 || ^7.0"  %global php_min_ver 5.3.3 +%if %{bootstrap} +# Build using "--with tests" to enable tests +%global with_tests 0%{?_with_tests:1} +%else  # Build using "--without tests" to disable tests  %global with_tests 0%{!?_without_tests:1} +%endif  %{!?phpdir:  %global phpdir  %{_datadir}/php}  Name:          php-%{composer_vendor}-%{composer_project}  Version:       %{github_version} -Release:       1%{?github_release}%{?dist} +Release:       3%{?github_release}%{?dist}  Summary:       Assertions to validate method input/output with nice error messages  Group:         Development/Libraries @@ -89,13 +96,10 @@ cat <<'AUTOLOAD' | tee src/autoload.php  <?php  /**   * Autoloader for %{name} and its' dependencies - * (created by %{name}-%{version}-%{release}).   */  require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; -\Fedora\Autoloader\Dependencies::required(array( -    __DIR__.'/Assert.php', -)); +\Fedora\Autoloader\Autoload::addPsr4('Webmozart\\Assert\\', __DIR__);  AUTOLOAD @@ -109,17 +113,19 @@ cp -rp src %{buildroot}%{phpdir}/Webmozart/Assert  : Create tests bootstrap  cat <<'BOOTSTRAP' | tee bootstrap.php  <?php -require_once '%{buildroot}%{phpdir}/Webmozart/Assert/autoload.php';  \Fedora\Autoloader\Autoload::addPsr4('Webmozart\\Assert\\Tests\\', __DIR__.'/tests');  BOOTSTRAP  : Upstream tests  RETURN_CODE=0  PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55 php56} php70 php71 php72; do +for PHP_EXEC in php %{?rhel:php54 php55 php56} php70 php71 php72 php73; do      if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then -        $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ -            || RETURN_CODE=1 +        $PHP_EXEC \ +            -d auto_prepend_file=%{buildroot}%{phpdir}/Webmozart/Assert/autoload.php \ +            $PHPUNIT \ +                --bootstrap bootstrap.php \ +                --verbose || RETURN_CODE=1      fi  done  exit $RETURN_CODE @@ -138,6 +144,17 @@ exit $RETURN_CODE  %changelog +* Fri Oct 19 2018 Remi Collet <remi@remirepo.net> - 1.3.0-3 +- fix autoloader, use PSR-4 to avoid duplicated definition +- prepend autoloader to ensure we use current version in tests +- fix FTBFS #1605449 + +* Fri Oct 19 2018 Remi Collet <remi@remirepo.net> - 1.3.0-2 +- fix autoloader, use PSR-4 to avoid duplicated definition +- prepend autoloader to ensure we use current version in tests +- fix FTBFS #1605449 +- bootstrap build +  * Sun Apr 22 2018 Shawn Iwinski <shawn@iwin.ski> - 1.3.0-1  - Update to 1.3.0 (RHBZ #1539946)  - Add get source script  | 
