summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-23 15:27:19 +0200
committerRemi Collet <remi@php.net>2026-04-23 15:27:19 +0200
commit9e420526a2c0e86986ae90b0dd36a8f10544c373 (patch)
treeb0e68b7243f17400aad204cfbc948641c4eca014
parent30a7977af201b2d0dd39b297699bb894b2be2e59 (diff)
drop pear/pecl dependencyHEADmaster
sources from github
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-memprof.spec111
2 files changed, 26 insertions, 87 deletions
diff --git a/REFLECTION b/REFLECTION
index e869e21..c13f3cf 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #93 memprof version 3.1.0 ] {
+Extension [ <persistent> extension #100 memprof version 3.1.0 ] {
- INI {
Entry [ memprof.output_dir <ALL> ]
diff --git a/php-pecl-memprof.spec b/php-pecl-memprof.spec
index aa2f43a..4062dfa 100644
--- a/php-pecl-memprof.spec
+++ b/php-pecl-memprof.spec
@@ -3,45 +3,40 @@
#
# Fedora spec file for php-pecl-memprof
#
-# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2013-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%if %{__isa_bits} < 64
-# some tests fail on 32-bit
-%bcond_with tests
-%else
-%bcond_without tests
-%endif
-
%{?scl:%scl_package php-pecl-memprof}
-# ZTS build is broken
-# https://github.com/arnaud-lb/php-memory-profiler/pull/7
-%global with_zts 0
+%bcond_without tests
+
%global pecl_name memprof
%global pie_vend arnaud-lb
%global pie_proj memprof
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
-Summary: Memory usage profiler
+# Github forge
+%global gh_vend arnaud-lb
+%global gh_proj php-memory-profiler
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
+
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 3.1.0
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-# see https://github.com/arnaud-lb/php-memory-profiler/issues/93
+Summary: Memory usage profiler
License: MIT
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Version: 3.1.0
+Release: 2%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.1
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: Judy-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -66,27 +61,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -c
+%forgesetup
-# Don't install tests
-sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
- -i package.xml
-
-cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_MEMPROF_VERSION/{s/.* "//;s/".*$//;p}' php_memprof.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
exit 1
fi
-cd ..
-
-mkdir NTS
-%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-mkdir ZTS
-%endif
# Create configuration file
cat > %{ini_name} << 'EOF'
@@ -102,55 +84,28 @@ EOF
%build
%{?dtsenable}
-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_build
-%if %{with_zts}
-cd ../ZTS
-%configure \
- --with-libdir=%{_lib} \
- --with-php-config=%{__ztsphpconfig}
-
-%make_build
-%endif
-
%install
%{?dtsenable}
-%make_install -C NTS
+%make_install
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
-%if %{with_zts}
-%make_install -C ZTS
-
-install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-%endif
-
-# Documentation
-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
-
%check
# Unusable
-cd %{sources}
rm tests/autodump-xdebug.phpt
: Minimal load test for NTS extension
@@ -165,40 +120,24 @@ grep "HAVE_MALLOC_HOOKS 1" ../NTS/config.h && export MEMPROF_EXPECT_NATIVE_TRACK
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php -q --show-diff
-%endif
-
-%if %{with_zts}
-: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
- --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep '^%{pecl_name}$'
-
-%if %{with tests}
-: Upstream test suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
-%endif
+%{__php} -n run-tests.php -q --show-diff
%endif
%files
-%{?_licensedir:%license %{sources}/LICENSE}
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc composer.json
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%if %{with_zts}
-%config(noreplace) %{php_ztsinidir}/%{ini_name}
-%{php_ztsextdir}/%{pecl_name}.so
-%endif
-
%changelog
+* Thu Apr 23 2026 Remi Collet <remi@remirepo.net> - 3.1.0-2
+- drop pear/pecl dependency
+- sources from github
+
* Tue Feb 25 2025 Remi Collet <remi@remirepo.net> - 3.1.0-1
- update to 3.1.0
- re-license spec file to CECILL-2.1