Date: Sun, 25 Apr 2021 20:42:18 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4faf3e840018 - main - devel/rubygem-rb-kqueue: Update to 0.2.6 Message-ID: <202104252042.13PKgIJx091723@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=4faf3e8400180c103d262efb7ec9ce15fb1ad6a2 commit 4faf3e8400180c103d262efb7ec9ce15fb1ad6a2 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2021-04-25 20:18:22 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2021-04-25 20:36:15 +0000 devel/rubygem-rb-kqueue: Update to 0.2.6 Changes: https://github.com/mat813/rb-kqueue/commits/master --- devel/rubygem-rb-kqueue/Makefile | 3 +- devel/rubygem-rb-kqueue/distinfo | 6 +-- devel/rubygem-rb-kqueue/files/patch-pull-12 | 66 ----------------------------- 3 files changed, 4 insertions(+), 71 deletions(-) diff --git a/devel/rubygem-rb-kqueue/Makefile b/devel/rubygem-rb-kqueue/Makefile index 89d7e01b5143..31be618e1066 100644 --- a/devel/rubygem-rb-kqueue/Makefile +++ b/devel/rubygem-rb-kqueue/Makefile @@ -1,8 +1,7 @@ # Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> PORTNAME= rb-kqueue -PORTVERSION= 0.2.5 -PORTREVISION= 1 +PORTVERSION= 0.2.6 CATEGORIES= devel rubygems MASTER_SITES= RG diff --git a/devel/rubygem-rb-kqueue/distinfo b/devel/rubygem-rb-kqueue/distinfo index 2b5144db357d..268f7119aeec 100644 --- a/devel/rubygem-rb-kqueue/distinfo +++ b/devel/rubygem-rb-kqueue/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1604480798 -SHA256 (rubygem/rb-kqueue-0.2.5.gem) = 3c33aca20c6e12570298d1519da10606359bc42718876886dc8348a161feb092 -SIZE (rubygem/rb-kqueue-0.2.5.gem) = 18944 +TIMESTAMP = 1619198887 +SHA256 (rubygem/rb-kqueue-0.2.6.gem) = 586fb8513d5af99ab8fa28474993e4467e4b29124d65fb76cdda773caa4fb5e6 +SIZE (rubygem/rb-kqueue-0.2.6.gem) = 18944 diff --git a/devel/rubygem-rb-kqueue/files/patch-pull-12 b/devel/rubygem-rb-kqueue/files/patch-pull-12 deleted file mode 100644 index 8d0e890c8136..000000000000 --- a/devel/rubygem-rb-kqueue/files/patch-pull-12 +++ /dev/null @@ -1,66 +0,0 @@ -Obtained from: https://github.com/mat813/rb-kqueue/pull/12 - ---- lib/rb-kqueue/event.rb.orig -+++ lib/rb-kqueue/event.rb -@@ -3,6 +3,11 @@ module KQueue - # Each {Watcher} can fire many events, - # which are passed to that Watcher's callback. - class Event -+ -+ # Exception raised on an attempt to construct an {Event} -+ # from a native event with unexpected field values. -+ class UnexpectedEvent < Exception; end -+ - # Some integer data, the interpretation of which - # is specific to each individual {Watcher}. - # For specifics, see the individual Watcher subclasses. -@@ -64,7 +69,11 @@ def initialize(native, queue) - @native = native - @queue = queue - @data = @native[:data] -- @filter = KQueue::Native::Flags.from_flag("EVFILT", @native[:filter]) -+ begin -+ @filter = KQueue::Native::Flags.from_flag("EVFILT", @native[:filter]) -+ rescue Native::Flags::FlagNotFound -+ raise UnexpectedEvent -+ end - @flags = Native::Flags.from_mask("EV", @native[:flags]) - - KQueue.handle_error @native[:data] if @flags.include?(:error) ---- lib/rb-kqueue/native/flags.rb.orig -+++ lib/rb-kqueue/native/flags.rb -@@ -97,6 +97,9 @@ module Flags - NOTE_TIMER_NSECONDS = 0x00000004 # data is nanoseconds - NOTE_TIMER_ABSOLUTE = 0x00000008 # absolute timeout - -+ # Exception raised when a function fails to find a flag satisfying -+ # its given query. -+ class FlagNotFound < Exception; end - - # Converts a list of flags to the bitmask that the C API expects. - # -@@ -143,6 +146,7 @@ def self.from_flag(prefix, flag) - next unless c =~ re - return c.to_s.sub("#{prefix}_", "").downcase.to_sym if const_get(c) == flag - end -+ raise FlagNotFound - end - end - end ---- lib/rb-kqueue/queue.rb.orig -+++ lib/rb-kqueue/queue.rb -@@ -359,7 +359,13 @@ def read_events(blocking = true) - res = Native.kevent(@fd, nil, 0, eventlist, size, timeout) - - KQueue.handle_error if res < 0 -- (0...res).map {|i| KQueue::Event.new(Native::KEvent.new(eventlist[i]), self)} -+ (0...res).map do |i| -+ begin -+ KQueue::Event.new(Native::KEvent.new(eventlist[i]), self) -+ rescue KQueue::Event::UnexpectedEvent -+ nil -+ end -+ end.compact - end - end - end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104252042.13PKgIJx091723>