summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/scrypt/scrypt-3.0.7-r3.ebuild')
-rw-r--r--dev-ruby/scrypt/scrypt-3.0.7-r3.ebuild41
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-ruby/scrypt/scrypt-3.0.7-r3.ebuild b/dev-ruby/scrypt/scrypt-3.0.7-r3.ebuild
new file mode 100644
index 00000000..3dda2e06
--- /dev/null
+++ b/dev-ruby/scrypt/scrypt-3.0.7-r3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby31 ruby32 ruby33"
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Scrypt password hashing algorithm"
+HOMEPAGE="https://github.com/pbhogan/scrypt"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+ruby_add_bdepend ">=dev-ruby/ffi-compiler-1.0.0"
+
+all_ruby_prepare() {
+ # In Gentoo ffi-compiler can be a built-time only dependency.
+ sed -i -e '/ffi-compiler/d' ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ sed -i -e '1i#define _POSIX_C_SOURCE 200809L' ext/scrypt/warnp.c || die
+}
+
+each_ruby_compile() {
+ # This task ignores CFLAGS and LDFLAGS and hardcodes sse and sse2
+ # support. This should be fixed before moving it to the gentoo tree.
+ ${RUBY} -Cext/scrypt -S rake || die
+ cp ext/scrypt/*/libscrypt_ext.so lib/
+}
+
+each_ruby_install() {
+ each_fakegem_install
+ ruby_fakegem_extensions_installed
+}