summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-20 08:54:30 +0200
committerRemi Collet <remi@php.net>2023-09-20 08:54:30 +0200
commitd54f8935e19e01e0960e8dbeb74708d1ba8ba074 (patch)
tree89bd30f97382c7fb139938777954919989d801ed
parent36a6228884889e2265030ba847c3b6c365f08855 (diff)
update to 3.0.4
build out of sources tree
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION7
-rw-r--r--php-pecl-tensor.spec74
3 files changed, 41 insertions, 46 deletions
diff --git a/PHPINFO b/PHPINFO
index d00464e..9eb4da4 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -4,7 +4,7 @@ tensor
A library and extension that provides objects for scientific computing in PHP.
tensor => enabled
-Author => Andrew DalPino
-Version => 3.0.3
-Build Date => Feb 28 2023 00:00:00
+Author => The Rubix ML Community
+Version => 3.0.4
+Build Date => Sep 20 2023 00:00:00
Powered by Zephir => Version 0.17.0-$Id$
diff --git a/REFLECTION b/REFLECTION
index 5b799f8..94fb30c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #122 tensor version 3.0.3 ] {
+Extension [ <persistent> extension #125 tensor version 3.0.4 ] {
- Dependencies {
}
@@ -1968,12 +1968,14 @@ Extension [ <persistent> extension #122 tensor version 3.0.3 ] {
- Parameters [1] {
Parameter #0 [ <required> $index ]
}
+ - Return [ mixed ]
}
Method [ <internal:tensor, prototype IteratorAggregate> public method getIterator ] {
- Parameters [0] {
}
+ - Return [ Traversable ]
}
}
}
@@ -2897,12 +2899,14 @@ Extension [ <persistent> extension #122 tensor version 3.0.3 ] {
- Parameters [1] {
Parameter #0 [ <required> $index ]
}
+ - Return [ mixed ]
}
Method [ <internal:tensor, inherits Tensor\Vector, prototype IteratorAggregate> public method getIterator ] {
- Parameters [0] {
}
+ - Return [ Traversable ]
}
}
}
@@ -4495,6 +4499,7 @@ Extension [ <persistent> extension #122 tensor version 3.0.3 ] {
- Parameters [0] {
}
+ - Return [ Traversable ]
}
}
}
diff --git a/php-pecl-tensor.spec b/php-pecl-tensor.spec
index 752e231..5728799 100644
--- a/php-pecl-tensor.spec
+++ b/php-pecl-tensor.spec
@@ -6,26 +6,25 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-tensor
-%endif
+%{?scl:%scl_package php-pecl-tensor}
-%global pecl_name tensor
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name tensor
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
# After 20-json
-%global ini_name 40-%{pecl_name}.ini
+%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 3.0.3
+%global upstream_version 3.0.4
#global upstream_prever alpha2
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../ext/configure
Summary: Objects for scientific computing in PHP
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: tensor-headers.patch
Patch1: tensor-libs.patch
@@ -33,6 +32,7 @@ Patch1: tensor-libs.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.4
+BuildRequires: %{?scl_prefix}php-devel < 8.3
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: openblas-devel
@@ -41,7 +41,6 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-pdo%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -50,18 +49,6 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
%description
Tensor is a library and extension that provides objects for scientific
@@ -78,12 +65,10 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
-
-cd NTS
+cd %{sources}
sed -e 's/\r//' -i ext/config.m4
-%patch0 -p1 -b .headers
-%patch1 -p1 -b .libs
+%patch -P0 -p1 -b .headers
+%patch -P1 -p1 -b .libs
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_TENSOR_VERSION/{s/.* "//;s/".*$//;p}' ext/php_tensor.h)
@@ -91,12 +76,12 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
#exit 1
fi
-cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
+cd ..
# Create configuration file
cat > %{ini_name} << 'EOF'
@@ -108,22 +93,23 @@ EOF
%build
%{?dtsenable}
-cd NTS/ext
-%{_bindir}/phpize
+cd %{sources}/ext
+%{__phpize}
+
+cd ../NTS
%configure \
--enable-tensor \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
-cd ../../ZTS/ext
-%{_bindir}/zts-phpize
+cd ../ZTS
%configure \
--enable-tensor \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -132,7 +118,7 @@ make %{?_smp_mflags}
%install
%{?dtsenable}
-make -C NTS/ext install INSTALL_ROOT=%{buildroot}
+make -C %{sources}/NTS install INSTALL_ROOT=%{buildroot}
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -141,12 +127,12 @@ 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/ext install INSTALL_ROOT=%{buildroot}
+make -C %{sources}/ZTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -174,7 +160,7 @@ fi
%check
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=json.so \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
@@ -189,7 +175,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -203,6 +189,10 @@ fi
%changelog
+* Wed Sep 20 2023 Remi Collet <remi@remirepo.net> - 3.0.4-1
+- update to 3.0.4
+- build out of sources tree
+
* Tue Feb 28 2023 Remi Collet <remi@remirepo.net> - 3.0.3-1
- update to 3.0.3
- fix license