summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION5
-rw-r--r--composer.json20
-rw-r--r--php-pecl-memprof.spec61
4 files changed, 53 insertions, 36 deletions
diff --git a/PHPINFO b/PHPINFO
index a29e5ee..9ee6fff 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,8 +2,9 @@
memprof
memprof support => enabled
-memprof version => 3.0.2
+memprof version => 3.1.0
memprof native malloc support => No
Directive => Local Value => Master Value
memprof.output_dir => /tmp => /tmp
+memprof.output_format => callgrind => callgrind
diff --git a/REFLECTION b/REFLECTION
index d8b1b3c..e869e21 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,9 +1,12 @@
-Extension [ <persistent> extension #119 memprof version 3.0.2 ] {
+Extension [ <persistent> extension #93 memprof version 3.1.0 ] {
- INI {
Entry [ memprof.output_dir <ALL> ]
Current = '/tmp'
}
+ Entry [ memprof.output_format <ALL> ]
+ Current = 'callgrind'
+ }
}
- Functions {
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..811d690
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,20 @@
+{
+ "name": "arnaud-lb/memprof",
+ "type": "php-ext",
+ "license": "MIT",
+ "description": "A memory profiler for PHP",
+ "require": {
+ "php": ">= 8.1.0"
+ },
+ "php-ext": {
+ "extension-name": "memprof",
+ "support-zts": false,
+ "configure-options": [
+ {
+ "name": "with-judy-dir",
+ "description": "Use system libjudy",
+ "needs-value": true
+ }
+ ]
+ }
+}
diff --git a/php-pecl-memprof.spec b/php-pecl-memprof.spec
index 67d231e..aa2f43a 100644
--- a/php-pecl-memprof.spec
+++ b/php-pecl-memprof.spec
@@ -3,9 +3,9 @@
#
# Fedora spec file for php-pecl-memprof
#
-# Copyright (c) 2013-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -23,14 +23,16 @@
# https://github.com/arnaud-lb/php-memory-profiler/pull/7
%global with_zts 0
%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
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 3.0.2
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+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
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
@@ -45,10 +47,15 @@ BuildRequires: Judy-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-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}
+# Extension
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# PIE
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -88,6 +95,7 @@ extension=%{pecl_name}.so
; Configuration
;memprof.output_dir = '/tmp'
+;memprof.output_format = 'callgrind'
EOF
@@ -96,13 +104,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
@@ -110,14 +120,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}
@@ -126,7 +136,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
@@ -138,27 +148,6 @@ 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
# Unusable
cd %{sources}
@@ -210,6 +199,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* 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
+
* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.0.2-3
- rebuild for PHP 8.3.0RC1