[packages/php-yui-css-compressor/dev-4.x] up to 4.1.0; breaking change: code in tubalmartin/CssMin namespace

glen glen at pld-linux.org
Mon Jul 17 21:27:35 CEST 2017


commit 97ec91cf986df227f9e3a60d47f8cca7dfb265ee
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Jul 17 21:54:41 2017 +0300

    up to 4.1.0; breaking change: code in tubalmartin/CssMin namespace

 abspath.patch               | 20 --------------------
 php-yui-css-compressor.spec | 30 +++++++++++++++---------------
 2 files changed, 15 insertions(+), 35 deletions(-)
---
diff --git a/php-yui-css-compressor.spec b/php-yui-css-compressor.spec
index 4b313aa..fa1f622 100644
--- a/php-yui-css-compressor.spec
+++ b/php-yui-css-compressor.spec
@@ -1,18 +1,17 @@
 # TODO
 # - gui
+# - cli tool
 %define		php_min_version 5.0.0
-%define		ver	2.4.8
 %define		subver 10
 %include	/usr/lib/rpm/macros.php
 Summary:	A PHP port of the YUI CSS compressor
 Name:		php-yui-css-compressor
-Version:	%{ver}.%{subver}
-Release:	4
+Version:	4.1.0
+Release:	1
 License:	BSD
 Group:		Development/Languages/PHP
-Source0:	https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/archive/v%{ver}-p%{subver}/%{name}-%{version}.tar.gz
-# Source0-md5:	5013d0b1448cce1a001241d778c7c5f4
-Patch0:		abspath.patch
+Source0:	https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	0db7fd4a3af66b68df701317e7ed50b8
 URL:		https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.553
@@ -21,28 +20,29 @@ Requires:	php(pcre)
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		appdir	%{php_data_dir}/tubalmartin/CssMin
+
 %description
 A PHP port of the YUI CSS compressor
 
 This port is based on version 2.4.8 (Jun 12, 2013) of the YUI
 compressor.
 
+This port contains fixes & features not present in the original YUI
+compressor.
+
 %prep
-%setup -q -n YUI-CSS-compressor-PHP-port-%{ver}-p%{subver}
-%patch0 -p1
+%setup -q -n YUI-CSS-compressor-PHP-port-%{version}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{php_data_dir}/cssmin
-ln -s cssmin/cssmin.php $RPM_BUILD_ROOT%{php_data_dir}/cssmin.php
-ln -s cssmin/cssmin.php $RPM_BUILD_ROOT%{php_data_dir}/CSSmin.php
-cp -a cssmin.php data $RPM_BUILD_ROOT%{php_data_dir}/cssmin
+install -d $RPM_BUILD_ROOT%{appdir}
+cp -a src/* $RPM_BUILD_ROOT%{appdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%{php_data_dir}/cssmin.php
-%{php_data_dir}/CSSmin.php
-%{php_data_dir}/cssmin
+%dir %(dirname %{appdir})
+%{appdir}
diff --git a/abspath.patch b/abspath.patch
deleted file mode 100644
index 639efb6..0000000
--- a/abspath.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- YUI-CSS-compressor-PHP-port-2.4.8-p10/./cssmin.php~	2017-04-04 17:38:03.000000000 +0300
-+++ YUI-CSS-compressor-PHP-port-2.4.8-p10/./cssmin.php	2017-04-26 12:23:21.253149342 +0300
-@@ -703,7 +703,7 @@
-     {
-         $patterns = array();
-         $replacements = array();
--        $longNamedColors = include 'data/named-to-hex-color-map.php';
-+        $longNamedColors = include __DIR__ . '/data/named-to-hex-color-map.php';
-         $propertiesWithColors = array(
-             'color',
-             'background(?:-color)?',
-@@ -750,7 +750,7 @@
-         $pattern =
-             '/(=\s*?["\']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/iS';
-         $_index = $index = $lastIndex = $offset = 0;
--        $longHexColors = include 'data/hex-to-named-color-map.php';
-+        $longHexColors = include __DIR__ . '/data/hex-to-named-color-map.php';
-         $sb = array();
- 
-         while (preg_match($pattern, $css, $m, 0, $offset)) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-yui-css-compressor.git/commitdiff/97ec91cf986df227f9e3a60d47f8cca7dfb265ee



More information about the pld-cvs-commit mailing list