summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--56.patch49
-rw-r--r--php-pecl-scrypt.spec46
3 files changed, 73 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/56.patch b/56.patch
new file mode 100644
index 0000000..a5e1ea6
--- /dev/null
+++ b/56.patch
@@ -0,0 +1,49 @@
+From 5010f9fa0743518d149d994728ca930503adde1e Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 22 Sep 2020 14:55:32 +0200
+Subject: [PATCH] trivial fix for PHP 8
+
+---
+ crypto/crypto_scrypt-sse.c | 1 +
+ php_scrypt.h | 5 +++++
+ php_scrypt_utils.c | 1 +
+ 3 files changed, 7 insertions(+)
+
+diff --git a/crypto/crypto_scrypt-sse.c b/crypto/crypto_scrypt-sse.c
+index a52ce81..709a04f 100644
+--- a/crypto/crypto_scrypt-sse.c
++++ b/crypto/crypto_scrypt-sse.c
+@@ -44,6 +44,7 @@
+ #include "sysendian.h"
+
+ #include "crypto_scrypt.h"
++#include "php_scrypt.h"
+
+ static void blkcpy(void *, void *, size_t);
+ static void blkxor(void *, void *, size_t);
+diff --git a/php_scrypt.h b/php_scrypt.h
+index a1117c8..6cc1c4c 100644
+--- a/php_scrypt.h
++++ b/php_scrypt.h
+@@ -35,4 +35,9 @@ PHP_FUNCTION(scrypt_pickparams);
+ extern zend_module_entry scrypt_module_entry;
+ #define phpext_scrypt_ptr &scrypt_module_entry
+
++#ifndef TSRMLS_CC
++#define TSRMLS_CC
++#define TSRMLS_FETCH()
++#endif
++
+ #endif
+diff --git a/php_scrypt_utils.c b/php_scrypt_utils.c
+index 797e2c7..34fe347 100644
+--- a/php_scrypt_utils.c
++++ b/php_scrypt_utils.c
+@@ -25,6 +25,7 @@
+ */
+
+ #include "php_scrypt_utils.h"
++#include "php_scrypt.h"
+
+ /*
+ * Casts a long into a uint64_t.
diff --git a/php-pecl-scrypt.spec b/php-pecl-scrypt.spec
index 6be5b38..e0bc2f2 100644
--- a/php-pecl-scrypt.spec
+++ b/php-pecl-scrypt.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-scrypt
#
-# Copyright (c) 2013-2019 Remi Collet
+# Copyright (c) 2013-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -22,11 +22,13 @@
Summary: Scrypt hashing function
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.4.2
-Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
Group: Development/Languages
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+
+Patch0: https://patch-diff.githubusercontent.com/raw/DomBlack/php-scrypt/pull/56.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.3
@@ -46,39 +48,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -105,6 +84,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_SCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_scrypt.h)
@@ -237,6 +217,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Oct 6 2020 Remi Collet <remi@remirepo.net> - 1.4.2-9
+- add patch for PHP 8 from
+ https://github.com/DomBlack/php-scrypt/pull/56
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.4.2-8
- rebuild for 7.4.0RC1