Skip to content

Commit e30e48d

Browse files
Copilotphlax
authored andcommitted
bazel-registry: Add libevent@2.1.12-stable.bcr.0.62c152d.envoy
Signed-off-by: Ryan Northey <ryan@synca.io>
1 parent f7cf0f8 commit e30e48d

File tree

19 files changed

+2486
-0
lines changed

19 files changed

+2486
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module(
2+
name = "libevent",
3+
version = "2.1.12-stable.bcr.0.62c152d.envoy",
4+
compatibility_level = 1,
5+
bazel_compatibility = [">=7.2.1"],
6+
)
7+
8+
bazel_dep(name = "openssl", version = "3.3.1.bcr.1")
9+
bazel_dep(name = "platforms", version = "0.0.10")
10+
bazel_dep(name = "rules_cc", version = "0.0.17")
11+
bazel_dep(name = "rules_license", version = "1.0.0")
12+
bazel_dep(name = "zlib", version = "1.3.1.bcr.4")
Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
# @libevent//:event_core
2+
# All core event and buffer functionality. This library contains all
3+
# the event_base, evbuffer, bufferevent, and utility functions.
4+
#
5+
# @libevent//:event_extra
6+
# This library defines protocol-specific functionality that you may
7+
# or may not want for your application, including HTTP, DNS, and
8+
# RPC.
9+
#
10+
# @libevent//:event
11+
# This library exists for historical reasons; it contains the
12+
# contents of both libevent_core and libevent_extra. You shouldn’t
13+
# use it; it may go away in a future version of Libevent.
14+
#
15+
# @libevent//:event_pthreads
16+
# This library adds threading and locking implementations based on
17+
# the pthreads portable threading library. It is separated from
18+
# libevent_core so that you don’t need to link against pthreads to
19+
# use Libevent unless you are actually using Libevent in a
20+
# multithreaded way.
21+
#
22+
# @libevent//:event_openssl
23+
# This library provides support for encrypted communications using
24+
# bufferevents and the OpenSSL library. It is separated from
25+
# libevent_core so that you don’t need to link against OpenSSL to
26+
# use Libevent unless you are actually using encrypted connections.
27+
28+
load("@rules_cc//cc:defs.bzl", "cc_library")
29+
load("@rules_license//rules:license.bzl", "license")
30+
31+
package(
32+
default_visibility = ["//visibility:private"],
33+
)
34+
35+
license(
36+
name = "license",
37+
license_kinds = [
38+
"@rules_license//licenses/spdx:BSD-3-Clause",
39+
"@rules_license//licenses/spdx:ISC",
40+
"@rules_license//licenses/spdx:MIT",
41+
],
42+
license_text = "LICENSE",
43+
)
44+
45+
exports_files([
46+
"LICENSE",
47+
])
48+
49+
cc_library(
50+
name = "event_core_private_headers",
51+
hdrs = [
52+
"bufferevent-internal.h",
53+
"changelist-internal.h",
54+
"defer-internal.h",
55+
"epolltable-internal.h",
56+
"evbuffer-internal.h",
57+
"evconfig-private.h",
58+
"evconfig-private_apple.h",
59+
"evconfig-private_linux.h",
60+
"event-internal.h",
61+
"event2-config_apple.h",
62+
"event2-config_common.h",
63+
"event2-config_linux.h",
64+
"event2-config_msvc.h",
65+
"evmap-internal.h",
66+
"evsignal-internal.h",
67+
"evthread-internal.h",
68+
"ht-internal.h",
69+
"iocp-internal.h",
70+
"ipv6-internal.h",
71+
"kqueue-internal.h",
72+
"log-internal.h",
73+
"minheap-internal.h",
74+
"mm-internal.h",
75+
"ratelim-internal.h",
76+
"strlcpy-internal.h",
77+
"time-internal.h",
78+
"util-internal.h",
79+
],
80+
visibility = [":__subpackages__"],
81+
)
82+
83+
EVENT_CORE_PUBLIC_HEADERS = [
84+
"include/event.h",
85+
"include/event2/buffer.h",
86+
"include/event2/buffer_compat.h",
87+
"include/event2/bufferevent.h",
88+
"include/event2/bufferevent_compat.h",
89+
"include/event2/bufferevent_ssl.h",
90+
"include/event2/bufferevent_struct.h",
91+
"include/event2/event.h",
92+
"include/event2/event-config.h",
93+
"include/event2/event_compat.h",
94+
"include/event2/event_struct.h",
95+
"include/event2/keyvalq_struct.h",
96+
"include/event2/listener.h",
97+
"include/event2/tag.h",
98+
"include/event2/tag_compat.h",
99+
"include/event2/thread.h",
100+
"include/event2/util.h",
101+
"include/event2/visibility.h",
102+
"include/event2/watch.h",
103+
"include/evutil.h",
104+
]
105+
106+
cc_library(
107+
name = "event_core",
108+
srcs = [
109+
"buffer.c",
110+
"bufferevent.c",
111+
"bufferevent_filter.c",
112+
"bufferevent_pair.c",
113+
"bufferevent_ratelim.c",
114+
"bufferevent_sock.c",
115+
"devpoll.c",
116+
"epoll.c",
117+
"event.c",
118+
"event_tagging.c",
119+
"evmap.c",
120+
"evport.c",
121+
"evthread.c",
122+
"evutil.c",
123+
"evutil_rand.c",
124+
"evutil_time.c",
125+
"kqueue.c",
126+
"listener.c",
127+
"log.c",
128+
"poll.c",
129+
"select.c",
130+
"signal.c",
131+
"strlcpy.c",
132+
"watch.c",
133+
] + select({
134+
"@platforms//os:windows": [
135+
"buffer_iocp.c",
136+
"bufferevent_async.c",
137+
"event_iocp.c",
138+
"evthread_win32.c",
139+
"win32select.c",
140+
],
141+
"//conditions:default": [],
142+
}),
143+
hdrs = EVENT_CORE_PUBLIC_HEADERS,
144+
includes = ["include"],
145+
linkopts = select({
146+
"@platforms//os:windows": [
147+
"advapi32.lib",
148+
"crypt32.lib",
149+
"iphlpapi.lib",
150+
"ws2_32.lib",
151+
],
152+
"//conditions:default": [],
153+
}),
154+
strip_include_prefix = "include",
155+
textual_hdrs = [
156+
# arc4random.c is textually included by evutil_rand.c when
157+
# arc4random() is not available. It is not compiled by itself.
158+
"arc4random.c",
159+
],
160+
visibility = ["//visibility:public"],
161+
deps = [
162+
":event_core_private_headers",
163+
] + select({
164+
"@platforms//os:windows": [
165+
"//compat",
166+
],
167+
"//conditions:default": [],
168+
}),
169+
)
170+
171+
cc_library(
172+
name = "event_extra_private_headers",
173+
hdrs = [
174+
"evrpc-internal.h",
175+
"http-internal.h",
176+
],
177+
visibility = [":__subpackages__"],
178+
)
179+
180+
EVENT_EXTRA_PUBLIC_HEADERS = [
181+
"include/evdns.h",
182+
"include/event2/dns.h",
183+
"include/event2/dns_compat.h",
184+
"include/event2/dns_struct.h",
185+
"include/event2/http.h",
186+
"include/event2/http_compat.h",
187+
"include/event2/http_struct.h",
188+
"include/event2/rpc.h",
189+
"include/event2/rpc_compat.h",
190+
"include/event2/rpc_struct.h",
191+
"include/evhttp.h",
192+
"include/evrpc.h",
193+
]
194+
195+
cc_library(
196+
name = "event_extra",
197+
srcs = [
198+
"evdns.c",
199+
"evrpc.c",
200+
"http.c",
201+
],
202+
hdrs = EVENT_EXTRA_PUBLIC_HEADERS,
203+
includes = ["include"],
204+
linkopts = select({
205+
"@platforms//os:windows": [
206+
"shell32.lib",
207+
],
208+
"//conditions:default": [],
209+
}),
210+
strip_include_prefix = "include",
211+
visibility = ["//visibility:public"],
212+
deps = [
213+
":event_core",
214+
":event_core_private_headers",
215+
":event_extra_private_headers",
216+
] + select({
217+
"@platforms//os:windows": [
218+
"//compat",
219+
],
220+
"//conditions:default": [],
221+
}),
222+
)
223+
224+
cc_library(
225+
name = "event",
226+
hdrs = EVENT_CORE_PUBLIC_HEADERS + EVENT_EXTRA_PUBLIC_HEADERS,
227+
visibility = ["//visibility:public"],
228+
deps = [
229+
":event_core",
230+
":event_extra",
231+
] + select({
232+
"@platforms//os:linux": [":event_pthreads"],
233+
"@platforms//os:macos": [":event_pthreads"],
234+
"//conditions:default": [],
235+
}),
236+
)
237+
238+
cc_library(
239+
name = "event_openssl_private_headers",
240+
hdrs = [
241+
"openssl-compat.h",
242+
],
243+
tags = [
244+
"requires_openssl",
245+
],
246+
visibility = [":__subpackages__"],
247+
deps = [
248+
":event_core",
249+
":event_core_private_headers",
250+
"@openssl//:crypto",
251+
"@openssl//:ssl",
252+
],
253+
)
254+
255+
cc_library(
256+
name = "event_openssl",
257+
srcs = [
258+
"bufferevent_openssl.c",
259+
],
260+
includes = ["include"],
261+
tags = [
262+
"requires_openssl",
263+
],
264+
visibility = ["//visibility:public"],
265+
deps = [
266+
":event_core",
267+
":event_core_private_headers",
268+
":event_openssl_private_headers",
269+
"@openssl//:crypto",
270+
"@openssl//:ssl",
271+
],
272+
)
273+
274+
cc_library(
275+
name = "event_pthreads",
276+
srcs = select({
277+
"@platforms//os:linux": ["evthread_pthread.c"],
278+
"@platforms//os:macos": ["evthread_pthread.c"],
279+
"//conditions:default": [],
280+
}),
281+
includes = ["include"],
282+
linkopts = select({
283+
"@platforms//os:linux": ["-pthread"],
284+
"@platforms//os:macos": ["-pthread"],
285+
"//conditions:default": [],
286+
}),
287+
visibility = ["//visibility:public"],
288+
deps = [
289+
":event_core",
290+
":event_core_private_headers",
291+
],
292+
)
293+
294+
# Default target for easier consumption
295+
alias(
296+
name = "libevent",
297+
actual = ":event",
298+
visibility = ["//visibility:public"],
299+
)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module(
2+
name = "libevent",
3+
version = "2.1.12-stable.bcr.0",
4+
compatibility_level = 1,
5+
)
6+
7+
bazel_dep(name = "openssl", version = "3.3.1.bcr.1")
8+
bazel_dep(name = "platforms", version = "0.0.10")
9+
bazel_dep(name = "rules_cc", version = "0.0.17")
10+
bazel_dep(name = "rules_license", version = "1.0.0")
11+
bazel_dep(name = "zlib", version = "1.3.1.bcr.4")
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
package(
4+
default_visibility = ["//:__subpackages__"],
5+
)
6+
7+
cc_library(
8+
name = "getopt",
9+
srcs = [
10+
"getopt.c",
11+
"getopt_long.c",
12+
],
13+
hdrs = [
14+
"getopt.h",
15+
],
16+
includes = ["."],
17+
target_compatible_with = [
18+
"@platforms//os:windows",
19+
],
20+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
package(
4+
default_visibility = ["//:__subpackages__"],
5+
)
6+
7+
cc_library(
8+
name = "compat",
9+
hdrs = [
10+
"sys/queue.h",
11+
],
12+
includes = ["."],
13+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
2+
#define EVCONFIG_PRIVATE_H_INCLUDED_
3+
4+
#if defined(__linux__)
5+
#include "evconfig-private_linux.h"
6+
#elif defined(__APPLE__)
7+
#include "evconfig-private_apple.h"
8+
#elif defined(_MSC_VER)
9+
// No file needed for MSVC.
10+
#endif
11+
12+
#endif // EVCONFIG_PRIVATE_H_INCLUDED_

0 commit comments

Comments
 (0)