summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-06 10:51:53 +0100
committerRemi Collet <remi@remirepo.net>2018-11-06 10:51:53 +0100
commit1edd263f2352536f78d1c76c6db0f196605d47a4 (patch)
tree4f22fc8e09c25cc7e5ef68d35f401e123d81e57e
parentd264d77adefb33d8490a5570c62ad4cde1f52084 (diff)
update to 1.1.3
add devel sub-package adopt standard php build system (phpize)
-rw-r--r--Makefile1
-rw-r--r--PHPINFO9
-rw-r--r--REFLECTION2
-rw-r--r--php-zephir-parser-build.patch77
-rw-r--r--php-zephir-parser.spec44
5 files changed, 34 insertions, 99 deletions
diff --git a/Makefile b/Makefile
index 8357299..9584397 100644
--- a/Makefile
+++ b/Makefile
@@ -3,5 +3,6 @@ NAME := $(shell basename $(SRCDIR))
include ../../common/Makefile
refl:
+ php -d extension=zephir_parser.so --ri "zephir parser" > PHPINFO
php -d extension=zephir_parser.so --re "zephir parser" > REFLECTION
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..e460c5f
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,9 @@
+
+Zephir Parser
+
+
+The Zephir Parser delivered as a C extension for the PHP language.
+Zephir Parser => enabled
+Author => Zephir Team and contributors
+Version => 1.1.3
+Build Date => Nov 6 2018 10:36:34
diff --git a/REFLECTION b/REFLECTION
index dca0b5c..42debb7 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #189 Zephir Parser version 1.1.2 ] {
+Extension [ <persistent> extension #199 Zephir Parser version 1.1.3 ] {
- Functions {
Function [ <internal:Zephir Parser> function zephir_parse_file ] {
diff --git a/php-zephir-parser-build.patch b/php-zephir-parser-build.patch
deleted file mode 100644
index 27c2ef1..0000000
--- a/php-zephir-parser-build.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -up ./install.rpm ./install
---- ./install.rpm 2017-11-09 08:30:30.000000000 +0100
-+++ ./install 2017-11-10 06:55:13.646045853 +0100
-@@ -50,7 +50,6 @@ fi
-
- # Check best compilation flags for compiler
- export CC=gcc
--export CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer"
-
- # Set defaults
- PHPIZE_BIN=`command -v phpize 2>/dev/null || true`
-@@ -91,28 +90,6 @@ if [ "${PHP_FULL_VERSION:0:3}" == "5.4"
- exit 1
- fi
-
--# Detect possible flags
--echo "int main() {}" > t.c
--gcc ${CFLAGS} t.c -o t 2> t.t
--if [ $? != 0 ]; then
-- chmod +x gcccpuopt
-- BFLAGS=`./gcccpuopt`
-- export CFLAGS="-O2 -fomit-frame-pointer $BFLAGS"
-- gcc ${CFLAGS} t.c -o t 2> t.t
-- if [ $? != 0 ]; then
-- export CFLAGS="-O2"
-- fi
--fi
--
--# Activate some gcc specific optimizations for gcc >= 4
--if [ $(gcc -dumpversion | cut -f1 -d.) -ge 4 ]; then
-- gcc ${CFLAGS} -fvisibility=hidden t.c -o t 2> t.t && export CFLAGS="$CFLAGS -fvisibility=hidden"
--fi
--
--gcc ${CFLAGS} -flto t.c -o t 2> t.t && { export CFLAGS="$CFLAGS -flto"; export LDFLAGS="$LDFLAGS $CFLAGS"; }
--
--rm -f t.t t.c t
--
- cd ${CURRENT_DIR}/parser
-
- # Cleanup
-@@ -182,36 +159,3 @@ if [ "$(uname -s 2>/dev/null)" = "Darwin
- aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
- fi
-
--./configure \
-- --silent \
-- --with-php-config=${PHPCONFIG_BIN} \
-- --enable-zephir_parser
--
--# Perform the compilation
--make -s -j"$(getconf _NPROCESSORS_ONLN)"
--make -s install
--
--# Clean current compilation
--if [ -f Makefile ]; then
-- make -s clean
-- ${PHPIZE_BIN} --clean
--fi
--
--cd ${CURRENT_DIR}/parser
--
--# Cleanup
--rm -f \
-- *.o \
-- *.lo \
-- lemon \
-- scanner.c \
-- parser.c \
-- parser.php5.c \
-- parser.php5.h \
-- parser.php5.out \
-- parser.php7.c \
-- parser.php7.h \
-- parser.php7.out \
-- config.h.in~
--
--echo -e "\nThanks for compiling Zephir Parser!\nBuild succeed: Please restart your web server to complete the installation\n"
diff --git a/php-zephir-parser.spec b/php-zephir-parser.spec
index 105e2df..5afe7bc 100644
--- a/php-zephir-parser.spec
+++ b/php-zephir-parser.spec
@@ -8,18 +8,11 @@
#
%if 0%{?scl:1}
-%global with_tests 0
%scl_package php-zephyr-parser
-%else
-%if 0%{?fedora}
-%global with_tests 0%{!?_without_tests:1}
-%else
-# Disable in EL as 5.5 can't use phpunit
-%global with_tests 0%{?_with_tests:1}
-%endif
%endif
-%global gh_commit c9ce3dffb3dce622a4015d400a517ababfb66462
+%global with_tests 0%{!?_without_tests:1}
+%global gh_commit ae0124b7ded64b4c1b9e487698297c7e7dcb7a8f
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20161126
%global gh_owner phalcon
@@ -27,17 +20,14 @@
%global ext_name zephir_parser
Name: %{?scl_prefix}%{gh_project}
-Version: 1.1.2
-Release: 2%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.1.3
+Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: Zephir parser extension
License: MIT
URL: https://getcomposer.org/
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-# honours RPM build flags and drop configure/make/install part
-Patch0: %{gh_project}-build.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.5
%if 0%{?rhel} == 6
@@ -58,11 +48,17 @@ Provides: %{?scl_prefix}zephir-parser = %{version}
The Zephir Parser delivered as a C extension for the PHP language.
+%package devel
+Summary: %{name} developer files (headers)
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{?scl_prefix}php-devel%{?_isa}
+
+%description devel
+These are the files needed to compile programs using %{name}.
+
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1 -b .rpm
-grep CFLAGS install && exit 1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_ZEPHIR_PARSER_VERSION/{s/.* "//;s/".*$//;p}' zephir_parser.h)
@@ -75,11 +71,7 @@ fi
%build
%{?dtsenable}
-%{?scl:module load %{scl}}
-echo $PATH
-php-config --version
-./install
-
+%{_bindir}/phpize
%configure \
--with-php-config=%{_bindir}/php-config \
--enable-zephir_parser
@@ -116,7 +108,17 @@ REPORT_EXIT_STATUS=1 \
%{php_extdir}/%{ext_name}.so
+%files devel
+%{php_incldir}/ext/%{ext_name}
+
+
+
%changelog
+* Tue Nov 6 2018 Remi Collet <remi@remirepo.net> - 1.1.3-1
+- update to 1.1.3
+- add devel sub-package
+- adopt standard php build system (phpize)
+
* Mon Feb 26 2018 Remi Collet <remi@remirepo.net> - 1.1.2-2
- use "module load ..." command instead of "scl enable ..."