[arch-commits] Commit in crystal/trunk (PKGBUILD libevent-2.1.11.patch)

Anatol Pomozov anatolik at archlinux.org
Tue Aug 13 00:35:38 UTC 2019


    Date: Tuesday, August 13, 2019 @ 00:35:37
  Author: anatolik
Revision: 499043

upgpkg: crystal 0.30.1-1

Modified:
  crystal/trunk/PKGBUILD
Deleted:
  crystal/trunk/libevent-2.1.11.patch

-----------------------+
 PKGBUILD              |   13 +++-------
 libevent-2.1.11.patch |   61 ------------------------------------------------
 2 files changed, 4 insertions(+), 70 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-12 23:37:41 UTC (rev 499042)
+++ PKGBUILD	2019-08-13 00:35:37 UTC (rev 499043)
@@ -2,8 +2,8 @@
 # Contributor: Jonne Haß <me at jhass.eu>
 
 pkgname=crystal
-pkgver=0.30.0
-pkgrel=4
+pkgver=0.30.1
+pkgrel=1
 pkgdesc='The Crystal Programming Language'
 arch=(x86_64)
 url='https://crystal-lang.org'
@@ -15,17 +15,12 @@
             'libyaml: For YAML support'
             'gmp: For BigInt support'
             'libxml2: For XML support')
-source=(crystal-$pkgver.tar.gz::https://github.com/crystal-lang/crystal/archive/$pkgver.tar.gz
-        libevent-2.1.11.patch)
-sha256sums=('fc884970089e382344540676a9c5aa4f369c9a0f45d1858e079b4ce26878164a'
-            '3917a15399078079b6b8d78f418f4dbc8dcfd94b8a39f7b083d6075b441a5adc')
+source=(crystal-$pkgver.tar.gz::https://github.com/crystal-lang/crystal/archive/$pkgver.tar.gz)
+sha256sums=('0ffc00fa54929c2533bc0bcb89e0b001dd3abc470ccc87e3576047a5cdafc062')
 
 prepare() {
   cd $pkgname-$pkgver
   sed -i 's|Please install shards: https://github.com/ysbaddaden/shards|Please install shards: pacman -S shards|' src/compiler/crystal/command.cr
-
-  # https://github.com/crystal-lang/crystal/issues/8044
-  patch -Np1 -i ../libevent-2.1.11.patch
 }
 
 build() {

Deleted: libevent-2.1.11.patch
===================================================================
--- libevent-2.1.11.patch	2019-08-12 23:37:41 UTC (rev 499042)
+++ libevent-2.1.11.patch	2019-08-13 00:35:37 UTC (rev 499043)
@@ -1,61 +0,0 @@
-From 284fb1e35abce2ecbebe41b3d6a78bf757145b9b Mon Sep 17 00:00:00 2001
-From: Juan Wajnerman <jwajnerman at manas.com.ar>
-Date: Thu, 8 Aug 2019 08:23:26 -0300
-Subject: [PATCH] Don't resume fibers directly from event loop callbacks (fixes
- #8044). (#8058)
-
-This is required to enable compatibility with libevent 2.1.11, because
-a warning is now raised if a `fork` is executed from within the event loop (https://github.com/libevent/libevent/commit/497ef904d544ac51de43934549dbeccce8e6e8f8).
-Since most Crystal code actually runs from within the event loop (from libevent point of view)
-the solution is enqueue the fibers and resume them outside the call to `event_base_loop`.
----
- src/crystal/event_loop.cr | 9 +++++++--
- src/io/evented.cr         | 4 ++--
- 2 files changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/crystal/event_loop.cr b/src/crystal/event_loop.cr
-index 9d8cc2812a..a4726b16d4 100644
---- a/src/crystal/event_loop.cr
-+++ b/src/crystal/event_loop.cr
-@@ -13,12 +13,17 @@ module Crystal::EventLoop
-   end
- 
-   private def self.loop_fiber
--    @@loop_fiber ||= Fiber.new { @@eb.run_loop }
-+    @@loop_fiber ||= Fiber.new do
-+      loop do
-+        @@eb.run_once
-+        Crystal::Scheduler.reschedule
-+      end
-+    end
-   end
- 
-   def self.create_resume_event(fiber)
-     @@eb.new_event(-1, LibEvent2::EventFlags::None, fiber) do |s, flags, data|
--      data.as(Fiber).resume
-+      Crystal::Scheduler.enqueue data.as(Fiber)
-     end
-   end
- 
-diff --git a/src/io/evented.cr b/src/io/evented.cr
-index ae2895c571..deca61cd87 100644
---- a/src/io/evented.cr
-+++ b/src/io/evented.cr
-@@ -99,7 +99,7 @@ module IO::Evented
-     @read_timed_out = timed_out
- 
-     if reader = @readers.try &.shift?
--      reader.resume
-+      Crystal::Scheduler.enqueue reader
-     end
-   end
- 
-@@ -108,7 +108,7 @@ module IO::Evented
-     @write_timed_out = timed_out
- 
-     if writer = @writers.try &.shift?
--      writer.resume
-+      Crystal::Scheduler.enqueue writer
-     end
-   end
- 



More information about the arch-commits mailing list