summaryrefslogtreecommitdiff
path: root/dev-ruby/eventmachine
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-ruby/eventmachine
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-ruby/eventmachine')
-rw-r--r--dev-ruby/eventmachine/Manifest2
-rw-r--r--dev-ruby/eventmachine/eventmachine-1.2.7-r4.ebuild87
-rw-r--r--dev-ruby/eventmachine/eventmachine-1.2.7-r5.ebuild89
-rw-r--r--dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby3-process-status.patch94
-rw-r--r--dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby33.patch35
-rw-r--r--dev-ruby/eventmachine/files/eventmachine-1.2.7-test-processes.patch73
-rw-r--r--dev-ruby/eventmachine/metadata.xml18
7 files changed, 398 insertions, 0 deletions
diff --git a/dev-ruby/eventmachine/Manifest b/dev-ruby/eventmachine/Manifest
new file mode 100644
index 000000000000..81c0d1ad05ae
--- /dev/null
+++ b/dev-ruby/eventmachine/Manifest
@@ -0,0 +1,2 @@
+DIST eventmachine-1.2.7-openssl-patches.tar.bz2 14837 BLAKE2B 5f3280c053bd67c97db53814db3bbfd9bb3047d0fdae3972494a88bc9062e0f20b5684da8ba4264299a4fd5b0c159ad0d006fe78f6f1e8c0e9cdb531d98e3017 SHA512 9294ae918a51c2e7db098add3e793a2a57e40b223b7ee7113664245b5584af7b7bb180cf1dd83d0c30a316b6598a0a4507b953603c95482c42738099d33419d0
+DIST eventmachine-1.2.7.tar.gz 246402 BLAKE2B 3eee1e5fbb367c03e3d801cb705a0f95b7bbb461885f04820f57421019a3d61eecabe71309981eec35168395eb6d98a8c675bd0fb225497de511f2ce09a5df92 SHA512 768ec084903dce4c737cf564fce7886a3e7e5b7d4a89c2baea3e998130c53dc00488eaa2d8e9b0133d9e4d8fffbde80c3025403881486a7968c2d84425cc1f50
diff --git a/dev-ruby/eventmachine/eventmachine-1.2.7-r4.ebuild b/dev-ruby/eventmachine/eventmachine-1.2.7-r4.ebuild
new file mode 100644
index 000000000000..756a8de65e8d
--- /dev/null
+++ b/dev-ruby/eventmachine/eventmachine-1.2.7-r4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_DOCDIR="rdoc"
+RUBY_FAKEGEM_EXTRADOC="docs/*.md CHANGELOG.md README.md"
+
+RUBY_FAKEGEM_GEMSPEC="eventmachine.gemspec"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/extconf.rb ext/fastfilereader/extconf.rb)
+RUBY_FAKEGEM_EXTRAINSTALL=(examples)
+
+inherit ruby-fakegem
+
+DESCRIPTION="EventMachine is a fast, simple event-processing library for Ruby programs"
+HOMEPAGE="https://github.com/eventmachine/eventmachine"
+SRC_URI="https://github.com/eventmachine/eventmachine/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+# Collection of upstream patches to fix compatibility with newer OpenSSL
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-openssl-patches.tar.bz2"
+
+LICENSE="|| ( GPL-2 Ruby-BSD )"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="${DEPEND}
+ dev-libs/openssl:0="
+RDEPEND="${RDEPEND}
+ dev-libs/openssl:0="
+
+ruby_add_bdepend "test? ( dev-ruby/test-unit:2 )"
+
+PATCHES=(
+ # Collection of upstream patches (rebased by Fedora, thanks!) to
+ # fix (mostly test) compatibility with >= OpenSSL 1.1.1.
+ "${WORKDIR}"/all/patches/
+ # Backport upstream changes for ruby 3
+ "${FILESDIR}"/${P}-test-processes.patch
+ "${FILESDIR}"/${P}-ruby3-process-status.patch
+)
+
+all_ruby_prepare() {
+ # Remove package tasks to avoid dependency on rake-compiler.
+ rm rakelib/package.rake || die
+
+ sed -i -e '/git ls-files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
+ # Remove the resolver tests since they require network access and
+ # the localhost test fails with an IPv6 localhost.
+ rm tests/test_resolver.rb || die
+
+ # Needs a tty
+ rm tests/test_kb.rb || die
+
+ # Avoid tests that require network access
+ sed -e '/test_bind_connect/,/^ end/ s:^:#:' \
+ -e '/test_invalid_address_bind_connect_src/,/^ end/ s:^:#:' \
+ -e '/test_invalid_address_bind_connect_dst/,/^ end/ s:^:#:' \
+ -i tests/test_basic.rb || die
+ sed -e '/test_ipv6_udp_local_server/,/^ end/ s:^:#:' \
+ -e '/test_ipv6_tcp_local_server/,/^ end/ s:^:#:' \
+ -i tests/test_ipv6.rb || die
+ sed -e '/test_for_real/,/^ end/ s:^:#:' -i tests/test_pending_connect_timeout.rb || die
+ sed -e '/test_connect_timeout/,/^ end/ s:^:#:' -i tests/test_unbind_reason.rb || die
+ sed -e '/test_cookie/,/^ end/ s:^:#:' \
+ -e '/test_http_client/,/^ end/ s:^:#:' \
+ -e '/test_version_1_0/,/^ end/ s:^:#:' \
+ -i tests/test_httpclient.rb || die
+ sed -e '/test_get/,/^ end/ s:^:#:' \
+ -e '/test_https_get/,/^ end/ s:^:#:' \
+ -i tests/test_httpclient2.rb || die
+
+ # Avoid test that deliberately triggers a C++ exception which causes
+ # a SEGFAULT. This does not appear to happen upstream (on travis).
+ rm tests/test_exc.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib -S testrb-2 tests/test_*.rb || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+}
diff --git a/dev-ruby/eventmachine/eventmachine-1.2.7-r5.ebuild b/dev-ruby/eventmachine/eventmachine-1.2.7-r5.ebuild
new file mode 100644
index 000000000000..54c00076cfca
--- /dev/null
+++ b/dev-ruby/eventmachine/eventmachine-1.2.7-r5.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby32 ruby33 ruby34 ruby40"
+
+RUBY_FAKEGEM_DOCDIR="rdoc"
+RUBY_FAKEGEM_EXTRADOC="docs/*.md CHANGELOG.md README.md"
+
+RUBY_FAKEGEM_GEMSPEC="eventmachine.gemspec"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/extconf.rb ext/fastfilereader/extconf.rb)
+RUBY_FAKEGEM_EXTRAINSTALL=(examples)
+
+inherit ruby-fakegem
+
+DESCRIPTION="EventMachine is a fast, simple event-processing library for Ruby programs"
+HOMEPAGE="https://github.com/eventmachine/eventmachine"
+SRC_URI="https://github.com/eventmachine/eventmachine/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+# Collection of upstream patches to fix compatibility with newer OpenSSL
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-openssl-patches.tar.bz2"
+
+LICENSE="|| ( GPL-2 Ruby-BSD )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="${DEPEND}
+ dev-libs/openssl:0="
+RDEPEND="${RDEPEND}
+ dev-libs/openssl:0="
+
+ruby_add_bdepend "test? ( dev-ruby/test-unit:2 )"
+
+PATCHES=(
+ # Collection of upstream patches (rebased by Fedora, thanks!) to
+ # fix (mostly test) compatibility with >= OpenSSL 1.1.1.
+ "${WORKDIR}"/all/patches/
+ # Backport upstream changes for ruby 3
+ "${FILESDIR}"/${P}-test-processes.patch
+ "${FILESDIR}"/${P}-ruby3-process-status.patch
+ # Backport upstream changes for ruby 3.3
+ "${FILESDIR}"/${P}-ruby33.patch
+)
+
+all_ruby_prepare() {
+ # Remove package tasks to avoid dependency on rake-compiler.
+ rm rakelib/package.rake || die
+
+ sed -i -e '/git ls-files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
+ # Remove the resolver tests since they require network access and
+ # the localhost test fails with an IPv6 localhost.
+ rm tests/test_resolver.rb || die
+
+ # Needs a tty
+ rm tests/test_kb.rb || die
+
+ # Avoid tests that require network access
+ sed -e '/test_bind_connect/,/^ end/ s:^:#:' \
+ -e '/test_invalid_address_bind_connect_src/,/^ end/ s:^:#:' \
+ -e '/test_invalid_address_bind_connect_dst/,/^ end/ s:^:#:' \
+ -i tests/test_basic.rb || die
+ sed -e '/test_ipv6_udp_local_server/,/^ end/ s:^:#:' \
+ -e '/test_ipv6_tcp_local_server/,/^ end/ s:^:#:' \
+ -i tests/test_ipv6.rb || die
+ sed -e '/test_for_real/,/^ end/ s:^:#:' -i tests/test_pending_connect_timeout.rb || die
+ sed -e '/test_connect_timeout/,/^ end/ s:^:#:' -i tests/test_unbind_reason.rb || die
+ sed -e '/test_cookie/,/^ end/ s:^:#:' \
+ -e '/test_http_client/,/^ end/ s:^:#:' \
+ -e '/test_version_1_0/,/^ end/ s:^:#:' \
+ -i tests/test_httpclient.rb || die
+ sed -e '/test_get/,/^ end/ s:^:#:' \
+ -e '/test_https_get/,/^ end/ s:^:#:' \
+ -i tests/test_httpclient2.rb || die
+
+ # Avoid test that deliberately triggers a C++ exception which causes
+ # a SEGFAULT. This does not appear to happen upstream (on travis).
+ rm tests/test_exc.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib -S testrb-2 tests/test_*.rb || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+}
diff --git a/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby3-process-status.patch b/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby3-process-status.patch
new file mode 100644
index 000000000000..f836d3ff076e
--- /dev/null
+++ b/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby3-process-status.patch
@@ -0,0 +1,94 @@
+From daeb121fb5600cc0f4fc604fbf7d742578f26483 Mon Sep 17 00:00:00 2001
+From: MSP-Greg <Greg.mpls@gmail.com>
+Date: Sat, 12 Jun 2021 22:37:37 -0500
+Subject: [PATCH] Fixes for Process::Status changes in Ruby 3
+
+---
+ ext/extconf.rb | 3 +++
+ ext/rubymain.cpp | 36 ++++++++++++++++++++++++++++++------
+ 2 files changed, 33 insertions(+), 6 deletions(-)
+
+diff --git a/ext/extconf.rb b/ext/extconf.rb
+index 0fb654104..ce83c0028 100644
+--- a/ext/extconf.rb
++++ b/ext/extconf.rb
+@@ -138,6 +138,9 @@ def find_openssl_library
+ add_define "HAVE_KQUEUE" if have_header("sys/event.h") && have_header("sys/queue.h")
+ end
+
++# Add for changes to Process::Status in Ruby 3
++add_define("IS_RUBY_3_OR_LATER") if RUBY_VERSION > "3.0"
++
+ # Adjust number of file descriptors (FD) on Windows
+
+ if RbConfig::CONFIG["host_os"] =~ /mingw/
+diff --git a/ext/rubymain.cpp b/ext/rubymain.cpp
+index 5da5c8b25..36018c63d 100644
+--- a/ext/rubymain.cpp
++++ b/ext/rubymain.cpp
+@@ -85,7 +85,24 @@ static VALUE Intern_proxy_target_unbound;
+ static VALUE Intern_proxy_completed;
+ static VALUE Intern_connection_completed;
+
+-static VALUE rb_cProcStatus;
++static VALUE rb_cProcessStatus;
++
++#ifdef IS_RUBY_3_OR_LATER
++struct rb_process_status {
++ rb_pid_t pid;
++ int status;
++ int error;
++};
++
++static const rb_data_type_t rb_process_status_type = {
++ .wrap_struct_name = "Process::Status",
++ .function = {
++ .dfree = RUBY_DEFAULT_FREE,
++ },
++ .data = NULL,
++ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
++};
++#endif
+
+ struct em_event {
+ uintptr_t signature;
+@@ -553,11 +570,18 @@ static VALUE t_get_subprocess_status (VALUE self UNUSED, VALUE signature)
+
+ if (evma_get_subprocess_status (NUM2BSIG (signature), &status)) {
+ if (evma_get_subprocess_pid (NUM2BSIG (signature), &pid)) {
+- proc_status = rb_obj_alloc(rb_cProcStatus);
+
++#ifdef IS_RUBY_3_OR_LATER
++ struct rb_process_status *data = NULL;
++ proc_status = TypedData_Make_Struct(rb_cProcessStatus, struct rb_process_status, &rb_process_status_type, data);
++ data->pid = pid;
++ data->status = status;
++#else
++ proc_status = rb_obj_alloc(rb_cProcessStatus);
+ /* MRI Ruby uses hidden instance vars */
+- rb_iv_set(proc_status, "status", INT2FIX(status));
+- rb_iv_set(proc_status, "pid", INT2FIX(pid));
++ rb_ivar_set(proc_status, rb_intern_const("status"), INT2FIX(status));
++ rb_ivar_set(proc_status, rb_intern_const("pid"), INT2FIX(pid));
++#endif
+
+ #ifdef RUBINIUS
+ /* Rubinius uses standard instance vars */
+@@ -572,7 +596,7 @@ static VALUE t_get_subprocess_status (VALUE self UNUSED, VALUE signature)
+ #endif
+ }
+ }
+-
++ rb_obj_freeze(proc_status);
+ return proc_status;
+ }
+
+@@ -1431,7 +1455,7 @@ extern "C" void Init_rubyeventmachine()
+ {
+ // Lookup Process::Status for get_subprocess_status
+ VALUE rb_mProcess = rb_const_get(rb_cObject, rb_intern("Process"));
+- rb_cProcStatus = rb_const_get(rb_mProcess, rb_intern("Status"));
++ rb_cProcessStatus = rb_const_get(rb_mProcess, rb_intern("Status"));
+
+ // Tuck away some symbol values so we don't have to look 'em up every time we need 'em.
+ Intern_at_signature = rb_intern ("@signature");
diff --git a/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby33.patch b/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby33.patch
new file mode 100644
index 000000000000..513c18508e59
--- /dev/null
+++ b/dev-ruby/eventmachine/files/eventmachine-1.2.7-ruby33.patch
@@ -0,0 +1,35 @@
+https://github.com/eventmachine/eventmachine/pull/988
+https://github.com/eventmachine/eventmachine/commit/3980847f4463bcaf80c06f53e95b7eb1dddd2404
+
+From 3980847f4463bcaf80c06f53e95b7eb1dddd2404 Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <asa@terceiro.xyz>
+Date: Thu, 5 Sep 2024 12:10:49 -0300
+Subject: [PATCH] Fix usage of Process::Status on ruby3.3 (#988)
+
+--- a/ext/extconf.rb
++++ b/ext/extconf.rb
+@@ -140,6 +140,7 @@ def find_openssl_library
+
+ # Add for changes to Process::Status in Ruby 3
+ add_define("IS_RUBY_3_OR_LATER") if RUBY_VERSION > "3.0"
++add_define("IS_RUBY_3_3_OR_LATER") if RUBY_VERSION > "3.3"
+
+ # Adjust number of file descriptors (FD) on Windows
+
+--- a/ext/rubymain.cpp
++++ b/ext/rubymain.cpp
+@@ -563,7 +563,13 @@ static VALUE t_get_subprocess_status (VALUE self UNUSED, VALUE signature)
+ if (evma_get_subprocess_status (NUM2BSIG (signature), &status)) {
+ if (evma_get_subprocess_pid (NUM2BSIG (signature), &pid)) {
+
+-#ifdef IS_RUBY_3_OR_LATER
++#if defined(IS_RUBY_3_3_OR_LATER)
++ proc_status = rb_obj_alloc(rb_cProcessStatus);
++ struct rb_process_status *data = NULL;
++ data = (rb_process_status*)RTYPEDDATA_GET_DATA(proc_status);
++ data->pid = pid;
++ data->status = status;
++#elif defined(IS_RUBY_3_OR_LATER)
+ struct rb_process_status *data = NULL;
+
+ /* Defined to match static definition from MRI Ruby 3.0 process.c
diff --git a/dev-ruby/eventmachine/files/eventmachine-1.2.7-test-processes.patch b/dev-ruby/eventmachine/files/eventmachine-1.2.7-test-processes.patch
new file mode 100644
index 000000000000..51e2a48c6f55
--- /dev/null
+++ b/dev-ruby/eventmachine/files/eventmachine-1.2.7-test-processes.patch
@@ -0,0 +1,73 @@
+From ec27b6250c2a00b4f2720abd86669e194ca016ac Mon Sep 17 00:00:00 2001
+From: MSP-Greg <Greg.mpls@gmail.com>
+Date: Fri, 21 May 2021 11:24:15 -0500
+Subject: [PATCH] Update test_processes.rb
+
+---
+ tests/test_processes.rb | 35 +++++++++++++++++++++++++++--------
+ 1 file changed, 27 insertions(+), 8 deletions(-)
+
+diff --git a/tests/test_processes.rb b/tests/test_processes.rb
+index eb21a6cec..9546022e7 100644
+--- a/tests/test_processes.rb
++++ b/tests/test_processes.rb
+@@ -32,23 +32,42 @@ def setup
+ end
+
+ def test_em_system
++ out, status = nil, nil
++
+ EM.run{
+- EM.system('ls'){ |out,status| $out, $status = out, status; EM.stop }
++ EM.system('ls'){ |_out,_status| out, status = _out, _status; EM.stop }
+ }
+
+- assert( $out.length > 0 )
+- assert_equal(0, $status.exitstatus)
+- assert_kind_of(Process::Status, $status)
++ assert(out.length > 0 )
++ assert_kind_of(Process::Status, status)
++ assert_equal(0, status.exitstatus)
++ end
++
++ def test_em_system_bad_exitstatus
++ status = nil
++ sys_pid = nil
++
++ EM.run{
++ sys_pid = EM.system('exit 1'){ |_out,_status| status = _status; EM.stop }
++ }
++
++ assert_kind_of(Process::Status, status)
++ refute_equal(0, status.exitstatus)
++ assert_equal sys_pid, status.pid
+ end
+
+ def test_em_system_pid
+- $pids = []
++ status = nil
++ sys_pid = nil
+
+ EM.run{
+- $pids << EM.system('echo hi', proc{ |out,status|$pids << status.pid; EM.stop })
++ sys_pid = EM.system('echo hi', proc{ |_out,_status| status = _status; EM.stop })
+ }
+
+- assert_equal $pids[0], $pids[1]
++ refute_equal(0, sys_pid)
++ assert_kind_of(Process::Status, status)
++ refute_equal(0, status.pid)
++ assert_equal sys_pid, status.pid
+ end
+
+ def test_em_system_with_proc
+@@ -57,8 +76,8 @@ def test_em_system_with_proc
+ }
+
+ assert( $out.length > 0 )
+- assert_equal(0, $status.exitstatus)
+ assert_kind_of(Process::Status, $status)
++ assert_equal(0, $status.exitstatus)
+ end
+
+ def test_em_system_with_two_procs
diff --git a/dev-ruby/eventmachine/metadata.xml b/dev-ruby/eventmachine/metadata.xml
new file mode 100644
index 000000000000..f9da4039ccad
--- /dev/null
+++ b/dev-ruby/eventmachine/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="rubygems">eventmachine</remote-id>
+ </upstream>
+ <longdescription>
+ Ruby/EventMachine is a fast, simple event-processing library for
+ Ruby programs. It lets you write network clients and servers without
+ handling sockets- all you do is send and receive
+ data. Single-threaded socket engine- scalable and FAST!
+ </longdescription>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>