1 |
commit: 755af4f2674d5d09a1ccf0d7b4a091a96a597dbb |
2 |
Author: Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua> |
3 |
AuthorDate: Tue Dec 18 07:21:01 2018 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 1 13:22:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=755af4f2 |
7 |
|
8 |
dev-php/scrypt: new ebuild |
9 |
|
10 |
This is a PHP library providing a wrapper |
11 |
to Colin Percival's scrypt implementation. |
12 |
Scrypt is a key derivation function designed |
13 |
to be far more secure against hardware brute-force |
14 |
attacks than alternative functions |
15 |
such as PBKDF2 or bcrypt. |
16 |
|
17 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
18 |
Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua> |
19 |
Closes: https://github.com/gentoo/gentoo/pull/10657 |
20 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
21 |
|
22 |
dev-php/scrypt/Manifest | 1 + |
23 |
dev-php/scrypt/files/scrypt-1.4.2-php8-0.patch | 49 ++++++++++++++++++++++++++ |
24 |
dev-php/scrypt/metadata.xml | 22 ++++++++++++ |
25 |
dev-php/scrypt/scrypt-1.4.2.ebuild | 20 +++++++++++ |
26 |
dev-php/scrypt/scrypt-9999.ebuild | 20 +++++++++++ |
27 |
5 files changed, 112 insertions(+) |
28 |
|
29 |
diff --git a/dev-php/scrypt/Manifest b/dev-php/scrypt/Manifest |
30 |
new file mode 100644 |
31 |
index 00000000000..2b70ca8e86e |
32 |
--- /dev/null |
33 |
+++ b/dev-php/scrypt/Manifest |
34 |
@@ -0,0 +1 @@ |
35 |
+DIST scrypt-1.4.2.tgz 21585 BLAKE2B 6297b15aac8470eedc619c498badc4e453476a390cab0cfe7fabef00012131ff9e363834b9423a566dba603ea2a4351eee416419cc1e6c1245a9aba54d63a5ab SHA512 34a87e63250dcfb21b3d36f90a4e5f4bac9f0623917ceb0d613d49112ce0e13df9a93fb0730fb797be6337d023dc490fb881902b5492309fe8bf3e6fd5e685a0 |
36 |
|
37 |
diff --git a/dev-php/scrypt/files/scrypt-1.4.2-php8-0.patch b/dev-php/scrypt/files/scrypt-1.4.2-php8-0.patch |
38 |
new file mode 100644 |
39 |
index 00000000000..a5e1ea66589 |
40 |
--- /dev/null |
41 |
+++ b/dev-php/scrypt/files/scrypt-1.4.2-php8-0.patch |
42 |
@@ -0,0 +1,49 @@ |
43 |
+From 5010f9fa0743518d149d994728ca930503adde1e Mon Sep 17 00:00:00 2001 |
44 |
+From: Remi Collet <remi@××××××××.net> |
45 |
+Date: Tue, 22 Sep 2020 14:55:32 +0200 |
46 |
+Subject: [PATCH] trivial fix for PHP 8 |
47 |
+ |
48 |
+--- |
49 |
+ crypto/crypto_scrypt-sse.c | 1 + |
50 |
+ php_scrypt.h | 5 +++++ |
51 |
+ php_scrypt_utils.c | 1 + |
52 |
+ 3 files changed, 7 insertions(+) |
53 |
+ |
54 |
+diff --git a/crypto/crypto_scrypt-sse.c b/crypto/crypto_scrypt-sse.c |
55 |
+index a52ce81..709a04f 100644 |
56 |
+--- a/crypto/crypto_scrypt-sse.c |
57 |
++++ b/crypto/crypto_scrypt-sse.c |
58 |
+@@ -44,6 +44,7 @@ |
59 |
+ #include "sysendian.h" |
60 |
+ |
61 |
+ #include "crypto_scrypt.h" |
62 |
++#include "php_scrypt.h" |
63 |
+ |
64 |
+ static void blkcpy(void *, void *, size_t); |
65 |
+ static void blkxor(void *, void *, size_t); |
66 |
+diff --git a/php_scrypt.h b/php_scrypt.h |
67 |
+index a1117c8..6cc1c4c 100644 |
68 |
+--- a/php_scrypt.h |
69 |
++++ b/php_scrypt.h |
70 |
+@@ -35,4 +35,9 @@ PHP_FUNCTION(scrypt_pickparams); |
71 |
+ extern zend_module_entry scrypt_module_entry; |
72 |
+ #define phpext_scrypt_ptr &scrypt_module_entry |
73 |
+ |
74 |
++#ifndef TSRMLS_CC |
75 |
++#define TSRMLS_CC |
76 |
++#define TSRMLS_FETCH() |
77 |
++#endif |
78 |
++ |
79 |
+ #endif |
80 |
+diff --git a/php_scrypt_utils.c b/php_scrypt_utils.c |
81 |
+index 797e2c7..34fe347 100644 |
82 |
+--- a/php_scrypt_utils.c |
83 |
++++ b/php_scrypt_utils.c |
84 |
+@@ -25,6 +25,7 @@ |
85 |
+ */ |
86 |
+ |
87 |
+ #include "php_scrypt_utils.h" |
88 |
++#include "php_scrypt.h" |
89 |
+ |
90 |
+ /* |
91 |
+ * Casts a long into a uint64_t. |
92 |
|
93 |
diff --git a/dev-php/scrypt/metadata.xml b/dev-php/scrypt/metadata.xml |
94 |
new file mode 100644 |
95 |
index 00000000000..7fd91a5b5f8 |
96 |
--- /dev/null |
97 |
+++ b/dev-php/scrypt/metadata.xml |
98 |
@@ -0,0 +1,22 @@ |
99 |
+<?xml version="1.0" encoding="UTF-8"?> |
100 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
101 |
+<pkgmetadata> |
102 |
+ <maintainer type="person"> |
103 |
+ <email>spiderx@××××××××××.ua</email> |
104 |
+ <name>Vladimir Pavljuchenkov</name> |
105 |
+ </maintainer> |
106 |
+ <maintainer type="project"> |
107 |
+ <email>proxy-maint@g.o</email> |
108 |
+ <name>Proxy Maintainers</name> |
109 |
+ </maintainer> |
110 |
+ <longdescription lang="en"> |
111 |
+ A PHP library providing a wrapper to Colin Percival's scrypt |
112 |
+ implementation. Scrypt is a key derivation function designed |
113 |
+ to be far more secure against hardware brute-force attacks |
114 |
+ than alternative functions such as PBKDF2 or bcrypt. |
115 |
+ </longdescription> |
116 |
+ <upstream> |
117 |
+ <remote-id type="github">DomBlack/php-scrypt</remote-id> |
118 |
+ <remote-id type="pecl">scrypt</remote-id> |
119 |
+ </upstream> |
120 |
+</pkgmetadata> |
121 |
|
122 |
diff --git a/dev-php/scrypt/scrypt-1.4.2.ebuild b/dev-php/scrypt/scrypt-1.4.2.ebuild |
123 |
new file mode 100644 |
124 |
index 00000000000..026a5435594 |
125 |
--- /dev/null |
126 |
+++ b/dev-php/scrypt/scrypt-1.4.2.ebuild |
127 |
@@ -0,0 +1,20 @@ |
128 |
+# Copyright 1999-2021 Gentoo Authors |
129 |
+# Distributed under the terms of the GNU General Public License v2 |
130 |
+ |
131 |
+EAPI=7 |
132 |
+ |
133 |
+PHP_EXT_ECONF_ARGS="--enable-scrypt" |
134 |
+USE_PHP="php7-3 php7-4 php8-0" |
135 |
+ |
136 |
+inherit php-ext-pecl-r3 |
137 |
+ |
138 |
+DESCRIPTION="A PHP wrapper fo the scrypt hashing algorithm" |
139 |
+ |
140 |
+LICENSE="BSD-2" |
141 |
+SLOT="0" |
142 |
+KEYWORDS="~amd64 ~x86" |
143 |
+IUSE="" |
144 |
+ |
145 |
+DEPEND="dev-util/re2c" |
146 |
+ |
147 |
+PATCHES=( "${FILESDIR}"/"${P}"-php8-0.patch ) |
148 |
|
149 |
diff --git a/dev-php/scrypt/scrypt-9999.ebuild b/dev-php/scrypt/scrypt-9999.ebuild |
150 |
new file mode 100644 |
151 |
index 00000000000..900385d5cf2 |
152 |
--- /dev/null |
153 |
+++ b/dev-php/scrypt/scrypt-9999.ebuild |
154 |
@@ -0,0 +1,20 @@ |
155 |
+# Copyright 1999-2021 Gentoo Authors |
156 |
+# Distributed under the terms of the GNU General Public License v2 |
157 |
+ |
158 |
+EAPI=7 |
159 |
+ |
160 |
+PHP_EXT_ECONF_ARGS="--enable-scrypt" |
161 |
+USE_PHP="php7-3 php7-4 php8-0" |
162 |
+EGIT_REPO_URI="https://github.com/DomBlack/php-scrypt.git" |
163 |
+ |
164 |
+inherit git-r3 php-ext-pecl-r3 |
165 |
+ |
166 |
+DESCRIPTION="A PHP wrapper fo the scrypt hashing algorithm" |
167 |
+SRC_URI="" |
168 |
+ |
169 |
+LICENSE="BSD-2" |
170 |
+SLOT="0" |
171 |
+KEYWORDS="" |
172 |
+IUSE="" |
173 |
+ |
174 |
+DEPEND="dev-util/re2c" |