From 8d90afb4a403d371af9a686394b5cc55da2f7612 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 11 Mar 2021 07:31:52 +0100 Subject: Update to v0.6.0 Drop Patch0 (backport from upstream - included in this release) --- composer.json | 10 ++- lesserphp--pullrequest-18.patch | 140 --------------------------------------- php-marcusschwarz-lesserphp.spec | 26 +++----- 3 files changed, 14 insertions(+), 162 deletions(-) delete mode 100644 lesserphp--pullrequest-18.patch diff --git a/composer.json b/composer.json index d32a5d4..d1246cb 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "marcusschwarz/lesserphp", "type": "library", "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", - "homepage": "http://leafo.net/lessphp/", + "homepage": "https://www.maswaba.de/lesserphpdocs/", "license": [ "MIT", "GPL-3.0" @@ -24,13 +24,11 @@ "autoload": { "classmap": ["lessc.inc.php"] }, - "extra": { - "branch-alias": { - "dev-master": "0.5.1-dev" - } + "require": { + "php": "^7.2|^7.3|^7.4|^8.0" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "^8.0|^9.0" }, "scripts": { "test": "phpunit" diff --git a/lesserphp--pullrequest-18.patch b/lesserphp--pullrequest-18.patch deleted file mode 100644 index d3e42b9..0000000 --- a/lesserphp--pullrequest-18.patch +++ /dev/null @@ -1,140 +0,0 @@ -diff --git a/.travis.yml b/.travis.yml -index fbaf2e8..f2ead47 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -2,7 +2,6 @@ language: php - - php: - - 5.6 -- - 7.1 - - 7.2 - - 7.3 - - 7.4 -diff --git a/composer.json b/composer.json -index d32a5d4..f96d98d 100644 ---- a/composer.json -+++ b/composer.json -@@ -30,7 +30,7 @@ - } - }, - "require-dev": { -- "phpunit/phpunit": "~4.3" -+ "phpunit/phpunit": ">=4.8.35 <8" - }, - "scripts": { - "test": "phpunit" -diff --git a/lessc.inc.php b/lessc.inc.php -index 4764b28..14299d1 100644 ---- a/lessc.inc.php -+++ b/lessc.inc.php -@@ -1,7 +1,7 @@ - vPrefix) -+ $subProp[1][0] != $this->vPrefix) - { - $subProp[2] = array( - 'list', ' ', -@@ -2759,7 +2759,7 @@ protected function parseChunk() { - $hidden = true; - if (!isset($block->args)) { - foreach ($block->tags as $tag) { -- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) { -+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) { - $hidden = false; - break; - } -@@ -2813,7 +2813,7 @@ protected function isDirective($dirname, $directives) { - protected function fixTags($tags) { - // move @ tags out of variable namespace - foreach ($tags as &$tag) { -- if ($tag{0} == $this->lessc->vPrefix) -+ if ($tag[0] == $this->lessc->vPrefix) - $tag[0] = $this->lessc->mPrefix; - } - return $tags; -diff --git a/tests/ApiTest.php b/tests/ApiTest.php -index fe1bbff..8e0a6f4 100644 ---- a/tests/ApiTest.php -+++ b/tests/ApiTest.php -@@ -2,7 +2,9 @@ - - require_once __DIR__ . "/../lessc.inc.php"; - --class ApiTest extends PHPUnit_Framework_TestCase { -+use PHPUnit\Framework\TestCase; -+ -+class ApiTest extends TestCase { - public function setUp() { - $this->less = new lessc(); - $this->less->importDir = array(__DIR__ . "/inputs/test-imports"); -diff --git a/tests/ErrorHandlingTest.php b/tests/ErrorHandlingTest.php -index f928974..5bb7b6f 100644 ---- a/tests/ErrorHandlingTest.php -+++ b/tests/ErrorHandlingTest.php -@@ -1,7 +1,9 @@ - less = new lessc(); - } -diff --git a/tests/InputTest.php b/tests/InputTest.php -index 32db95b..8a0724c 100644 ---- a/tests/InputTest.php -+++ b/tests/InputTest.php -@@ -2,6 +2,8 @@ - - require_once __DIR__ . "/../lessc.inc.php"; - -+use PHPUnit\Framework\TestCase; -+ - // Runs all the tests in inputs/ and compares their output to ouputs/ - - function _dump($value) { -@@ -12,7 +14,7 @@ function _quote($str) { - return preg_quote($str, "/"); - } - --class InputTest extends PHPUnit_Framework_TestCase { -+class InputTest extends TestCase { - protected static $importDirs = array("inputs/test-imports"); - - protected static $testDirs = array( -diff --git a/tests/ServerTest.php b/tests/ServerTest.php -index 5537f59..5e8a03f 100644 ---- a/tests/ServerTest.php -+++ b/tests/ServerTest.php -@@ -1,6 +1,8 @@ - = 5.3.0 +Requires: php-cli >= 7.2.0 Requires: php-ctype Requires: php-date Requires: php-fileinfo @@ -66,7 +60,6 @@ Autoloader: %{pkgdir}/autoload.php %prep %setup -n %{repo_name}-%{version} -%patch0 -p1 # Lessify is broken upstream and we don't want to install it rm lessify lessify.inc.php @@ -74,9 +67,6 @@ rm lessify lessify.inc.php # Fix include paths sed -e 's|^require $path."lessc.inc.php";$|require "%{pkgdir}/lessc.inc.php";|' -i plessc -# Fix homepage link in composer.json (still points to pre-fork page) -sed -e 's|"http://leafo.net/lessphp/"|"https://www.maswaba.de/lesserphpdocs/"|' -i composer.json - %build # Create autoloader @@ -99,9 +89,9 @@ install -m 0755 -p plessc %{buildroot}%{_bindir}/plessc %check %if 0%{?with_tests} -for cmd in php php72 php73 php74; do +for cmd in php php73 php74 php80; do if which $cmd; then - $cmd %{_bindir}/phpunit7 --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php + $cmd %{_bindir}/phpunit9 --verbose --bootstrap %{buildroot}%{pkgdir}/autoload.php fi done %endif @@ -117,6 +107,10 @@ done %changelog +* Wed Mar 10 2021 Artur Frenszek-Iwicki - 0.6.0-1 +- Update to v0.6.0 +- Drop Patch0 (backport from upstream - included in this release) + * Tue Mar 24 2020 Remi Collet - 0.5.4-5 - backport for remirepo -- cgit