Skip to content

Commit c9edda7

Browse files
committed
ell: Add new wrap for ell
Upstream repository is at: https://git.kernel.org/pub/scm/libs/ell/ell.git/
1 parent 6584cbe commit c9edda7

12 files changed

Lines changed: 1997 additions & 0 deletions

File tree

ci_config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,18 @@
299299
],
300300
"fatal_warnings": false
301301
},
302+
"ell": {
303+
"alpine_packages": [
304+
"glib-dev",
305+
"openssl",
306+
"xxd"
307+
],
308+
"debian_packages": [
309+
"libglib2.0-dev",
310+
"openssl",
311+
"xxd"
312+
]
313+
},
302314
"enlog": {
303315
"build_options": [
304316
"enlog:color=true",

releases.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,14 @@
877877
"3.3.4-1"
878878
]
879879
},
880+
"ell": {
881+
"dependency_names": [
882+
"ell"
883+
],
884+
"versions": [
885+
"0.82-1"
886+
]
887+
},
880888
"emilk-loguru": {
881889
"dependency_names": [
882890
"loguru"

subprojects/ell.wrap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[wrap-file]
2+
directory = ell-0.82
3+
source_url = https://www.kernel.org/pub/linux/libs/ell/ell-0.82.tar.xz
4+
source_filename = ell-0.82.tar.xz
5+
source_hash = 133a9273151090b4cc37676063cc00ff350a093032ba20a2aaf8b3c5fd6f8b6d
6+
# Maintained in https://github.com/hadess/ell/tree/wip/hadess/add-meson
7+
patch_directory = ell
8+
9+
[provide]
10+
dependency_names = ell

subprojects/packagefiles/ell/LICENSE.build

Lines changed: 504 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
lib_headers = [
2+
'ell.h',
3+
'util.h',
4+
'test.h',
5+
'strv.h',
6+
'utf8.h',
7+
'queue.h',
8+
'hashmap.h',
9+
'string.h',
10+
'settings.h',
11+
'main.h',
12+
'idle.h',
13+
'signal.h',
14+
'timeout.h',
15+
'io.h',
16+
'ringbuf.h',
17+
'log.h',
18+
'checksum.h',
19+
'netlink.h',
20+
'genl.h',
21+
'rtnl.h',
22+
'dbus.h',
23+
'dbus-service.h',
24+
'dbus-client.h',
25+
'hwdb.h',
26+
'cipher.h',
27+
'random.h',
28+
'uintset.h',
29+
'base64.h',
30+
'pem.h',
31+
'tls.h',
32+
'uuid.h',
33+
'key.h',
34+
'file.h',
35+
'dir.h',
36+
'net.h',
37+
'dhcp.h',
38+
'dhcp6.h',
39+
'cert.h',
40+
'ecc.h',
41+
'ecdh.h',
42+
'time.h',
43+
'gpio.h',
44+
'path.h',
45+
'icmp6.h',
46+
'acd.h',
47+
'tester.h',
48+
'cleanup.h',
49+
'netconfig.h',
50+
'sysctl.h',
51+
'minheap.h',
52+
'notifylist.h',
53+
]
54+
55+
lib_sources = [
56+
'private.h',
57+
'useful.h',
58+
'missing.h',
59+
'util.c',
60+
'test-private.h',
61+
'test.c',
62+
'test-dbus.c',
63+
'strv.c',
64+
'utf8.c',
65+
'queue.c',
66+
'hashmap.c',
67+
'string.c',
68+
'settings.c',
69+
'main-private.h',
70+
'main.c',
71+
'idle.c',
72+
'signal.c',
73+
'timeout.c',
74+
'io.c',
75+
'ringbuf.c',
76+
'log.c',
77+
'checksum.c',
78+
'netlink-private.h',
79+
'netlink.c',
80+
'genl.c',
81+
'rtnl-private.h',
82+
'rtnl.c',
83+
'dbus-private.h',
84+
'dbus.c',
85+
'dbus-message.c',
86+
'dbus-util.c',
87+
'dbus-service.c',
88+
'dbus-client.c',
89+
'dbus-name-cache.c',
90+
'dbus-filter.c',
91+
'gvariant-private.h',
92+
'gvariant-util.c',
93+
'siphash-private.h',
94+
'siphash.c',
95+
'hwdb.c',
96+
'cipher.c',
97+
'random.c',
98+
'uintset.c',
99+
'base64.c',
100+
'asn1-private.h',
101+
'pem-private.h',
102+
'pem.c',
103+
'tls-private.h',
104+
'tls.c',
105+
'tls-record.c',
106+
'tls-extensions.c',
107+
'tls-suites.c',
108+
'uuid.c',
109+
'key.c',
110+
'file.c',
111+
'dir.c',
112+
'net-private.h',
113+
'net.c',
114+
'dhcp-private.h',
115+
'dhcp.c',
116+
'dhcp-transport.c',
117+
'dhcp-lease.c',
118+
'dhcp6-private.h',
119+
'dhcp6.c',
120+
'dhcp6-transport.c',
121+
'dhcp6-lease.c',
122+
'dhcp-util.c',
123+
'dhcp-server.c',
124+
'cert-private.h',
125+
'cert.c',
126+
'cert-crypto.c',
127+
'ecc-private.h',
128+
'ecc.h',
129+
'ecc-external.c',
130+
'ecc.c',
131+
'ecdh.c',
132+
'time.c',
133+
'time-private.h',
134+
'gpio.c',
135+
'path.c',
136+
'icmp6.c',
137+
'icmp6-private.h',
138+
'acd.c',
139+
'tester.c',
140+
'netconfig.c',
141+
'sysctl.c',
142+
'minheap.c',
143+
'notifylist.c',
144+
]
145+
146+
linux_headers = ['../linux/gpio.h']
147+
148+
libell = library(
149+
'ell',
150+
sources: lib_headers + lib_sources + linux_headers,
151+
include_directories: include_directories('..'),
152+
implicit_include_directories: false,
153+
gnu_symbol_visibility: 'hidden',
154+
version: '0.2.0',
155+
install: get_option('default_library') != 'static',
156+
)
157+
158+
libell_dep = declare_dependency(
159+
include_directories: include_directories('..'),
160+
link_with: libell,
161+
)
162+
163+
meson.override_dependency('ell', libell_dep)
164+
165+
if get_option('default_library') != 'static'
166+
install_headers(
167+
lib_headers,
168+
subdir: 'ell',
169+
)
170+
171+
pkgconfig = import('pkgconfig')
172+
pkgconfig.generate(
173+
name: 'ell',
174+
description: 'Embedded Linux library',
175+
version: meson.project_version(),
176+
libraries: libell,
177+
# FIXME requires meson 1.9.0
178+
# license: meson.project_license()
179+
)
180+
endif
181+
182+
libell_private = static_library(
183+
'ell_private',
184+
sources: lib_headers + lib_sources + linux_headers,
185+
include_directories: include_directories('..'),
186+
implicit_include_directories: false,
187+
install: false,
188+
)
189+
190+
libell_private_dep = declare_dependency(
191+
link_with: libell_private,
192+
)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
examples = [
2+
'dbus-service',
3+
'https-client-test',
4+
'https-server-test',
5+
'dbus-client',
6+
'dhcp-client',
7+
'dhcp6-client',
8+
'dhcp-server',
9+
'acd-client',
10+
'netconfig-test',
11+
]
12+
13+
if get_option('examples')
14+
foreach example : examples
15+
exe = executable(
16+
example,
17+
'@0@.c'.format(example),
18+
include_directories: include_directories('..'),
19+
dependencies: libell_private_dep,
20+
install: false,
21+
)
22+
endforeach
23+
endif
24+
25+
if get_option('glib') and get_option('examples')
26+
exe = executable(
27+
'glib-eventloop',
28+
'glib-eventloop.c',
29+
include_directories: include_directories('..'),
30+
dependencies: [libell_private_dep, glib_dep],
31+
install: false,
32+
)
33+
endif
34+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# SPDX-License-Identifier: LGPL-2.1-or-later
2+
project(
3+
'ell',
4+
'c',
5+
version: '0.82',
6+
license: 'LGPL-2.1-or-later',
7+
default_options: ['default_library=shared'],
8+
meson_version: '>= 1.3.0',
9+
)
10+
11+
cc = meson.get_compiler('c')
12+
find_program(
13+
'awk',
14+
required: true,
15+
)
16+
config_h = configuration_data()
17+
18+
checked_funcs = ['explicit_bzero', 'rawmemchr']
19+
20+
foreach func : checked_funcs
21+
config_h.set('HAVE_' + func.to_upper(), cc.has_function(func))
22+
endforeach
23+
24+
required_funcs = ['getrandom', 'signalfd', 'timerfd_create', 'epoll_create']
25+
26+
foreach func : required_funcs
27+
cc.has_function(
28+
func,
29+
required: true,
30+
)
31+
endforeach
32+
33+
required_headers = ['linux/types.h', 'linux/if_alg.h']
34+
35+
foreach header : required_headers
36+
cc.has_header(
37+
header,
38+
required: true,
39+
)
40+
endforeach
41+
42+
glib_dep = dependency(
43+
'glib-2.0',
44+
version: '>= 2.32',
45+
required: get_option('glib'),
46+
)
47+
openssl = find_program(
48+
'openssl',
49+
required: get_option('cert-tests'),
50+
)
51+
sh = find_program(
52+
'sh',
53+
required: get_option('cert-tests'),
54+
)
55+
xxd = find_program(
56+
'xxd',
57+
required: get_option('cert-tests'),
58+
)
59+
60+
if openssl.found()
61+
r = run_command(
62+
openssl,
63+
'list',
64+
'-providers',
65+
check: false,
66+
)
67+
if r.returncode() == 0
68+
openssl_legacy = ['-provider', 'legacy', '-provider', 'default']
69+
else
70+
openssl_legacy = ''
71+
endif
72+
endif
73+
74+
add_project_arguments(
75+
'-DHAVE_CONFIG_H',
76+
language: 'c',
77+
)
78+
configure_file(
79+
output: 'config.h',
80+
configuration: config_h,
81+
)
82+
83+
subdir('ell')
84+
subdir('tools')
85+
subdir('unit')
86+
subdir('examples')
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
option(
2+
'glib',
3+
type: 'boolean',
4+
value: true,
5+
description: 'Enable ell/glib main loop example',
6+
)
7+
option(
8+
'tests',
9+
type: 'boolean',
10+
value: true,
11+
description: 'Enable unit tests compilation',
12+
)
13+
option(
14+
'cert-tests',
15+
type: 'boolean',
16+
value: true,
17+
description: 'Enable OpenSSL cert tests',
18+
)
19+
option(
20+
'tools',
21+
type: 'boolean',
22+
value: true,
23+
description: 'Enable extra tools compilation',
24+
)
25+
option(
26+
'examples',
27+
type: 'boolean',
28+
value: true,
29+
description: 'Enable code examples compilation',
30+
)

0 commit comments

Comments
 (0)