git: b5308615514f - main - devel/rubygem-io-event: Add rubygem-io-event 1.0.5
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Apr 2022 00:00:22 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5308615514fb8be7320e496181edba20c6a18b5 commit b5308615514fb8be7320e496181edba20c6a18b5 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-04-17 23:39:21 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-04-17 23:39:21 +0000 devel/rubygem-io-event: Add rubygem-io-event 1.0.5 io-event provides an event loop library. WWW: https://github.com/socketry/io-event --- devel/Makefile | 1 + devel/rubygem-io-event/Makefile | 18 ++++++ devel/rubygem-io-event/distinfo | 3 + .../files/patch-ext-io-event-selector-kqueue.c | 65 ++++++++++++++++++++++ devel/rubygem-io-event/pkg-descr | 3 + 5 files changed, 90 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index c09e3acb10c2..46f54bd66a83 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6478,6 +6478,7 @@ SUBDIR += rubygem-instance_storage SUBDIR += rubygem-interact SUBDIR += rubygem-io-console + SUBDIR += rubygem-io-event SUBDIR += rubygem-io-like SUBDIR += rubygem-io-nonblock SUBDIR += rubygem-io-wait diff --git a/devel/rubygem-io-event/Makefile b/devel/rubygem-io-event/Makefile new file mode 100644 index 000000000000..09abf2604747 --- /dev/null +++ b/devel/rubygem-io-event/Makefile @@ -0,0 +1,18 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> + +PORTNAME= io-event +PORTVERSION= 1.0.5 +CATEGORIES= devel rubygems +MASTER_SITES= RG + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Event loop + +LICENSE= MIT + +BROKEN_RUBY27= yes + +USES= gem +USE_RUBY= yes + +.include <bsd.port.mk> diff --git a/devel/rubygem-io-event/distinfo b/devel/rubygem-io-event/distinfo new file mode 100644 index 000000000000..e3baf99afd95 --- /dev/null +++ b/devel/rubygem-io-event/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1650228658 +SHA256 (rubygem/io-event-1.0.5.gem) = b90a070eb8f61babfe3a6f5bb38869017225ec64139cac70c35220a8bfc5baf7 +SIZE (rubygem/io-event-1.0.5.gem) = 56320 diff --git a/devel/rubygem-io-event/files/patch-ext-io-event-selector-kqueue.c b/devel/rubygem-io-event/files/patch-ext-io-event-selector-kqueue.c new file mode 100644 index 000000000000..ff7c91ed2f68 --- /dev/null +++ b/devel/rubygem-io-event/files/patch-ext-io-event-selector-kqueue.c @@ -0,0 +1,65 @@ +--- ext/io/event/selector/kqueue.c.orig 2022-02-17 10:31:43 UTC ++++ ext/io/event/selector/kqueue.c +@@ -190,7 +190,7 @@ int process_add_filters(int descriptor, int ident, VAL + + event.ident = ident; + event.filter = EVFILT_PROC; +- event.flags = EV_ADD | EV_ENABLE | EV_ONESHOT | EV_UDATA_SPECIFIC; ++ event.flags = EV_ADD | EV_ENABLE | EV_ONESHOT; + event.fflags = NOTE_EXIT; + event.udata = (void*)fiber; + +@@ -214,7 +214,7 @@ void process_remove_filters(int descriptor, int ident) + + event.ident = ident; + event.filter = EVFILT_PROC; +- event.flags = EV_DELETE | EV_UDATA_SPECIFIC; ++ event.flags = EV_DELETE; + event.fflags = NOTE_EXIT; + + // Ignore the result. +@@ -273,7 +273,7 @@ int io_add_filters(int descriptor, int ident, int even + if (events & IO_EVENT_READABLE) { + kevents[count].ident = ident; + kevents[count].filter = EVFILT_READ; +- kevents[count].flags = EV_ADD | EV_ENABLE | EV_ONESHOT | EV_UDATA_SPECIFIC; ++ kevents[count].flags = EV_ADD | EV_ENABLE | EV_ONESHOT; + kevents[count].udata = (void*)fiber; + + // #ifdef EV_OOBAND +@@ -288,7 +288,7 @@ int io_add_filters(int descriptor, int ident, int even + if (events & IO_EVENT_WRITABLE) { + kevents[count].ident = ident; + kevents[count].filter = EVFILT_WRITE; +- kevents[count].flags = EV_ADD | EV_ENABLE | EV_ONESHOT | EV_UDATA_SPECIFIC; ++ kevents[count].flags = EV_ADD | EV_ENABLE | EV_ONESHOT; + kevents[count].udata = (void*)fiber; + count++; + } +@@ -310,7 +310,7 @@ void io_remove_filters(int descriptor, int ident, int + if (events & IO_EVENT_READABLE) { + kevents[count].ident = ident; + kevents[count].filter = EVFILT_READ; +- kevents[count].flags = EV_DELETE | EV_UDATA_SPECIFIC; ++ kevents[count].flags = EV_DELETE; + + count++; + } +@@ -318,7 +318,7 @@ void io_remove_filters(int descriptor, int ident, int + if (events & IO_EVENT_WRITABLE) { + kevents[count].ident = ident; + kevents[count].filter = EVFILT_WRITE; +- kevents[count].flags = EV_DELETE | EV_UDATA_SPECIFIC; ++ kevents[count].flags = EV_DELETE; + count++; + } + +@@ -695,7 +695,7 @@ VALUE IO_Event_Selector_KQueue_wakeup(VALUE self) { + struct kevent trigger = {0}; + + trigger.filter = EVFILT_USER; +- trigger.flags = EV_ADD | EV_CLEAR | EV_UDATA_SPECIFIC; ++ trigger.flags = EV_ADD | EV_CLEAR; + trigger.fflags = NOTE_TRIGGER; + + int result = kevent(data->descriptor, &trigger, 1, NULL, 0, NULL); diff --git a/devel/rubygem-io-event/pkg-descr b/devel/rubygem-io-event/pkg-descr new file mode 100644 index 000000000000..ff795e33157b --- /dev/null +++ b/devel/rubygem-io-event/pkg-descr @@ -0,0 +1,3 @@ +io-event provides an event loop library. + +WWW: https://github.com/socketry/io-event