From 36f44a39630a329b79432836ec6aecb8ab54a6e5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Tue, 28 Feb 2017 13:39:58 +0100
Subject: [PATCH] remove third party

---
 tools/gn/bootstrap/bootstrap.py | 34 +---------------------------------
 1 file changed, 1 insertion(+), 33 deletions(-)

diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 90adca2..0c790a2 100755
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -541,29 +541,9 @@ def write_gn_ninja(path, root_gen_dir, options):
         'base/time/time_posix.cc',
         'base/trace_event/heap_profiler_allocation_register_posix.cc',
     ])
-    static_libraries['libevent'] = {
-        'sources': [
-            'base/third_party/libevent/buffer.c',
-            'base/third_party/libevent/evbuffer.c',
-            'base/third_party/libevent/evdns.c',
-            'base/third_party/libevent/event.c',
-            'base/third_party/libevent/event_tagging.c',
-            'base/third_party/libevent/evrpc.c',
-            'base/third_party/libevent/evutil.c',
-            'base/third_party/libevent/http.c',
-            'base/third_party/libevent/log.c',
-            'base/third_party/libevent/poll.c',
-            'base/third_party/libevent/select.c',
-            'base/third_party/libevent/signal.c',
-            'base/third_party/libevent/strlcpy.c',
-        ],
-        'tool': 'cc',
-        'include_dirs': [],
-        'cflags': cflags + ['-DHAVE_CONFIG_H'],
-    }
 
   if is_linux:
-    libs.extend(['-lrt', '-latomic'])
+    libs.extend(['-lrt', '-latomic', '-levent'])
     ldflags.extend(['-pthread'])
 
     static_libraries['xdg_user_dirs'] = {
@@ -587,12 +567,6 @@ def write_gn_ninja(path, root_gen_dir, options):
         'base/threading/platform_thread_linux.cc',
         'base/trace_event/malloc_dump_provider.cc',
     ])
-    static_libraries['libevent']['include_dirs'].extend([
-        os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
-    ])
-    static_libraries['libevent']['sources'].extend([
-        'base/third_party/libevent/epoll.c',
-    ])
 
 
   if is_mac:
@@ -622,12 +596,6 @@ def write_gn_ninja(path, root_gen_dir, options):
         'base/threading/platform_thread_mac.mm',
         'base/trace_event/malloc_dump_provider.cc',
     ])
-    static_libraries['libevent']['include_dirs'].extend([
-        os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac')
-    ])
-    static_libraries['libevent']['sources'].extend([
-        'base/third_party/libevent/kqueue.c',
-    ])
 
     libs.extend([
         '-framework', 'AppKit',
-- 
2.7.4