This commit is contained in:
Jean-Philippe Pialasse 2024-03-17 17:10:22 -04:00
parent c05c3e3583
commit 8aae1ddc07
3 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff -Nur --no-dereference File-1.4.1.old/File.php File-1.4.1/File.php
--- File-1.4.1.old/File.php 2012-04-06 01:13:35.000000000 -0400
+++ File-1.4.1/File.php 2024-03-17 17:07:50.714000000 -0400
@@ -378,7 +378,7 @@
$filePointers = &PEAR::getStaticProperty('File', 'filePointers');
// unlock files
- for ($i = 0, $c = count($locks); $i < $c; $i++) {
+ for ($i = 0, $c = count((array)$locks); $i < $c; $i++) {
is_resource($locks[$i]) and @flock($locks[$i], LOCK_UN);
}

BIN
php-pear-File-1.4.1.tgz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -11,6 +11,7 @@ Group: Development/Languages
License: PHP License: PHP
URL: http://pear.php.net/package/File URL: http://pear.php.net/package/File
Source0: http://pear.php.net/get/File-%{version}.tgz Source0: http://pear.php.net/get/File-%{version}.tgz
Patch0: php-pear-File-1.4.1-countable.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
@ -31,11 +32,13 @@ to deal with paths.
%prep %prep
%setup -qc %setup -qc
%patch0
cd %{pear_name}-%{version} cd %{pear_name}-%{version}
# Package is V2 # Package is V2
mv ../package.xml %{name}.xml #mv ../package.xml %{name}.xml
# remove File.php test, we patched it
sed -e '/ec80783869ebfdee05a4ccd38106b296/s/md5sum="[^"]*"//' ../package.xml > %{name}.xml
%build %build
cd %{pear_name}-%{version} cd %{pear_name}-%{version}