summaryrefslogtreecommitdiffstats
path: root/php-pecl-stats.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-11-25 16:31:30 +0100
committerRemi Collet <remi@php.net>2024-11-25 16:31:30 +0100
commit479b0400d0b2cb380b318ea252a992beb0924b9a (patch)
tree00c4fefcc7e3c052246206d7f26bd6114ad5986a /php-pecl-stats.spec
parent7976ea65bb807684e6d0dbe5fbefb0e58ff6eb3c (diff)
spec cleanupHEADmaster
Diffstat (limited to 'php-pecl-stats.spec')
-rw-r--r--php-pecl-stats.spec55
1 files changed, 23 insertions, 32 deletions
diff --git a/php-pecl-stats.spec b/php-pecl-stats.spec
index b003dff..1d7806d 100644
--- a/php-pecl-stats.spec
+++ b/php-pecl-stats.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-stats
#
-# Copyright (c) 2013-2023 Remi Collet
+# Copyright (c) 2013-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -21,7 +21,7 @@
Summary: Routines for statistical computation
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 2.0.3
-Release: 12%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
@@ -31,6 +31,8 @@ Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-php7.patch
# Upstream patch for PHP 8
Patch1: %{pecl_name}-php8.patch
+# https://github.com/php/pecl-math-stats/pull/12
+Patch2: 0001-Fix-Wincompatible-pointer-types.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -44,10 +46,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
%description
@@ -61,13 +59,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
%patch -P0 -p1 -b .upstream
%if "%{php_version}" > "8.0"
%patch -P1 -p1 -b .php8
+%patch -P2 -p1 -b .php8
%else
# don't deprecate function with typo
sed -e 's/PHP_DEP_FALIAS/PHP_FALIAS/' -i php_stats.c
@@ -98,13 +97,15 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -112,14 +113,14 @@ cd ../ZTS
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -128,7 +129,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -140,28 +141,11 @@ do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
cd %{sources}
+# 002+ float(3.8459253727671E-16)
+# 002- float(0)
+rm tests/stats_stat_correlation.phpt
: Minimal load test for NTS extension
%{__php} --no-php-ini \
@@ -194,7 +178,7 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -207,6 +191,13 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Nov 25 2024 Remi Collet <remi@remirepo.net> - 2.0.3-14
+- spec cleanup
+
+* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 2.0.3-13
+- fix incompatible-pointer-types using patch from
+ https://github.com/php/pecl-math-stats/pull/12
+
* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 2.0.3-12
- build out of sources tree