diff options
author | Remi Collet <remi@remirepo.net> | 2017-06-08 12:34:50 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-06-08 12:34:50 +0200 |
commit | 7e0af6d69fbc915ce3760984fbc180fee51c7249 (patch) | |
tree | 53b3d57eaa9dfee6be3598fe15e73c5a7151dd22 | |
parent | 3b269efd7bce0ec087c82d2a6a1b3bfeb3098b2e (diff) |
new package
-rw-r--r-- | REFLECTION | 402 | ||||
-rw-r--r-- | mustache-pr34.patch | 21 | ||||
-rw-r--r-- | php-pecl-mustache.spec | 37 |
3 files changed, 453 insertions, 7 deletions
diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..fa1f04b --- /dev/null +++ b/REFLECTION @@ -0,0 +1,402 @@ +Extension [ <persistent> extension #112 mustache version 0.7.4RC1 ] { + + - Classes [8] { + Class [ <internal:mustache> class MustacheAST ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { + Property [ <default> protected $binaryString ] + } + + - Methods [5] { + Method [ <internal:mustache, ctor> public method __construct ] { + + - Parameters [1] { + Parameter #0 [ <optional> $vars ] + } + } + + Method [ <internal:mustache> public method __sleep ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method toArray ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method __toString ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method __wakeup ] { + + - Parameters [0] { + } + } + } + } + + Class [ <internal:mustache> class MustacheCode ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { + Property [ <default> protected $binaryString ] + } + + - Methods [3] { + Method [ <internal:mustache, ctor> public method __construct ] { + + - Parameters [1] { + Parameter #0 [ <optional> $codeString ] + } + } + + Method [ <internal:mustache> public method toReadableString ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method __toString ] { + + - Parameters [0] { + } + } + } + } + + Class [ <internal:mustache> class Mustache ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [13] { + Method [ <internal:mustache, ctor> public method __construct ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method getEscapeByDefault ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method getStartSequence ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method getStopSequence ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method setEscapeByDefault ] { + + - Parameters [1] { + Parameter #0 [ <required> $escapeByDefault ] + } + } + + Method [ <internal:mustache> public method setStartSequence ] { + + - Parameters [1] { + Parameter #0 [ <required> $startSequence ] + } + } + + Method [ <internal:mustache> public method setStopSequence ] { + + - Parameters [1] { + Parameter #0 [ <required> $stopSequence ] + } + } + + Method [ <internal:mustache> public method compile ] { + + - Parameters [1] { + Parameter #0 [ <required> $tmpl ] + } + } + + Method [ <internal:mustache> public method execute ] { + + - Parameters [1] { + Parameter #0 [ <required> $code ] + } + } + + Method [ <internal:mustache> public method parse ] { + + - Parameters [1] { + Parameter #0 [ <required> $tmpl ] + } + } + + Method [ <internal:mustache> public method render ] { + + - Parameters [3] { + Parameter #0 [ <required> $str ] + Parameter #1 [ <required> $vars ] + Parameter #2 [ <required> $partials ] + } + } + + Method [ <internal:mustache> public method tokenize ] { + + - Parameters [1] { + Parameter #0 [ <required> $tmpl ] + } + } + + Method [ <internal:mustache> public method debugDataStructure ] { + + - Parameters [1] { + Parameter #0 [ <required> $vars ] + } + } + } + } + + Class [ <internal:mustache> class MustacheData ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ <internal:mustache, ctor> public method __construct ] { + + - Parameters [1] { + Parameter #0 [ <required> $tmpl ] + } + } + + Method [ <internal:mustache> public method toValue ] { + + - Parameters [0] { + } + } + } + } + + Class [ <internal:mustache> class MustacheTemplate ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [1] { + Property [ <default> protected $template ] + } + + - Methods [2] { + Method [ <internal:mustache, ctor> public method __construct ] { + + - Parameters [1] { + Parameter #0 [ <optional> $vars ] + } + } + + Method [ <internal:mustache> public method __toString ] { + + - Parameters [0] { + } + } + } + } + + Class [ <internal:mustache> class MustacheException extends Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ <default> protected $message ] + Property [ <default> protected $code ] + Property [ <default> protected $file ] + Property [ <default> protected $line ] + } + + - Methods [10] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { + + - Parameters [3] { + Parameter #0 [ <optional> $message ] + Parameter #1 [ <optional> $code ] + Parameter #2 [ <optional> $previous ] + } + } + + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + } + } + } + + Class [ <internal:mustache> class MustacheParserException extends MustacheException implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ <default> protected $message ] + Property [ <default> protected $code ] + Property [ <default> protected $file ] + Property [ <default> protected $line ] + } + + - Methods [10] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { + + - Parameters [3] { + Parameter #0 [ <optional> $message ] + Parameter #1 [ <optional> $code ] + Parameter #2 [ <optional> $previous ] + } + } + + Method [ <internal:Core, inherits Exception> public method __wakeup ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + } + + Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] { + } + } + } + + Class [ <internal:mustache> class MustacheLambdaHelper ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [2] { + Method [ <internal:mustache, ctor> private method __construct ] { + + - Parameters [0] { + } + } + + Method [ <internal:mustache> public method render ] { + + - Parameters [1] { + Parameter #0 [ <required> $tmpl ] + } + } + } + } + } +} + diff --git a/mustache-pr34.patch b/mustache-pr34.patch new file mode 100644 index 0000000..d8ab8f9 --- /dev/null +++ b/mustache-pr34.patch @@ -0,0 +1,21 @@ +From bb038a0b28a8b5b2b12fe2ebd1873726d1feeed9 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 8 Jun 2017 11:35:56 +0200 +Subject: [PATCH] use proper command for build + +--- + config.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config.m4 b/config.m4 +index b795b02..51c3ef4 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -69,6 +69,6 @@ if test "$PHP_MUSTACHE" != "no"; then + PHP_ADD_INCLUDE($LIBMUSTACHE_DIR/include/mustache) + + PHP_SUBST(MUSTACHE_SHARED_LIBADD) +- PHP_NEW_EXTENSION(mustache, $PHP_MUSTACHE_SOURCES, $ext_shared, , $PHP_MUSTACHE_FLAGS) ++ PHP_NEW_EXTENSION(mustache, $PHP_MUSTACHE_SOURCES, $ext_shared, , $PHP_MUSTACHE_FLAGS, cxx) + fi + diff --git a/php-pecl-mustache.spec b/php-pecl-mustache.spec index 2bfc23f..30aff1b 100644 --- a/php-pecl-mustache.spec +++ b/php-pecl-mustache.spec @@ -12,8 +12,9 @@ %endif %global pecl_name mustache -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global ini_name 40-%{pecl_name}.ini +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global ini_name 40-%{pecl_name}.ini +%global with_tests 0%{!?_without_tests:1} %global upstream_version 0.7.4 %global upstream_prever RC1 @@ -27,9 +28,11 @@ Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Patch0: %{pecl_name}-pr34.patch + BuildRequires: %{?scl_prefix}php-devel > 5.6 BuildRequires: %{?scl_prefix}php-pear -#BuildRequires: mustache-devel +BuildRequires: libmustache-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -86,6 +89,7 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 # Sanity check, really often broken extver=$(sed -n '/PHP_MUSTACHE_VERSION/{s/.* "//;s/".*$//;p}' php_mustache.h) @@ -108,7 +112,8 @@ EOF %build -%{?dtsenable} +# can't use {?dtsenable} +# https://github.com/jbboehr/php-mustache/issues/35 cd NTS %{_bindir}/phpize @@ -132,8 +137,6 @@ make %{?_smp_mflags} %install -%{?dtsenable} - make -C NTS install INSTALL_ROOT=%{buildroot} # install config file @@ -181,18 +184,38 @@ cd NTS --define extension=modules/%{pecl_name}.so \ --modules | grep %{pecl_name} + +%if %{with_tests} +# Upstream test suite +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php --show-diff +%endif + %if %{with_zts} : Minimal load test for ZTS extension cd ../ZTS %{__ztsphp} --no-php-ini \ --define extension=modules/%{pecl_name}.so \ --modules | grep %{pecl_name} + +%if %{with_tests} +# Upstream test suite +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__ztsphp} -n run-tests.php --show-diff +%endif %endif %files %{!?_licensedir:%global license %%doc} -%license NTS/LICENSE +%license NTS/LICENSE.md +%doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} |