[packages/minify/dev-3.0] update to 3.0 dev (590cf9b)
glen
glen at pld-linux.org
Tue Nov 17 15:39:32 CET 2015
commit 0f2f02258056effa0cbabfd759e0ec61ae7c7b47
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Nov 17 16:39:04 2015 +0200
update to 3.0 dev (590cf9b)
contentfunc-params.patch | 56 +++++++++++++++++++++++-------------------------
minify.spec | 18 ++++++----------
paths.patch | 56 ++++++++++++++++++++++++------------------------
pear-firephp.patch | 12 +++++------
yui-path.patch | 4 ++--
5 files changed, 69 insertions(+), 77 deletions(-)
---
diff --git a/minify.spec b/minify.spec
index a76f5f1..8f36f08 100644
--- a/minify.spec
+++ b/minify.spec
@@ -3,19 +3,20 @@
Summary: Combines, minifies, and caches JavaScript and CSS files on demand to speed up page loads
Name: minify
Version: 3.0
-Release: 2
+Release: 2.1
License: New BSD License
Group: Applications/WWW
#Source0: https://github.com/mrclay/minify/archive/%{version}/%{name}-%{version}.tar.gz
-Source0: https://github.com/glensc/minify/archive/lessphp-dev3/%{name}-%{version}.tar.gz
-# Source0-md5: a84596d6b4febde3d5f4b00698b7cc70
+#Source0: https://github.com/glensc/minify/archive/lessphp-dev3/%{name}-%{version}.tar.gz
+Source0: https://github.com/mrclay/minify/archive/590cf9b/%{name}-%{version}.tar.gz
+# Source0-md5: 981586911d22283e4ff1d7eb18001839
Patch0: paths.patch
Patch1: pear-firephp.patch
Patch2: yui-path.patch
Patch3: contentfunc-params.patch
Source1: apache.conf
Source2: lighttpd.conf
-URL: http://code.google.com/p/minify/
+URL: https://github.com/mrclay/minify
BuildRequires: rpmbuild(macros) >= 1.654
BuildRequires: unzip
Requires: php-%{name} = %{version}-%{release}
@@ -88,14 +89,7 @@ mv %{name}-*/* .
find -type f | xargs chmod a-x
# not needed for functionality
-%{__rm} min/lib/Minify/YUI/CssCompressor.java
-%{__rm} -r min/lib/MrClay
-
-# php-firephp-FirePHPCore
-%{__rm} min/lib/FirePHP.php
-
-# php-yui-css-compressor
-%{__rm} min/lib/CSSmin.php
+%{__rm} -r lib/MrClay
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
diff --git a/contentfunc-params.patch b/contentfunc-params.patch
index 3fd4070..441bd17 100644
--- a/contentfunc-params.patch
+++ b/contentfunc-params.patch
@@ -10,38 +10,36 @@ Subject: [PATCH] add parameters support to getContentFunc Minify_Source
min/lib/Minify/Source.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/min/lib/Minify/Source.php b/min/lib/Minify/Source.php
-index 5a85d10..6825dd4 100644
---- a/min/lib/Minify/Source.php
-+++ b/min/lib/Minify/Source.php
-@@ -81,6 +81,9 @@ public function __construct($spec)
- $this->_content = $spec['content'];
+--- minify-3.0/lib/Minify/Source.php~ 2015-11-17 16:35:06.295748327 +0200
++++ minify-3.0/lib/Minify/Source.php 2015-11-17 16:35:25.438800513 +0200
+@@ -50,6 +50,11 @@
+ */
+ protected $getContentFunc = null;
+
++ /**
++ * @var array
++ */
++ protected $getContentFuncParams = array();
++
+ /**
+ * @var string
+ */
+@@ -100,6 +100,9 @@
+ $this->content = $spec['content'];
} else {
- $this->_getContentFunc = $spec['getContentFunc'];
-+ $this->_getContentFuncParams = isset($spec['getContentFuncParams'])
+ $this->getContentFunc = $spec['getContentFunc'];
++ $this->getContentFuncParams = isset($spec['getContentFuncParams'])
+ ? $spec['getContentFuncParams']
+ : array();
}
$this->lastModified = isset($spec['lastModified'])
? $spec['lastModified']
-@@ -108,7 +111,7 @@ public function getContent()
- ? file_get_contents($this->filepath)
- : ((null !== $this->_content)
- ? $this->_content
-- : call_user_func($this->_getContentFunc, $this->_id)
-+ : call_user_func_array($this->_getContentFunc, array_merge(array($this->_id), $this->_getContentFuncParams))
- );
- // remove UTF-8 BOM if present
- return (pack("CCC",0xef,0xbb,0xbf) === substr($content, 0, 3))
-@@ -188,6 +188,11 @@
- protected $_getContentFunc = null;
-
- /**
-+ * @var array
-+ */
-+ protected $_getContentFuncParams = array();
-+
-+ /**
- * @var string
- */
- protected $_id = null;
+@@ -171,7 +174,7 @@
+ {
+ if (null === $this->filepath) {
+ if (null === $this->content) {
+- $content = call_user_func($this->getContentFunc, $this->id);
++ $content = call_user_func_array($this->getContentFunc, array_merge(array($this->id), $this->getContentFuncParams))
+ } else {
+ $content = $this->content;
+ }
diff --git a/paths.patch b/paths.patch
index a74d527..a6bbbed 100644
--- a/paths.patch
+++ b/paths.patch
@@ -1,16 +1,16 @@
---- ./min/builder/index.php~ 2011-05-04 01:07:43.000000000 +0300
-+++ ./min/builder/index.php 2011-05-04 01:07:45.460184430 +0300
-@@ -244,7 +244,7 @@
- // regenerate cache if any of these change
- filemtime(__FILE__)
- ,filemtime(dirname(__FILE__) . '/../config.php')
-- ,filemtime(dirname(__FILE__) . '/../lib/Minify.php')
-+ ,filemtime($min_libPath.'/Minify.php')
- )
- ,'minifyAll' => true
- ,'encodeOutput' => $encodeOutput
---- minify-3.0/min/config.php~ 2014-09-21 14:35:09.243242976 +0300
-+++ minify-3.0/min/config.php 2014-09-21 14:35:25.356335208 +0300
+#--- ./builder/index.php~ 2011-05-04 01:07:43.000000000 +0300
+#+++ ./builder/index.php 2011-05-04 01:07:45.460184430 +0300
+#@@ -244,7 +244,7 @@
+# // regenerate cache if any of these change
+# filemtime(__FILE__)
+# ,filemtime(dirname(__FILE__) . '/../config.php')
+#- ,filemtime(dirname(__FILE__) . '/../lib/Minify.php')
+#+ ,filemtime($min_libPath.'/Minify.php')
+# )
+# ,'minifyAll' => true
+# ,'encodeOutput' => $encodeOutput
+--- minify-3.0/config.php~ 2014-09-21 14:35:09.243242976 +0300
++++ minify-3.0/config.php 2014-09-21 14:35:25.356335208 +0300
@@ -52,6 +52,7 @@
//$min_cachePath = 'c:\\WINDOWS\\Temp';
//$min_cachePath = '/tmp';
@@ -19,17 +19,17 @@
/**
* To use APC/Memcache/ZendPlatform for cache storage, require the class and
-@@ -161,7 +162,7 @@
- * Path to Minify's lib folder. If you happen to move it, change
- * this accordingly.
- */
--$min_libPath = dirname(__FILE__) . '/lib';
-+$min_libPath = '/usr/share/php';
-
-
- // try to disable output_compression (may not have an effect)
---- minify-2.1.5/min/lib/Minify/ClosureCompiler.php~ 2012-06-08 12:52:57.000000000 +0300
-+++ minify-2.1.5/min/lib/Minify/ClosureCompiler.php 2012-06-08 12:53:25.935196513 +0300
+#@@ -161,7 +162,7 @@
+# * Path to Minify's lib folder. If you happen to move it, change
+# * this accordingly.
+# */
+#-$min_libPath = dirname(__FILE__) . '/lib';
+#+$min_libPath = '/usr/share/php';
+#
+#
+# // try to disable output_compression (may not have an effect)
+--- minify-2.1.5/lib/Minify/ClosureCompiler.php~ 2012-06-08 12:52:57.000000000 +0300
++++ minify-2.1.5/lib/Minify/ClosureCompiler.php 2012-06-08 12:53:25.935196513 +0300
@@ -39,7 +39,7 @@
*
* @var string
@@ -39,8 +39,8 @@
/**
* Writable temp directory. This must be set before calling minifyJs().
---- minify-2.1.5/./min/lib/Minify/ClosureCompiler.php~ 2012-06-08 12:53:52.000000000 +0300
-+++ minify-2.1.5/./min/lib/Minify/ClosureCompiler.php 2012-06-08 12:57:47.829573716 +0300
+--- minify-2.1.5/lib/Minify/ClosureCompiler.php~ 2012-06-08 12:53:52.000000000 +0300
++++ minify-2.1.5/lib/Minify/ClosureCompiler.php 2012-06-08 12:57:47.829573716 +0300
@@ -46,7 +46,7 @@
*
* @var string
@@ -50,8 +50,8 @@
/**
* Filepath of "java" executable (may be needed if not in shell's PATH)
---- minify-2.1.5/./min/lib/Minify/YUICompressor.php~ 2012-06-08 12:53:52.000000000 +0300
-+++ minify-2.1.5/./min/lib/Minify/YUICompressor.php 2012-06-08 12:58:02.023505622 +0300
+--- minify-2.1.5/lib/Minify/YUICompressor.php~ 2012-06-08 12:53:52.000000000 +0300
++++ minify-2.1.5/lib/Minify/YUICompressor.php 2012-06-08 12:58:02.023505622 +0300
@@ -42,7 +42,7 @@
*
* @var string
diff --git a/pear-firephp.patch b/pear-firephp.patch
index 12dde46..cf2f605 100644
--- a/pear-firephp.patch
+++ b/pear-firephp.patch
@@ -1,5 +1,5 @@
---- minify-2.1.5/min/index.php~ 2012-11-24 17:36:52.000000000 +0200
-+++ minify-2.1.5/min/index.php 2012-11-24 17:38:55.089986108 +0200
+--- minify-2.1.5/index.php~ 2012-11-24 17:36:52.000000000 +0200
++++ minify-2.1.5/index.php 2012-11-24 17:38:55.089986108 +0200
@@ -42,6 +42,7 @@
if ($min_errorLogger) {
@@ -8,8 +8,8 @@
$min_errorLogger = FirePHP::getInstance(true);
}
Minify_Logger::setLogger($min_errorLogger);
---- minify-2.1.5/min_extras/tools/minifyTextarea.php~ 2012-11-24 17:36:52.000000000 +0200
-+++ minify-2.1.5/min_extras/tools/minifyTextarea.php 2012-11-24 17:39:25.224568521 +0200
+-- minify-2.1.5/min_extras/tools/minifyTextarea.php~ 2012-11-24 17:36:52.000000000 +0200
+++ minify-2.1.5/min_extras/tools/minifyTextarea.php 2012-11-24 17:39:25.224568521 +0200
@@ -31,6 +31,7 @@
$sourceSpec['minifyOptions']['cssMinifier'] = array('Minify_CSS', 'minify');
}
@@ -18,8 +18,8 @@
Minify_Logger::setLogger(FirePHP::getInstance(true));
try {
Minify::serve('Files', array(
---- minify-2.1.5/min_unit_tests/_inc.php~ 2012-11-24 17:36:52.000000000 +0200
-+++ minify-2.1.5/min_unit_tests/_inc.php 2012-11-24 17:39:45.102059111 +0200
+-- minify-2.1.5/min_unit_tests/_inc.php~ 2012-11-24 17:36:52.000000000 +0200
+++ minify-2.1.5/min_unit_tests/_inc.php 2012-11-24 17:39:45.102059111 +0200
@@ -17,6 +17,7 @@
if ($min_errorLogger && true !== $min_errorLogger) { // custom logger
Minify_Logger::setLogger($min_errorLogger);
diff --git a/yui-path.patch b/yui-path.patch
index 1dc52a6..c7af0de 100644
--- a/yui-path.patch
+++ b/yui-path.patch
@@ -1,5 +1,5 @@
---- minify-2.1.5/min/lib/Minify/YUICompressor.php~ 2012-03-29 15:05:43.656136317 +0300
-+++ minify-2.1.5/min/lib/Minify/YUICompressor.php 2012-03-29 15:04:42.000000000 +0300
+--- minify-2.1.5/lib/Minify/YUICompressor.php~ 2012-03-29 15:05:43.656136317 +0300
++++ minify-2.1.5/lib/Minify/YUICompressor.php 2012-03-29 15:04:42.000000000 +0300
@@ -34,7 +34,7 @@
*
* @var string
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/minify.git/commitdiff/0f2f02258056effa0cbabfd759e0ec61ae7c7b47
More information about the pld-cvs-commit
mailing list