summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-02-25 11:14:15 +0100
committerRemi Collet <remi@remirepo.net>2019-02-25 11:14:15 +0100
commit772efe1be91b4463cdef7415c9a85cc1ed1ae212 (patch)
tree847b49152d5700c9b18bef93accbcda11e7f9bf5
parent43f47004691939eb5dd15eb38cbe4b8f04ea96b5 (diff)
drop fake minifiers
-rw-r--r--cphalcon-nominifier.patch50
-rw-r--r--cssminifier.c26
-rw-r--r--cssminifier.h10
-rw-r--r--jsminifier.c26
-rw-r--r--jsminifier.h10
-rw-r--r--php-phalcon3.spec15
6 files changed, 49 insertions, 88 deletions
diff --git a/cphalcon-nominifier.patch b/cphalcon-nominifier.patch
index e2bd442..33e0a67 100644
--- a/cphalcon-nominifier.patch
+++ b/cphalcon-nominifier.patch
@@ -1,6 +1,43 @@
-diff -up phalcon/assets/filters/cssmin.zep.orig phalcon/assets/filters/cssmin.zep
---- phalcon/assets/filters/cssmin.zep.orig 2019-02-25 09:14:47.881823280 +0100
-+++ phalcon/assets/filters/cssmin.zep 2019-02-25 09:14:53.915856132 +0100
+Backported from 4.x
+
+
+
+From b96c58b525123f1c4ec7d3e832ae08270a46b248 Mon Sep 17 00:00:00 2001
+From: Nikolaos Dimopoulos <nikos@niden.net>
+Date: Mon, 11 Feb 2019 13:01:30 -0500
+Subject: [PATCH] [#13819] - Removing css/js optimizers from the config
+
+---
+ config.json | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/config.json b/config.json
+index f4db4ac594..518e022959 100644
+--- a/config.json
++++ b/config.json
+@@ -31,8 +31,6 @@
+ "phalcon/mvc/model/query/parser.c",
+ "phalcon/mvc/view/engine/volt/parser.c",
+ "phalcon/mvc/view/engine/volt/scanner.c",
+- "phalcon/assets/filters/jsminifier.c",
+- "phalcon/assets/filters/cssminifier.c",
+ "phalcon/mvc/url/utils.c"
+ ],
+ "globals": {
+From 13a603c0af0f880c34a8ad62061610e90f019a9d Mon Sep 17 00:00:00 2001
+From: Nikolaos Dimopoulos <nikos@niden.net>
+Date: Mon, 11 Feb 2019 12:47:37 -0500
+Subject: [PATCH] [#13819] - Removed minifiers
+
+---
+ phalcon/assets/filters/cssmin.zep | 2 +-
+ phalcon/assets/filters/jsmin.zep | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/phalcon/assets/filters/cssmin.zep b/phalcon/assets/filters/cssmin.zep
+index 7ce0b05343..751cc1f4e8 100644
+--- a/phalcon/assets/filters/cssmin.zep
++++ b/phalcon/assets/filters/cssmin.zep
@@ -36,6 +36,6 @@ class Cssmin implements FilterInterface
*/
public function filter(string! content) -> string
@@ -9,9 +46,10 @@ diff -up phalcon/assets/filters/cssmin.zep.orig phalcon/assets/filters/cssmin.ze
+ return content;
}
}
-diff -up phalcon/assets/filters/jsmin.zep.orig phalcon/assets/filters/jsmin.zep
---- phalcon/assets/filters/jsmin.zep.orig 2019-02-25 09:15:05.946921636 +0100
-+++ phalcon/assets/filters/jsmin.zep 2019-02-25 09:15:18.133987990 +0100
+diff --git a/phalcon/assets/filters/jsmin.zep b/phalcon/assets/filters/jsmin.zep
+index 7559c0503d..bc1c5bd9b4 100644
+--- a/phalcon/assets/filters/jsmin.zep
++++ b/phalcon/assets/filters/jsmin.zep
@@ -36,6 +36,6 @@ class Jsmin implements FilterInterface
*/
public function filter(string! content) -> string
diff --git a/cssminifier.c b/cssminifier.c
deleted file mode 100644
index be998d0..0000000
--- a/cssminifier.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Fake version to avoid non-free stuff */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_phalcon.h"
-#include "phalcon.h"
-
-#if PHP_VERSION_ID < 70000
-#include <ext/standard/php_smart_str.h>
-#else
-#include <ext/standard/php_smart_string.h>
-#include <zend_smart_str.h>
-#endif
-
-#include "kernel/main.h"
-#include "kernel/memory.h"
-#include "kernel/fcall.h"
-#include "kernel/exception.h"
-
-int phalcon_cssmin(zval *return_value, zval *style TSRMLS_DC) {
- ZEPHIR_THROW_EXCEPTION_STR(phalcon_assets_exception_ce, "Non-free jsminifier not available");
- return FAILURE;
-}
diff --git a/cssminifier.h b/cssminifier.h
deleted file mode 100644
index 4499c81..0000000
--- a/cssminifier.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Fake version to avoid non-free stuff */
-
-#ifndef PHALCON_ASSETS_FILTERS_CSSMINIFIER_H
-#define PHALCON_ASSETS_FILTERS_CSSMINIFIER_H
-
-#include <Zend/zend.h>
-
-int phalcon_cssmin(zval *return_value, zval *style TSRMLS_DC);
-
-#endif /* PHALCON_ASSETS_FILTERS_CSSMINIFIER_H */
diff --git a/jsminifier.c b/jsminifier.c
deleted file mode 100644
index 9b65d02..0000000
--- a/jsminifier.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Fake version to avoid non-free stuff */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_phalcon.h"
-#include "phalcon.h"
-
-#if PHP_VERSION_ID < 70000
-#include <ext/standard/php_smart_str.h>
-#else
-#include <ext/standard/php_smart_string.h>
-#include <zend_smart_str.h>
-#endif
-
-#include "kernel/main.h"
-#include "kernel/memory.h"
-#include "kernel/fcall.h"
-#include "kernel/exception.h"
-
-int phalcon_jsmin(zval *return_value, zval *script TSRMLS_DC) {
- ZEPHIR_THROW_EXCEPTION_STR(phalcon_assets_exception_ce, "Non-free csssminifier not available");
- return FAILURE;
-}
diff --git a/jsminifier.h b/jsminifier.h
deleted file mode 100644
index 39b9322..0000000
--- a/jsminifier.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Fake version to avoid non-free stuff */
-
-#ifndef PHALCON_ASSETS_FILTERS_JSMINIFIER_H
-#define PHALCON_ASSETS_FILTERS_JSMINIFIER_H
-
-#include <Zend/zend.h>
-
-int phalcon_jsmin(zval *return_value, zval *script TSRMLS_DC);
-
-#endif /* PHALCON_ASSETS_FILTERS_JSMINIFIER_H */
diff --git a/php-phalcon3.spec b/php-phalcon3.spec
index f6ecd5d..75035dd 100644
--- a/php-phalcon3.spec
+++ b/php-phalcon3.spec
@@ -35,7 +35,7 @@
Name: %{?sub_prefix}php-phalcon3
Version: 3.4.3
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: Phalcon Framework
License: MIT
@@ -43,11 +43,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_project}-%{version}-strip.tar.xz
# Script to generate the stripped archive from a git clone
Source1: strip.sh
-# Fake minifiers
-Source2: cssminifier.c
-Source3: cssminifier.h
-Source4: jsminifier.c
-Source5: jsminifier.h
# Backported from 4.x
Patch0: %{gh_project}-nominifier.patch
@@ -111,10 +106,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-
-cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
- ext/phalcon/assets/filters/
-%patch0 -p0 -b .nominifier
+%patch0 -p1 -b .nominifier
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PHALCON_VERSION/{s/.* "//;s/".*$//;p}' ext/php_phalcon.h)
@@ -261,6 +253,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Feb 25 2019 Remi Collet <remi@remirepo.net> - 3.4.3-2
+- drop fake minifiers
+
* Mon Feb 25 2019 Remi Collet <remi@remirepo.net> - 3.4.3-1
- update to 3.4.3 using zephir 0.10.15
- make minifiers return unchanged input value