diff options
author | Vladimir Pavljuchenkov (SpiderX) <spiderx@spiderx.dp.ua> | 2018-12-18 09:21:01 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-02-01 15:22:48 +0200 |
commit | 755af4f2674d5d09a1ccf0d7b4a091a96a597dbb (patch) | |
tree | 7660884a74c8e23cf9ffb6fa24b34fa0dc7fec02 | |
parent | app-admin/doctl: new ebuild (diff) | |
download | gentoo-755af4f2674d5d09a1ccf0d7b4a091a96a597dbb.tar.gz gentoo-755af4f2674d5d09a1ccf0d7b4a091a96a597dbb.tar.bz2 gentoo-755af4f2674d5d09a1ccf0d7b4a091a96a597dbb.zip |
dev-php/scrypt: new ebuild
This is a PHP library providing a wrapper
to Colin Percival's scrypt implementation.
Scrypt is a key derivation function designed
to be far more secure against hardware brute-force
attacks than alternative functions
such as PBKDF2 or bcrypt.
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua>
Closes: https://github.com/gentoo/gentoo/pull/10657
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r-- | dev-php/scrypt/Manifest | 1 | ||||
-rw-r--r-- | dev-php/scrypt/files/scrypt-1.4.2-php8-0.patch | 49 | ||||
-rw-r--r-- | dev-php/scrypt/metadata.xml | 22 | ||||
-rw-r--r-- | dev-php/scrypt/scrypt-1.4.2.ebuild | 20 | ||||
-rw-r--r-- | dev-php/scrypt/scrypt-9999.ebuild | 20 |
5 files changed, 112 insertions, 0 deletions
diff --git a/dev-php/scrypt/Manifest b/dev-php/scrypt/Manifest new file mode 100644 index 000000000000..2b70ca8e86eb --- /dev/null +++ b/dev-php/scrypt/Manifest @@ -0,0 +1 @@ +DIST scrypt-1.4.2.tgz 21585 BLAKE2B 6297b15aac8470eedc619c498badc4e453476a390cab0cfe7fabef00012131ff9e363834b9423a566dba603ea2a4351eee416419cc1e6c1245a9aba54d63a5ab SHA512 34a87e63250dcfb21b3d36f90a4e5f4bac9f0623917ceb0d613d49112ce0e13df9a93fb0730fb797be6337d023dc490fb881902b5492309fe8bf3e6fd5e685a0 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 new file mode 100644 index 000000000000..a5e1ea665897 --- /dev/null +++ b/dev-php/scrypt/files/scrypt-1.4.2-php8-0.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/dev-php/scrypt/metadata.xml b/dev-php/scrypt/metadata.xml new file mode 100644 index 000000000000..7fd91a5b5f80 --- /dev/null +++ b/dev-php/scrypt/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>spiderx@spiderx.dp.ua</email> + <name>Vladimir Pavljuchenkov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + A PHP library providing a wrapper to Colin Percival's scrypt + implementation. Scrypt is a key derivation function designed + to be far more secure against hardware brute-force attacks + than alternative functions such as PBKDF2 or bcrypt. + </longdescription> + <upstream> + <remote-id type="github">DomBlack/php-scrypt</remote-id> + <remote-id type="pecl">scrypt</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-php/scrypt/scrypt-1.4.2.ebuild b/dev-php/scrypt/scrypt-1.4.2.ebuild new file mode 100644 index 000000000000..026a54355943 --- /dev/null +++ b/dev-php/scrypt/scrypt-1.4.2.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PHP_EXT_ECONF_ARGS="--enable-scrypt" +USE_PHP="php7-3 php7-4 php8-0" + +inherit php-ext-pecl-r3 + +DESCRIPTION="A PHP wrapper fo the scrypt hashing algorithm" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-util/re2c" + +PATCHES=( "${FILESDIR}"/"${P}"-php8-0.patch ) diff --git a/dev-php/scrypt/scrypt-9999.ebuild b/dev-php/scrypt/scrypt-9999.ebuild new file mode 100644 index 000000000000..900385d5cf23 --- /dev/null +++ b/dev-php/scrypt/scrypt-9999.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PHP_EXT_ECONF_ARGS="--enable-scrypt" +USE_PHP="php7-3 php7-4 php8-0" +EGIT_REPO_URI="https://github.com/DomBlack/php-scrypt.git" + +inherit git-r3 php-ext-pecl-r3 + +DESCRIPTION="A PHP wrapper fo the scrypt hashing algorithm" +SRC_URI="" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND="dev-util/re2c" |