From 0ed7b09c793a89f6c2347ce5d68c9fcb004d544d Mon Sep 17 00:00:00 2001
From: Danny Rawlins <monster.romster@gmail.com>
Date: Tue, 7 Jul 2020 00:09:20 +1000
Subject: [PATCH] libevent-32: 2.1.11 -> 2.1.12

---
 libevent-32/.footprint                        | 30 ++++++++---------
 libevent-32/.signature                        |  9 +++---
 libevent-32/Pkgfile                           |  8 ++---
 .../warn-if-forked-from-the-event-loop.patch  | 32 -------------------
 4 files changed, 21 insertions(+), 58 deletions(-)
 delete mode 100644 libevent-32/warn-if-forked-from-the-event-loop.patch

diff --git a/libevent-32/.footprint b/libevent-32/.footprint
index aff4a304..10e3ef75 100644
--- a/libevent-32/.footprint
+++ b/libevent-32/.footprint
@@ -1,30 +1,30 @@
 drwxr-xr-x	root/root	usr/
 drwxr-xr-x	root/root	usr/lib32/
-lrwxrwxrwx	root/root	usr/lib32/libevent-2.1.so.7 -> libevent-2.1.so.7.0.0
--rwxr-xr-x	root/root	usr/lib32/libevent-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent-2.1.so.7 -> libevent-2.1.so.7.0.1
+-rwxr-xr-x	root/root	usr/lib32/libevent-2.1.so.7.0.1
 -rw-r--r--	root/root	usr/lib32/libevent.a
 -rwxr-xr-x	root/root	usr/lib32/libevent.la
-lrwxrwxrwx	root/root	usr/lib32/libevent.so -> libevent-2.1.so.7.0.0
-lrwxrwxrwx	root/root	usr/lib32/libevent_core-2.1.so.7 -> libevent_core-2.1.so.7.0.0
--rwxr-xr-x	root/root	usr/lib32/libevent_core-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent.so -> libevent-2.1.so.7.0.1
+lrwxrwxrwx	root/root	usr/lib32/libevent_core-2.1.so.7 -> libevent_core-2.1.so.7.0.1
+-rwxr-xr-x	root/root	usr/lib32/libevent_core-2.1.so.7.0.1
 -rw-r--r--	root/root	usr/lib32/libevent_core.a
 -rwxr-xr-x	root/root	usr/lib32/libevent_core.la
-lrwxrwxrwx	root/root	usr/lib32/libevent_core.so -> libevent_core-2.1.so.7.0.0
-lrwxrwxrwx	root/root	usr/lib32/libevent_extra-2.1.so.7 -> libevent_extra-2.1.so.7.0.0
--rwxr-xr-x	root/root	usr/lib32/libevent_extra-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent_core.so -> libevent_core-2.1.so.7.0.1
+lrwxrwxrwx	root/root	usr/lib32/libevent_extra-2.1.so.7 -> libevent_extra-2.1.so.7.0.1
+-rwxr-xr-x	root/root	usr/lib32/libevent_extra-2.1.so.7.0.1
 -rw-r--r--	root/root	usr/lib32/libevent_extra.a
 -rwxr-xr-x	root/root	usr/lib32/libevent_extra.la
-lrwxrwxrwx	root/root	usr/lib32/libevent_extra.so -> libevent_extra-2.1.so.7.0.0
-lrwxrwxrwx	root/root	usr/lib32/libevent_openssl-2.1.so.7 -> libevent_openssl-2.1.so.7.0.0
--rwxr-xr-x	root/root	usr/lib32/libevent_openssl-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent_extra.so -> libevent_extra-2.1.so.7.0.1
+lrwxrwxrwx	root/root	usr/lib32/libevent_openssl-2.1.so.7 -> libevent_openssl-2.1.so.7.0.1
+-rwxr-xr-x	root/root	usr/lib32/libevent_openssl-2.1.so.7.0.1
 -rw-r--r--	root/root	usr/lib32/libevent_openssl.a
 -rwxr-xr-x	root/root	usr/lib32/libevent_openssl.la
-lrwxrwxrwx	root/root	usr/lib32/libevent_openssl.so -> libevent_openssl-2.1.so.7.0.0
-lrwxrwxrwx	root/root	usr/lib32/libevent_pthreads-2.1.so.7 -> libevent_pthreads-2.1.so.7.0.0
--rwxr-xr-x	root/root	usr/lib32/libevent_pthreads-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent_openssl.so -> libevent_openssl-2.1.so.7.0.1
+lrwxrwxrwx	root/root	usr/lib32/libevent_pthreads-2.1.so.7 -> libevent_pthreads-2.1.so.7.0.1
+-rwxr-xr-x	root/root	usr/lib32/libevent_pthreads-2.1.so.7.0.1
 -rw-r--r--	root/root	usr/lib32/libevent_pthreads.a
 -rwxr-xr-x	root/root	usr/lib32/libevent_pthreads.la
-lrwxrwxrwx	root/root	usr/lib32/libevent_pthreads.so -> libevent_pthreads-2.1.so.7.0.0
+lrwxrwxrwx	root/root	usr/lib32/libevent_pthreads.so -> libevent_pthreads-2.1.so.7.0.1
 drwxr-xr-x	root/root	usr/lib32/pkgconfig/
 -rw-r--r--	root/root	usr/lib32/pkgconfig/libevent.pc
 -rw-r--r--	root/root	usr/lib32/pkgconfig/libevent_core.pc
diff --git a/libevent-32/.signature b/libevent-32/.signature
index 0fe70944..25b5f68f 100644
--- a/libevent-32/.signature
+++ b/libevent-32/.signature
@@ -1,6 +1,5 @@
 untrusted comment: verify with /etc/ports/compat-32.pub
-RWSwxGo/zH7eXQud8QbSrGvQn/jDNV206w6233Ac9/zI6toH8eUJ3Sfe9L4uYDhcGcSoQDir0rN3CZ701PgI7wRc0hLhIU3Hiwo=
-SHA256 (Pkgfile) = 26b03ba2e143824c8574a0f80f781aef30558552cf46e0703acf0a58baf0c6be
-SHA256 (.footprint) = b4243fdf523e0af8c77b0591ec4f4f485eda339735b37f2edd125fa3489d695b
-SHA256 (libevent-2.1.11-stable.tar.gz) = a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d
-SHA256 (warn-if-forked-from-the-event-loop.patch) = 91572f51556e641b1eff864075cf40b4bb5b0c2fc16f45ab1872e16a391792ad
+RWSwxGo/zH7eXZVF9rig8UHKzZ0o82wfJ9xU78vlBo8NRPE0vIuvSdh2Ur2I91g1ZnFbQB3MHX33T98GtgJsmWGCuLcD3WtKTwU=
+SHA256 (Pkgfile) = 8a4e873aa871fc65d2d881dc8a62fdefb81eac450c1632fe8d7e62b087a8ef21
+SHA256 (.footprint) = 0b6dbb18474f8e5e61833290d34e51e6df53ade44dbdad908bbf12e01a500b41
+SHA256 (libevent-2.1.12-stable.tar.gz) = 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
diff --git a/libevent-32/Pkgfile b/libevent-32/Pkgfile
index 96eddc11..c0a70014 100644
--- a/libevent-32/Pkgfile
+++ b/libevent-32/Pkgfile
@@ -4,17 +4,13 @@
 # Depends on: openssl-32 libevent
 
 name=libevent-32
-version=2.1.11
+version=2.1.12
 release=1
-source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/libevent-$version-stable.tar.gz
-	warn-if-forked-from-the-event-loop.patch)
+source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/libevent-$version-stable.tar.gz)
 
 build() {
 	cd libevent-$version-stable
 
-	# https://archives.seul.org/libevent/users/Aug-2019/msg00009.html
-	patch -p1 -R -i $SRC/warn-if-forked-from-the-event-loop.patch
-    
 	./configure --prefix=/usr --libdir=/usr/lib32
 	make
 	make DESTDIR=$PKG install
diff --git a/libevent-32/warn-if-forked-from-the-event-loop.patch b/libevent-32/warn-if-forked-from-the-event-loop.patch
deleted file mode 100644
index b6fd3ece..00000000
--- a/libevent-32/warn-if-forked-from-the-event-loop.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b75922ae5b6d7bea6ef2f53618dca6c5760c71b4 Mon Sep 17 00:00:00 2001
-From: Azat Khuzhin <azat@libevent.org>
-Date: Mon, 1 Jul 2019 23:54:02 +0300
-Subject: [PATCH] Warn if forked from the event loop during event_reinit()
-
-Calling fork() from the event loop is not a great idea, since at least
-it shares some internal pipes (for handling signals) before
-event_reinit() call
-
-Closes: #833
-(cherry picked from commit 497ef904d544ac51de43934549dbeccce8e6e8f8)
----
- event.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/event.c b/event.c
-index bfd94ebd0..b2ad34102 100644
---- a/event.c
-+++ b/event.c
-@@ -987,6 +987,12 @@ event_reinit(struct event_base *base)
- 
- 	EVBASE_ACQUIRE_LOCK(base, th_base_lock);
- 
-+	if (base->running_loop) {
-+		event_warnx("%s: forked from the event_loop.", __func__);
-+		res = -1;
-+		goto done;
-+	}
-+
- 	evsel = base->evsel;
- 
- 	/* check if this event mechanism requires reinit on the backend */