mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-21 14:21:02 +02:00
dev-ruby: cleanups
This commit is contained in:
parent
d48999059a
commit
4e7b8a253c
19 changed files with 20 additions and 330 deletions
|
|
@ -1,25 +0,0 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby24 ruby25"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="An Action Dispatch session store backed by an Active Record class"
|
||||
HOMEPAGE="https://github.com/rails/activerecord-session_store"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "
|
||||
|| ( dev-ruby/actionpack:4.2 dev-ruby/actionpack:5.2 dev-ruby/actionpack:6.0 )
|
||||
|| ( dev-ruby/activerecord:4.2 dev-ruby/activerecord:5.2 dev-ruby/activerecord:6.0 )
|
||||
|| ( dev-ruby/rack:2.0 dev-ruby/rack:1.6 )
|
||||
|| ( dev-ruby/railties:4.2 dev-ruby/railties:5.2 dev-ruby/railties:4.2 dev-ruby/railties:6.0 )
|
||||
>=dev-ruby/multi_json-1.11.2 =dev-ruby/multi_json-1*
|
||||
dev-ruby/sqlite3
|
||||
"
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
|
|
@ -15,9 +15,11 @@ SLOT="0"
|
|||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend ">=dev-ruby/actionpack-4.0:*
|
||||
>=dev-ruby/activerecord-4.0:*
|
||||
>=dev-ruby/multi_json-1.11.2 =dev-ruby/multi_json-1*
|
||||
ruby_add_rdepend "
|
||||
|| ( dev-ruby/actionpack:4.2 dev-ruby/actionpack:5.2 dev-ruby/actionpack:6.0 )
|
||||
|| ( dev-ruby/activerecord:4.2 dev-ruby/activerecord:5.2 dev-ruby/activerecord:6.0 )
|
||||
|| ( dev-ruby/rack:2.0 dev-ruby/rack:1.6 )
|
||||
>=dev-ruby/railties-4.0:*
|
||||
dev-ruby/sqlite3"
|
||||
|| ( dev-ruby/railties:4.2 dev-ruby/railties:5.2 dev-ruby/railties:4.2 dev-ruby/railties:6.0 )
|
||||
>=dev-ruby/multi_json-1.11.2 =dev-ruby/multi_json-1*
|
||||
dev-ruby/sqlite3
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
DIST ckeditor_rails-4.10.0.gem 989696 BLAKE2B c4993d2df3217ccb5745cfa2c75207f18a971bb834ccedbe55f7a3b14d18c13a90cf52747c22d6d165ec86a4b0b8e23efaceafb9d865696712397953cc30bed0 SHA512 45ea33485f1e198f4e9778ab5433b372d67a88ad73c4da67b4c286c57c5b351c318744f1f48231635c2475b9f73d941c9219cec3a8190403d9ee1a20d6aa3dec
|
||||
DIST ckeditor_rails-4.8.0.gem 973312 BLAKE2B f933ff41e05fb008886e2e7f29fdf85e921c884b9942fedadbc551575cf840d378b7d37d281a01753e1243152b4198253d4c4a235ccbf77c3a49047df9e60e7d SHA512 08afd38def97b86e024a7682fa416c68079d07c9b25edfd2834d2f499e5d3aaa475a65ffc717342ea9e2da7bab917cab00b2eb8ca660000acf48b9c03a2fcaa6
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="vendor"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="vendor"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="CKEditor is a javascript library of the WYSIWYG rich-text editor"
|
||||
HOMEPAGE="https://github.com/tsechingho/ckeditor-rails"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
|
@ -1 +0,0 @@
|
|||
DIST cookiejar-0.3.3.gem 20992 BLAKE2B fb49baa3a1d6bb2e4b89f29bb8a97a1afe6b1de8ce67001bd77fddb98a022d192fb3571f375489157cab380755d85b8010ab246629a807e2d26293df8ce58c13 SHA512 52ef655ef7f5219812216328ae24bbae0f5f6edea493bb96dffb1f9d665efa22cd3d1567e84c5cc3bec53ab3ceb8243afb4d710631cd274801e5b2de63a6edbe
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby24 ruby25"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Allows for parsing and returning cookies in Ruby HTTP client code"
|
||||
HOMEPAGE="https://github.com/dwaite/cookiejar"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
DIST libv8-3.16.14.15.gem 12197888 BLAKE2B a51120c9363bac2c72afe5441b7c1e58238764d6984aff1667a3d87563474acfc3d9b1656db1ace0ce9d7dc7413312f13e125bd7576ab42462a6461deef6d308 SHA512 28cc1431c50173ef43d28c02892ac0e86363403ec59e6ae98102c22bf17ad747cdef7a9357e54096e6e78960752439bd7a8283b9c7fe5bebb9bfa87ddde73401
|
||||
DIST libv8-7.3.492.27.1.gem 2251264 BLAKE2B b1376826dd0ed21c7209e0e5b74029991a8f4a61e038c3b841fc2505922f255fde307bf4dc4bca08f4477aeb953766fa20390d13364a14ed85a76abd2af69602 SHA512 08d9cab8eeb4c8964c6750b245952d26aaf1a065df595a6868109d82fafba9c2471a0f9fcf1f0017a783ee0ffc96985d849d262f3416810b2b1111605485094e
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
--- ext/libv8/builder.rb.orig 2018-07-22 08:46:32.555026647 +0800
|
||||
+++ ext/libv8/builder.rb 2018-07-22 08:47:19.588029204 +0800
|
||||
@@ -22,6 +22,9 @@
|
||||
end
|
||||
|
||||
def make_flags(*flags)
|
||||
+
|
||||
+ flags << "snapshot=off"
|
||||
+
|
||||
# FreeBSD uses gcc 4.2 by default which leads to
|
||||
# compilation failures due to warnings about aliasing.
|
||||
# http://svnweb.freebsd.org/ports/head/lang/v8/Makefile?view=markup
|
||||
--- ext/libv8/paths.rb.orig 2018-07-22 09:16:24.477124058 +0800
|
||||
+++ ext/libv8/paths.rb 2018-07-22 09:24:22.528150045 +0800
|
||||
@@ -11,7 +11,7 @@
|
||||
end
|
||||
|
||||
def object_paths
|
||||
- [libv8_object(:base), libv8_object(:snapshot)].map do |path|
|
||||
+ [libv8_object(:base), libv8_object(:nosnapshot)].map do |path|
|
||||
Shellwords.escape path
|
||||
end
|
||||
end
|
||||
|
||||
--- spec/location_spec.rb.orig 2018-07-22 08:46:32.558026647 +0800
|
||||
+++ spec/location_spec.rb 2018-07-22 09:01:37.475075840 +0800
|
||||
@@ -64,7 +64,7 @@
|
||||
end
|
||||
|
||||
it "prepends the locations of any libv8 objects on the the ldflags" do
|
||||
- @context.ldflags.should eql "/foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_snapshot.a -lobjc -lpthread"
|
||||
+ @context.ldflags.should eql "/foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a -lobjc -lpthread"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="libv8.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Distributes the V8 JavaScript engine in binary and source forms"
|
||||
HOMEPAGE="https://github.com/cowboyd/libv8"
|
||||
SRC_URI="mirror://rubygems/${P}.gem"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
all_ruby_prepare() {
|
||||
#fix mksnapshot segmentation fault
|
||||
epatch "${FILESDIR}/libv8-nosnapshot.patch"
|
||||
}
|
||||
|
||||
each_ruby_configure() {
|
||||
${RUBY} -C ext/libv8 extconf.rb || die "extconf failed"
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
each_fakegem_install
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/ext/libv8/
|
||||
doins ext/libv8/{.location.yml,arch.rb,location.rb,paths.rb}
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/vendor/v8/out/x64.release/obj.target/tools/gyp/
|
||||
doins vendor/v8/out/x64.release/obj.target/tools/gyp/*.a
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/vendor/v8/
|
||||
doins -r vendor/v8/include/
|
||||
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="libv8.gemspec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Distributes the V8 JavaScript engine in binary and source forms"
|
||||
HOMEPAGE="https://github.com/cowboyd/libv8"
|
||||
SRC_URI="mirror://rubygems/${P}.gem"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND+="sys-libs/ncurses-compat"
|
||||
|
||||
each_ruby_configure() {
|
||||
${RUBY} -C ext/libv8 extconf.rb || die "extconf failed"
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
each_fakegem_install
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/ext/libv8/
|
||||
doins ext/libv8/{.location.yml,location.rb,paths.rb}
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/vendor/v8/out.gn/libv8/obj/
|
||||
doins vendor/v8/out.gn/libv8/obj/*.a
|
||||
|
||||
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/vendor/v8/
|
||||
doins -r vendor/v8/include/
|
||||
|
||||
}
|
||||
|
|
@ -1,2 +1 @@
|
|||
DIST msfrpc-client-1.1.1.gem 13312 BLAKE2B 2e6ed33d394e68c14402e123e2a6312900bc5cc1d6342a87ad0c5daa74eac08027476bbd61e3b84b39c6b868a2f8c10aef33c1c163cfacedfab6fd0271d877b3 SHA512 ae34470f6bdb97482075b0cab4b2b261ff1f0dfa3def041f0f9f92457af0d6555ef2c10164a84aadf712d1a320ad2099e59a4b8ed3467a7ec2298c87a7258955
|
||||
DIST msfrpc-client-1.1.2.gem 13312 BLAKE2B 3d4710ac4a106a74415f005c1231cda11cc784fa2bcb2b4746e5fbe6c0abe4f9f6fcbc634a547be2cd2073929ba8dabb265a1603d2f26324e8bbd8adbba9b47b SHA512 c831cda3db51e768ca8f543060898bee3c6731eda58161a80347c0ba110e87cf94ef3601b30b5a15e413ac5dc0b3c495f100e13ff5fd6db75b502f3ad42904e5
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC="yard"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
|
||||
RUBY_FAKEGEM_TASK_TEST="spec"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="Ruby client API to access the Rapid7 Metasploit Pro RPC service"
|
||||
HOMEPAGE="http://rubygems.org/gems/msfrpc-client"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE=""
|
||||
|
||||
# Tests fail with load errors, possibly due to unfulfilled
|
||||
# dependencies. Needs ot be investigated before moved to main tree.
|
||||
RESTRICT="test"
|
||||
|
||||
#ruby_add_bdepend "doc? ( dev-ruby/yard )"
|
||||
#ruby_add_bdepend "test? ( dev-ruby/rspec )"
|
||||
|
||||
ruby_add_rdepend "=dev-ruby/rex-2* =dev-ruby/msgpack-1*"
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC="yard"
|
||||
RUBY_FAKEGEM_DOCDIR="doc"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
#RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
#RUBY_FAKEGEM_TASK_DOC=""
|
||||
#RUBY_FAKEGEM_BINWRAP=""
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby23 ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
|
||||
RUBY_FAKEGEM_BINDIR="exe"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
require 'mkmf'
|
||||
|
||||
dir_config("similar_text")
|
||||
|
||||
create_makefile("similar_text")
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#include <ruby.h>
|
||||
#include <string.h>
|
||||
|
||||
static void similar_text_similar_str(const char *txt1, int len1, const char *txt2, int len2, int *pos1, int *pos2, int *max)
|
||||
{
|
||||
char *p, *q;
|
||||
char *end1 = (char *) txt1 + len1;
|
||||
char *end2 = (char *) txt2 + len2;
|
||||
int l;
|
||||
|
||||
*max = 0;
|
||||
for (p = (char *) txt1; p < end1; p++) {
|
||||
for (q = (char *) txt2; q < end2; q++) {
|
||||
for (l = 0; (p + l < end1) && (q + l < end2) && (p[l] == q[l]); l++);
|
||||
if (l > *max) {
|
||||
*max = l;
|
||||
*pos1 = p - txt1;
|
||||
*pos2 = q - txt2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int similar_text_similar_char(const char *txt1, int len1, const char *txt2, int len2)
|
||||
{
|
||||
int sum;
|
||||
int pos1, pos2, max;
|
||||
|
||||
similar_text_similar_str(txt1, len1, txt2, len2, &pos1, &pos2, &max);
|
||||
if ((sum = max)) {
|
||||
if (pos1 && pos2) {
|
||||
sum += similar_text_similar_char(txt1, pos1,
|
||||
txt2, pos2);
|
||||
}
|
||||
if ((pos1 + max < len1) && (pos2 + max < len2)) {
|
||||
sum += similar_text_similar_char(txt1 + pos1 + max, len1 - pos1 - max,
|
||||
txt2 + pos2 + max, len2 - pos2 - max);
|
||||
}
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
int similar_text(const char *txt1, const char *txt2, double *percent)
|
||||
{
|
||||
size_t t1_len, t2_len;
|
||||
int sim;
|
||||
|
||||
t1_len = strlen(txt1);
|
||||
t2_len = strlen(txt2);
|
||||
|
||||
sim = similar_text_similar_char(txt1, t1_len, txt2, t2_len);
|
||||
*percent = sim * 200.0 / (t1_len + t2_len);
|
||||
|
||||
return sim;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the similarity between strings.
|
||||
*
|
||||
* "Hello, World!".similar("Hello, World!") #=> 100.0
|
||||
*
|
||||
* @return the percentage of similarity between two strings. Type of value Float from 0.0 to 100.0.
|
||||
*/
|
||||
static VALUE t_similar(VALUE str1, VALUE str2)
|
||||
{
|
||||
double percent;
|
||||
|
||||
similar_text(StringValueCStr(str1), StringValueCStr(str2), &percent);
|
||||
|
||||
return rb_float_new(percent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the similarity between strings.
|
||||
*
|
||||
* 'Hello WORLD!'.similar_chars 'Hello, World!' #=> 8
|
||||
*
|
||||
* @return number of matching chars between strings.
|
||||
*/
|
||||
static VALUE t_similar_chars(VALUE str1, VALUE str2)
|
||||
{
|
||||
double percent;
|
||||
int sim;
|
||||
|
||||
sim = similar_text(StringValueCStr(str1), StringValueCStr(str2), &percent);
|
||||
|
||||
return rb_int_new(sim);
|
||||
}
|
||||
|
||||
void Init_similar_text()
|
||||
{
|
||||
rb_cString = rb_define_class("String", rb_cObject);
|
||||
rb_define_method(rb_cString, "similar", t_similar, 1);
|
||||
rb_define_method(rb_cString, "similar_chars", t_similar_chars, 1);
|
||||
}
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
EAPI=7
|
||||
|
||||
USE_RUBY="ruby24 ruby25"
|
||||
USE_RUBY="ruby24 ruby25 ruby26"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue