git: 8f9d8e7dcc91 - 2022Q2 - www/chromium: unbreak runtime by fixing up a bad merge in the bundled libevent

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Thu, 26 May 2022 10:55:21 UTC
The branch 2022Q2 has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8f9d8e7dcc917412c00a43ca998361ef406cbc85

commit 8f9d8e7dcc917412c00a43ca998361ef406cbc85
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2022-05-25 20:56:03 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2022-05-26 10:55:07 +0000

    www/chromium: unbreak runtime by fixing up a bad merge in the bundled libevent
    
    PR:             264236
    Reported by:    Oleh Hushchenkov <o.hushchenkov@gmail.com>
    Fixes:          6dc209ad0a87 "www/chromium: update to 102.0.5005.61"
    
    (cherry picked from commit d93692acad4c70e6818a7f0d6a27065b1497417b)
---
 www/chromium/Makefile                              |   1 +
 .../patch-base_third__party_libevent_BUILD.gn      | 101 +++++----------------
 2 files changed, 23 insertions(+), 79 deletions(-)

diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index 0f1af3a86296..c2b4250a65aa 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	chromium
 PORTVERSION=	102.0.5005.61
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
 		https://nerd.hu/distfiles/:fonts
diff --git a/www/chromium/files/patch-base_third__party_libevent_BUILD.gn b/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
index 46693612438d..22a313def647 100644
--- a/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
+++ b/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
@@ -1,81 +1,24 @@
---- base/third_party/libevent/BUILD.gn.orig	2022-05-19 14:06:27 UTC
+--- base/third_party/libevent/BUILD.gn.orig	2022-05-25 19:07:37 UTC
 +++ base/third_party/libevent/BUILD.gn
-@@ -1,69 +1,15 @@
--# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-+# Copyright 2016 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
- 
--import("//build/config/nacl/config.gni")
-+import("//build/shim_headers.gni")
- 
--static_library("libevent") {
--  sources = [
--    "buffer.c",
--    "evbuffer.c",
--    "evdns.c",
--    "evdns.h",
--    "event-config.h",
--    "event-internal.h",
--    "event.c",
--    "event.h",
--    "event_tagging.c",
--    "evhttp.h",
--    "evrpc-internal.h",
--    "evrpc.c",
--    "evrpc.h",
--    "evsignal.h",
--    "evutil.c",
--    "evutil.h",
--    "http-internal.h",
--    "http.c",
--    "log.c",
--    "log.h",
--    "min_heap.h",
--    "poll.c",
--    "select.c",
--    "signal.c",
--    "strlcpy-internal.h",
--    "strlcpy.c",
--  ]
-+shim_headers("libevent_shim") {
-+  root_path = "."
-+  headers = [ "event.h" ]
-+}
- 
--  defines = [ "HAVE_CONFIG_H" ]
--
--  if (is_apple) {
--    sources += [
--      "kqueue.c",
--      "mac/config.h",
--      "mac/event-config.h",
--    ]
--    include_dirs = [ "mac" ]
+@@ -43,13 +43,20 @@ static_library("libevent") {
+       "mac/event-config.h",
+     ]
+     include_dirs = [ "mac" ]
 -  } else if (is_linux || is_chromeos) {
--    sources += [
--      "epoll.c",
--      "linux/config.h",
--      "linux/event-config.h",
--    ]
--    include_dirs = [ "linux" ]
--  } else if (is_android) {
--    sources += [
--      "android/config.h",
--      "android/event-config.h",
--      "epoll.c",
--    ]
--    include_dirs = [ "android" ]
--  }
--
--  if (!is_debug) {
--    configs -= [ "//build/config/compiler:default_optimization" ]
--    configs += [ "//build/config/compiler:optimize_max" ]
--  }
--
--  configs -= [ "//build/config/compiler:chromium_code" ]
--  configs += [ "//build/config/compiler:no_chromium_code" ]
-+source_set("libevent") {
-+  deps = [ ":libevent_shim" ]
-+  libs = [ "event" ]
- }
++  } else if ((is_linux || is_chromeos) && !is_bsd) {
+     sources += [
+       "epoll.c",
+       "linux/config.h",
+       "linux/event-config.h",
+     ]
+     include_dirs = [ "linux" ]
++  } else if (is_bsd) {
++    sources += [
++      "kqueue.c",
++      "freebsd/config.h",
++      "freebsd/event-config.h",
++    ]
++    include_dirs = [ "freebsd" ]
+   } else if (is_android) {
+     sources += [
+       "android/config.h",