summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION26
-rw-r--r--php-pecl-memprof.spec131
4 files changed, 102 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/PHPINFO b/PHPINFO
index 7ade6e2..a29e5ee 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,4 +2,8 @@
memprof
memprof support => enabled
-memprof version => 2.1.2
+memprof version => 3.0.2
+memprof native malloc support => No
+
+Directive => Local Value => Master Value
+memprof.output_dir => /tmp => /tmp
diff --git a/REFLECTION b/REFLECTION
index 354a1be..d8b1b3c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,37 +1,61 @@
-Extension [ <persistent> extension #117 memprof version 2.1.2 ] {
+Extension [ <persistent> extension #119 memprof version 3.0.2 ] {
+
+ - INI {
+ Entry [ memprof.output_dir <ALL> ]
+ Current = '/tmp'
+ }
+ }
- Functions {
Function [ <internal:memprof> function memprof_enabled ] {
- Parameters [0] {
}
+ - Return [ bool ]
+ }
+ Function [ <internal:memprof> function memprof_enabled_flags ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array ]
}
Function [ <internal:memprof> function memprof_enable ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Function [ <internal:memprof> function memprof_disable ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Function [ <internal:memprof> function memprof_dump_array ] {
- Parameters [0] {
}
+ - Return [ array ]
}
Function [ <internal:memprof> function memprof_dump_callgrind ] {
- Parameters [1] {
Parameter #0 [ <required> $handle ]
}
+ - Return [ void ]
}
Function [ <internal:memprof> function memprof_dump_pprof ] {
- Parameters [1] {
Parameter #0 [ <required> $handle ]
}
+ - Return [ void ]
+ }
+ Function [ <internal:memprof> function memprof_version ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
}
}
diff --git a/php-pecl-memprof.spec b/php-pecl-memprof.spec
index 30740a4..67d231e 100644
--- a/php-pecl-memprof.spec
+++ b/php-pecl-memprof.spec
@@ -3,37 +3,40 @@
#
# Fedora spec file for php-pecl-memprof
#
-# Copyright (c) 2013-2020 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
+%if %{__isa_bits} < 64
+# some tests fail on 32-bit
+%bcond_with tests
+%else
%bcond_without tests
-
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-memprof
%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
-%global pecl_name memprof
-%global ini_name 40-%{pecl_name}.ini
+%global with_zts 0
+%global pecl_name memprof
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Memory usage profiler
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.1.2
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: BSD
+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;')}}
+# see https://github.com/arnaud-lb/php-memory-profiler/issues/93
+License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.1
BuildRequires: %{?scl_prefix}php-pear
@@ -41,35 +44,11 @@ BuildRequires: Judy-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
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
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -81,14 +60,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
# Don't install tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+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
@@ -97,35 +75,40 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
cat > %{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
extension=%{pecl_name}.so
+
+; Configuration
+;memprof.output_dir = '/tmp'
EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -149,8 +132,9 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+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
@@ -176,41 +160,43 @@ fi
%check
+# Unusable
+cd %{sources}
+rm tests/autodump-xdebug.phpt
+
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with tests}
-cd NTS
+grep "HAVE_MALLOC_HOOKS 1" ../NTS/config.h && export MEMPROF_EXPECT_NATIVE_TRACKING=1
+
: Upstream test suite for NTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
+TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php --show-diff
+%{_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}
+ --modules | grep '^%{pecl_name}$'
%if %{with tests}
-cd ../NTS
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
%endif
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -224,6 +210,29 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.0.2-3
+- rebuild for PHP 8.3.0RC1
+
+* Thu Jul 13 2023 Remi Collet <remi@remirepo.net> - 3.0.2-2
+- build out of sources tree
+- open https://github.com/arnaud-lb/php-memory-profiler/issues/93
+ license clarification
+
+* Fri Jan 7 2022 Remi Collet <remi@remirepo.net> - 3.0.2-1
+- update to 3.0.2
+- drop patches merged upstream
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 3.0.1-2
+- rebuild for 8.1.0RC1
+
+* Fri Jul 2 2021 Remi Collet <remi@remirepo.net> - 3.0.1-1
+- update to 3.0.1
+- add patch for PHP 8.1 from
+ https://github.com/arnaud-lb/php-memory-profiler/pull/54
+
+* Tue Mar 30 2021 Remi Collet <remi@remirepo.net> - 3.0.0-1
+- update to 3.0.0
+
* Thu Nov 19 2020 Remi Collet <remi@remirepo.net> - 2.1.2-1
- update to 2.1.2 (no change)
- run upstream test suite during the build