aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2021-08-25 12:25:15 +0000
committerDanilo G. Baio <dbaio@FreeBSD.org>2021-08-25 12:32:45 +0000
commit0370ede7f5598c41c2d015be876a651b1f4ebdf1 (patch)
tree38f5356f0762a4dcf0ff4486f267e1ebcdaab569
parent4ae996ae6b16cccafabfb55e2bb23cfa45b83bc6 (diff)
downloadports-0370ede7f5598c41c2d015be876a651b1f4ebdf1.tar.gz
ports-0370ede7f5598c41c2d015be876a651b1f4ebdf1.zip
security/pecl-scrypt: Fix build with PHP 8
PR: 258030 Reported by: clpo13@gmail.com (cherry picked from commit a5d11eeb395da6b6b8af01206765173d0fb1bfe5)
-rw-r--r--security/pecl-scrypt/Makefile5
-rw-r--r--security/pecl-scrypt/distinfo4
-rw-r--r--security/pecl-scrypt/files/patch-crypto_crypto__scrypt-nosse.c12
3 files changed, 19 insertions, 2 deletions
diff --git a/security/pecl-scrypt/Makefile b/security/pecl-scrypt/Makefile
index 77dd2af3e0cf..7d6620345fe9 100644
--- a/security/pecl-scrypt/Makefile
+++ b/security/pecl-scrypt/Makefile
@@ -4,6 +4,10 @@ PORTNAME= scrypt
PORTVERSION= 1.4.2
CATEGORIES= security pear
+# https://github.com/DomBlack/php-scrypt/pull/56/
+PATCH_SITES= https://github.com/DomBlack/php-scrypt/commit/
+PATCHFILES= 5010f9fa0743518d149d994728ca930503adde1e.patch:-p1
+
MAINTAINER= dbaio@FreeBSD.org
COMMENT= PHP wrapper to Colin Percival's scrypt implementation
@@ -11,7 +15,6 @@ LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= php:pecl
-IGNORE_WITH_PHP= 80
USE_PHP= hash:build
OPTIONS_DEFINE= DOCS EXAMPLES
diff --git a/security/pecl-scrypt/distinfo b/security/pecl-scrypt/distinfo
index 4dacd769456c..3307ee3453b0 100644
--- a/security/pecl-scrypt/distinfo
+++ b/security/pecl-scrypt/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1491395894
+TIMESTAMP = 1629893529
SHA256 (PECL/scrypt-1.4.2.tgz) = 94c7e7f3378f6ddf1755f59d99f61570f380df2b2fa630853a932d58fa38389c
SIZE (PECL/scrypt-1.4.2.tgz) = 21585
+SHA256 (PECL/5010f9fa0743518d149d994728ca930503adde1e.patch) = 9241f4d2a3c5360a209c7fd308eabaac0dcd0ee356a4badf9e24d93a94ba4bb8
+SIZE (PECL/5010f9fa0743518d149d994728ca930503adde1e.patch) = 1277
diff --git a/security/pecl-scrypt/files/patch-crypto_crypto__scrypt-nosse.c b/security/pecl-scrypt/files/patch-crypto_crypto__scrypt-nosse.c
new file mode 100644
index 000000000000..3c2d95905024
--- /dev/null
+++ b/security/pecl-scrypt/files/patch-crypto_crypto__scrypt-nosse.c
@@ -0,0 +1,12 @@
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258030
+# Based on https://github.com/DomBlack/php-scrypt/pull/56
+--- crypto/crypto_scrypt-nosse.c.orig 2016-05-18 14:49:13 UTC
++++ crypto/crypto_scrypt-nosse.c
+@@ -45,6 +45,7 @@
+ #include "sysendian.h"
+
+ #include "crypto_scrypt.h"
++#include "php_scrypt.h"
+
+ static void blkcpy(uint8_t *, uint8_t *, size_t);
+ static void blkxor(uint8_t *, uint8_t *, size_t);