diff options
-rw-r--r-- | 37.patch | 43 | ||||
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 6 | ||||
-rw-r--r-- | php-pdlib.spec | 53 |
4 files changed, 20 insertions, 84 deletions
diff --git a/37.patch b/37.patch deleted file mode 100644 index da45929..0000000 --- a/37.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a31d3bc709321b784ecd93c983b476a0a298bfa0 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Wed, 30 Sep 2020 09:46:18 +0200 -Subject: [PATCH] relax test for 8.0.0RC1 - ---- - tests/cnn_face_detection_ctor_error.phpt | 2 +- - tests/face_landmark_detection_ctor_error.phpt | 2 +- - tests/face_recognition_ctor_error.phpt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/cnn_face_detection_ctor_error.phpt b/tests/cnn_face_detection_ctor_error.phpt -index 3535448..385e307 100644 ---- a/tests/cnn_face_detection_ctor_error.phpt -+++ b/tests/cnn_face_detection_ctor_error.phpt -@@ -11,5 +11,5 @@ try { - } - ?> - --EXPECTF-- --string(68) "CnnFaceDetection::__construct() expects exactly 1 parameter, 0 given" -+string(%d) "CnnFaceDetection::__construct() expects exactly 1 %s, 0 given" - -diff --git a/tests/face_landmark_detection_ctor_error.phpt b/tests/face_landmark_detection_ctor_error.phpt -index 2a717db..1f783f2 100644 ---- a/tests/face_landmark_detection_ctor_error.phpt -+++ b/tests/face_landmark_detection_ctor_error.phpt -@@ -16,5 +16,5 @@ try { - } - ?> - --EXPECTF-- --string(73) "FaceLandmarkDetection::__construct() expects exactly 1 parameter, 0 given" -+string(%d) "FaceLandmarkDetection::__construct() expects exactly 1 %s, 0 given" - string(45) "Unable to open non-existent file for reading." -diff --git a/tests/face_recognition_ctor_error.phpt b/tests/face_recognition_ctor_error.phpt -index c06ed39..237f2b0 100644 ---- a/tests/face_recognition_ctor_error.phpt -+++ b/tests/face_recognition_ctor_error.phpt -@@ -11,4 +11,4 @@ try { - } - ?> - --EXPECTF-- --string(67) "FaceRecognition::__construct() expects exactly 1 parameter, 0 given" -+string(%d) "FaceRecognition::__construct() expects exactly 1 %s, 0 given" @@ -3,7 +3,7 @@ pdlib pdlib support => enabled pdlib extension version => 1.0.2 -dlib library version => 19.22.0 +dlib library version => 19.24.99 DLIB_USE_CUDA => false DLIB_USE_BLAS => true DLIB_USE_LAPACK => true @@ -11,7 +11,7 @@ Extension [ <persistent> extension #90 pdlib version 1.0.2 ] { - Parameters [2] { Parameter #0 [ <required> string $img_path ] - Parameter #1 [ <optional> int $upsample_num ] + Parameter #1 [ <optional> int $upsample_num = 0 ] } } Function [ <internal:pdlib> function dlib_face_landmark_detection ] { @@ -57,7 +57,7 @@ Extension [ <persistent> extension #90 pdlib version 1.0.2 ] { - Parameters [2] { Parameter #0 [ <required> string $img_path ] - Parameter #1 [ <optional> int $upsample_num ] + Parameter #1 [ <optional> int $upsample_num = 0 ] } } } @@ -122,7 +122,7 @@ Extension [ <persistent> extension #90 pdlib version 1.0.2 ] { - Parameters [3] { Parameter #0 [ <required> string $img_path ] Parameter #1 [ <required> array $landmarks ] - Parameter #2 [ <optional> int $num_jitters ] + Parameter #2 [ <optional> int $num_jitters = 1 ] } } } diff --git a/php-pdlib.spec b/php-pdlib.spec index b5a12c4..46ef65f 100644 --- a/php-pdlib.spec +++ b/php-pdlib.spec @@ -1,19 +1,18 @@ # remirepo spec file for php-pdlib # -# Copyright (c) 2020-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2020-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pdlib %else %global pkg_name %{name} %endif -%global gh_commit 1153e3e2eb28db09ed207a904096d8d6deb693a1 +%global gh_commit 84436d5b9200e3388ca16851110d61b7c1439a8a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner goodspb %global gh_project pdlib @@ -30,44 +29,22 @@ BuildRequires: devtoolset-7-toolchain %endif Summary: A PHP extension for Dlib -Name: %{?sub_prefix}php-%{pecl_name} -Version: 1.0.2 +Name: %{?scl_prefix}php-%{pecl_name} +Version: 1.1.0 %if 0%{?gh_date:1} -Release: 2%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz -Patch0: https://patch-diff.githubusercontent.com/raw/goodspb/pdlib/pull/37.patch - BuildRequires: %{?scl_prefix}php-devel >= 7.0 -BuildRequires: dlib-devel >= 19.22 +BuildRequires: dlib-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}} - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-%{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,8 +58,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{gh_project}-%{gh_commit} NTS cd NTS -%patch0 -p1 -b .pr - # Sanity check, really often broken extver=$(sed -n '/#define PHP_PDLIB_VERSION/{s/.* "//;s/".*$//;p}' php_pdlib.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -107,18 +82,18 @@ EOF %{?dtsenable} cd NTS -%{_bindir}/phpize +%{__phpize} %configure \ - --with-php-config=%{_bindir}/php-config \ + --with-php-config=%{__phpconfig} \ --with-libdir=%{_lib} \ --with-pdlib make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize +%{__ztsphpize} %configure \ - --with-php-config=%{_bindir}/zts-php-config \ + --with-php-config=%{__ztsphpconfig} \ --with-libdir=%{_lib} \ --with-pdlib make %{?_smp_mflags} @@ -185,6 +160,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ %changelog +* Wed Jul 5 2023 Remi Collet <remi@remirepo.net> - 1.1.0-1 +- update to 1.1.0 +- drop patch merged upstream + * Thu Apr 8 2021 Remi Collet <remi@remirepo.net> - 1.0.2-6 - rebuild against dlib 19.22 |