Skip to content

Commit c9a435a

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

File tree

19 files changed

+2473
-0
lines changed

19 files changed

+2473
-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: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
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/evutil.h",
103+
]
104+
105+
cc_library(
106+
name = "event_core",
107+
srcs = [
108+
"buffer.c",
109+
"bufferevent.c",
110+
"bufferevent_filter.c",
111+
"bufferevent_pair.c",
112+
"bufferevent_ratelim.c",
113+
"bufferevent_sock.c",
114+
"devpoll.c",
115+
"epoll.c",
116+
"event.c",
117+
"event_tagging.c",
118+
"evmap.c",
119+
"evport.c",
120+
"evthread.c",
121+
"evutil.c",
122+
"evutil_rand.c",
123+
"evutil_time.c",
124+
"kqueue.c",
125+
"listener.c",
126+
"log.c",
127+
"poll.c",
128+
"select.c",
129+
"signal.c",
130+
"strlcpy.c",
131+
] + select({
132+
"@platforms//os:windows": [
133+
"buffer_iocp.c",
134+
"bufferevent_async.c",
135+
"event_iocp.c",
136+
"evthread_win32.c",
137+
"win32select.c",
138+
],
139+
"//conditions:default": [],
140+
}),
141+
hdrs = EVENT_CORE_PUBLIC_HEADERS,
142+
includes = ["include"],
143+
linkopts = select({
144+
"@platforms//os:windows": [
145+
"advapi32.lib",
146+
"crypt32.lib",
147+
"iphlpapi.lib",
148+
"ws2_32.lib",
149+
],
150+
"//conditions:default": [],
151+
}),
152+
strip_include_prefix = "include",
153+
textual_hdrs = [
154+
# arc4random.c is textually included by evutil_rand.c when
155+
# arc4random() is not available. It is not compiled by itself.
156+
"arc4random.c",
157+
],
158+
visibility = ["//visibility:public"],
159+
deps = [
160+
":event_core_private_headers",
161+
] + select({
162+
"@platforms//os:windows": [
163+
"//compat",
164+
],
165+
"//conditions:default": [],
166+
}),
167+
)
168+
169+
cc_library(
170+
name = "event_extra_private_headers",
171+
hdrs = [
172+
"evrpc-internal.h",
173+
"http-internal.h",
174+
],
175+
visibility = [":__subpackages__"],
176+
)
177+
178+
EVENT_EXTRA_PUBLIC_HEADERS = [
179+
"include/evdns.h",
180+
"include/event2/dns.h",
181+
"include/event2/dns_compat.h",
182+
"include/event2/dns_struct.h",
183+
"include/event2/http.h",
184+
"include/event2/http_compat.h",
185+
"include/event2/http_struct.h",
186+
"include/event2/rpc.h",
187+
"include/event2/rpc_compat.h",
188+
"include/event2/rpc_struct.h",
189+
"include/evhttp.h",
190+
"include/evrpc.h",
191+
]
192+
193+
cc_library(
194+
name = "event_extra",
195+
srcs = [
196+
"evdns.c",
197+
"evrpc.c",
198+
"http.c",
199+
],
200+
hdrs = EVENT_EXTRA_PUBLIC_HEADERS,
201+
includes = ["include"],
202+
linkopts = select({
203+
"@platforms//os:windows": [
204+
"shell32.lib",
205+
],
206+
"//conditions:default": [],
207+
}),
208+
strip_include_prefix = "include",
209+
visibility = ["//visibility:public"],
210+
deps = [
211+
":event_core",
212+
":event_core_private_headers",
213+
":event_extra_private_headers",
214+
] + select({
215+
"@platforms//os:windows": [
216+
"//compat",
217+
],
218+
"//conditions:default": [],
219+
}),
220+
)
221+
222+
cc_library(
223+
name = "event",
224+
hdrs = EVENT_CORE_PUBLIC_HEADERS + EVENT_EXTRA_PUBLIC_HEADERS,
225+
visibility = ["//visibility:public"],
226+
deps = [
227+
":event_core",
228+
":event_extra",
229+
],
230+
)
231+
232+
cc_library(
233+
name = "event_openssl_private_headers",
234+
hdrs = [
235+
"openssl-compat.h",
236+
],
237+
tags = [
238+
"requires_openssl",
239+
],
240+
visibility = [":__subpackages__"],
241+
deps = [
242+
":event_core",
243+
":event_core_private_headers",
244+
"@openssl//:crypto",
245+
"@openssl//:ssl",
246+
],
247+
)
248+
249+
cc_library(
250+
name = "event_openssl",
251+
srcs = [
252+
"bufferevent_openssl.c",
253+
],
254+
includes = ["include"],
255+
tags = [
256+
"requires_openssl",
257+
],
258+
visibility = ["//visibility:public"],
259+
deps = [
260+
":event_core",
261+
":event_core_private_headers",
262+
":event_openssl_private_headers",
263+
"@openssl//:crypto",
264+
"@openssl//:ssl",
265+
],
266+
)
267+
268+
cc_library(
269+
name = "event_pthreads",
270+
srcs = select({
271+
"@platforms//os:linux": ["evthread_pthread.c"],
272+
"@platforms//os:macos": ["evthread_pthread.c"],
273+
"//conditions:default": [],
274+
}),
275+
includes = ["include"],
276+
linkopts = select({
277+
"@platforms//os:linux": ["-pthread"],
278+
"@platforms//os:macos": ["-pthread"],
279+
"//conditions:default": [],
280+
}),
281+
visibility = ["//visibility:public"],
282+
deps = [
283+
":event_core",
284+
":event_core_private_headers",
285+
],
286+
)
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_
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#ifndef EVCONFIG_PRIVATE_APPLE_H_INCLUDED_
2+
#define EVCONFIG_PRIVATE_APPLE_H_INCLUDED_
3+
4+
/* Enable extensions on AIX 3, Interix. */
5+
/* #undef _ALL_SOURCE */
6+
7+
/* Enable GNU extensions on systems that have them. */
8+
/* #undef _GNU_SOURCE */
9+
10+
/* Enable threading extensions on Solaris. */
11+
/* #undef _POSIX_PTHREAD_SEMANTICS */
12+
13+
/* Enable extensions on HP NonStop. */
14+
/* #undef _TANDEM_SOURCE */
15+
16+
/* Enable general extensions on Solaris. */
17+
/* #undef __EXTENSIONS__ */
18+
19+
/* Number of bits in a file offset, on hosts where this is settable. */
20+
/* #undef _FILE_OFFSET_BITS */
21+
/* Define for large files, on AIX-style hosts. */
22+
/* #undef _LARGE_FILES */
23+
24+
/* Define to 1 if on MINIX. */
25+
/* #undef _MINIX */
26+
27+
/* Define to 2 if the system does not provide POSIX.1 features except with
28+
this defined. */
29+
/* #undef _POSIX_1_SOURCE */
30+
31+
/* Define to 1 if you need to in order for `stat' and other things to work. */
32+
/* #undef _POSIX_SOURCE */
33+
34+
/* Enable POSIX.2 extensions on QNX for getopt */
35+
#ifdef __QNX__
36+
/* #undef __EXT_POSIX2 */
37+
#endif
38+
39+
#endif // EVCONFIG_PRIVATE_APPLE_H_INCLUDED_

0 commit comments

Comments
 (0)