%bcond_without alternatives # use alternatives system to select default phar and php-fpm
%bcond_with default_php # build this PHP as default PHP in system (disables alternatives)
# - General options:
-%bcond_without embed # disable building Embedded API
+%bcond_with embed # disable building Embedded API
%bcond_with gcov # Enable Code coverage reporting
%bcond_without kerberos5 # without Kerberos5 support
%bcond_with suhosin # with suhosin patch, has little point in PHP>=5.3, see https://github.com/stefanesser/suhosin/issues/42#issuecomment-41728178
%undefine with_filter
%endif
-%define rel 14
+%define rel 31
%define orgname php
%define ver_suffix 54
%define php_suffix %{!?with_default_php:%{ver_suffix}}
Patch12: http://ilia.ws/patch/type_hint_53_v2.txt
%endif
Patch14: %{orgname}-no_pear_install.patch
-#Patch15: %{orgname}-zlib.patch # no longer needed?
Patch17: %{orgname}-readline.patch
Patch18: %{orgname}-nohttpd.patch
Patch19: %{orgname}-gd_imagerotate_enable.patch
Patch27: %{orgname}-config-dir.patch
Patch29: %{orgname}-fcgi-graceful.patch
Patch31: %{orgname}-fcgi-error_log-no-newlines.patch
-#Patch32: %{orgname}-curl-limit-speed.patch # applied upstream
Patch34: %{orgname}-libtool.patch
Patch35: %{orgname}-tds.patch
Patch36: %{orgname}-mysql-charsetphpini.patch
Patch45: %{orgname}-imap-annotations.patch
Patch46: %{orgname}-imap-myrights.patch
Patch47: suhosin.patch
-#Patch49: %{orgname}-m4-divert.patch # no longer needed, upstream supports new ac
Patch50: extension-shared-optional-dep.patch
Patch51: spl-shared.patch
Patch52: pcre-shared.patch
Patch53: fix-test-run.patch
-#Patch54: mysqlnd-shared.patch # shared build supported upstream
Patch55: bug-52078-fileinode.patch
-#Patch57: bug-52448.patch # outdated
Patch59: %{orgname}-systzdata.patch
Patch60: %{orgname}-oracle-instantclient.patch
-#Patch61: %{orgname}-krb5-ac.patch # not needed on 5.4 anymore
Patch62: mcrypt-libs.patch
Patch63: %{orgname}-mysql-nowarning.patch
-#Patch64: %{orgname}-m4.patch # not needed on 5.4 branch
Patch65: system-libzip.patch
Patch66: php-db.patch
Patch67: mysql-lib-ver-mismatch.patch
Patch68: x32.patch
Patch70: libvpx2.patch
Patch71: zend_operators_from_5.5.patch
+Patch72: mysqli-err.patch
+Patch73: openssl.patch
+Patch74: php-icu64.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
Summary(pl.UTF-8): DowiÄ…zanie symboliczne /usr/bin/php
Group: Development/Languages/PHP
Requires: %{name}-cli = %{epoch}:%{version}-%{release}
-Obsoletes: /usr/bin/php
+Obsoletes: php-program < 4:5.3.28-7
+Obsoletes: php4-program
+Obsoletes: php52-program
+Obsoletes: php53-program
+Obsoletes: php55-program
+Obsoletes: php56-program
+Obsoletes: php70-program
+Obsoletes: php71-program
+Obsoletes: php72-program
+Obsoletes: php73-program
+Obsoletes: php74-program
+Obsoletes: php80-program
%description program
Package providing /usr/bin/php symlink to PHP CLI.
Obsoletes: php56-devel
Obsoletes: php70-devel
Obsoletes: php71-devel
+Obsoletes: php72-devel
+Obsoletes: php73-devel
%description devel
The php-devel package lets you compile dynamic extensions to PHP.
# asm part of zend_operators.h of php-5.5
%patch71 -p1
%endif
+%patch72 -p1
+%patch73 -p1
+%patch74 -p1
+
+sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
+ run-tests.php
%{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
esac
%configure \
+ CFLAGS="%{rpmcflags} -DOPENSSL_NO_SSL2=1 -DOPENSSL_NO_SSL3=1" \
EXTRA_LDFLAGS="%{rpmldflags}" \
$sapi_args \
%if "%{!?configure_cache:0}%{?configure_cache}" == "0"
# install Embedded API
%if %{with embed}
+%{__make} -f Makefile.embed install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
# we could use install-headers from Makefile.embed, but that would reinstall all headers
-# install-sapi installs to wrong dir, so just do it all manually
install -d $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
-install -p libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}
cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed
%endif
# fix install paths, avoid evil rpaths
sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common.la
+%if %{with embed}
+# libphp5.la contains our buildroot in dependency_libs
+sed -i -e "/dependency_libs/ s,/[^ ]*/libs/libphp_common.la,%{_libdir}/libphp_common.la," $RPM_BUILD_ROOT%{_libdir}/libphp5.la
+%endif
# better solution?
sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
%if %{with embed}
%files embedded
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libphp5.so
+%attr(755,root,root) %{_libdir}/libphp5-%{version}.so
%endif
%files cli
%{_libdir}/%{name}/build
%{_mandir}/man1/php-config.1*
%{_mandir}/man1/phpize.1*
+%if %{with embed}
+# embedded
+%{_libdir}/libphp5.so
+%{_libdir}/libphp5.la
+%endif
%files bcmath
%defattr(644,root,root,755)