Skip to content

Commit bba48ea

Browse files
meson: add basic meson
Since we don't have a CI for standard Make repositories anymore, this repository has no CI. Begin a simple meson conversion to enable some CI for the bare minimum aspects of the repository still being used in openbmc/openbmc. - libopenbmc_intf - op-pwrctl - pgood_wait - op-hostctl Signed-off-by: Patrick Williams <[email protected]> Change-Id: I598e91c08b5ad607b68c18bfa9a870603df19397
1 parent 783fbb0 commit bba48ea

File tree

7 files changed

+93
-0
lines changed

7 files changed

+93
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/build*/
2+
/subprojects/*
3+
!/subprojects/*.wrap
4+
15
*.exe
26
*.o
37
*.so

libopenbmc_intf/meson.build

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
gnome = import('gnome')
2+
3+
openbmc_intf_src = gnome.gdbus_codegen(
4+
'openbmc_intf',
5+
sources: 'openbmc_intf.xml',
6+
interface_prefix: 'org.openbmc',
7+
object_manager: true,
8+
)
9+
10+
libopenbmc_intf = library(
11+
'libopenbmc_intf',
12+
'gpio.c',
13+
'gpio_configs.c',
14+
'gpio_json.c',
15+
openbmc_intf_src,
16+
# The gdbus generated code cannot be compiled with -Wpedantic.
17+
c_args : '-Wno-pedantic',
18+
dependencies: [cjson_dep, gio_unix_dep, glib_dep],
19+
version: meson.project_version(),
20+
install: true,
21+
)
22+
23+
libopenbmc_intf_includes = include_directories('.')
24+
25+
import('pkgconfig').generate(
26+
libopenbmc_intf,
27+
name: 'libopenbmc_intf',
28+
version: meson.project_version(),
29+
requires: [gio_unix_dep, glib_dep],
30+
description: '[deprecated] OpenBMC interface library from skeleton',
31+
)

meson.build

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
project(
2+
'skeleton',
3+
'c',
4+
version: '1.0',
5+
default_options: [
6+
'buildtype=debugoptimized',
7+
'warning_level=2',
8+
'werror=true',
9+
],
10+
)
11+
12+
cjson_dep = dependency('libcjson', fallback: 'cjson')
13+
gio_unix_dep = dependency('gio-unix-2.0')
14+
glib_dep = dependency('glib-2.0')
15+
libsystemd_dep = dependency('libsystemd')
16+
17+
subdir('libopenbmc_intf')
18+
19+
subdir('op-pwrctl')
20+
subdir('op-hostctl')

op-hostctl/meson.build

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
executable(
2+
'control_host.exe',
3+
'control_host_obj.c',
4+
include_directories: libopenbmc_intf_includes,
5+
link_with: libopenbmc_intf,
6+
dependencies: [gio_unix_dep, glib_dep],
7+
install: true,
8+
)

op-pwrctl/meson.build

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
executable(
2+
'power_control.exe',
3+
'power_control_obj.c',
4+
include_directories: libopenbmc_intf_includes,
5+
link_with: libopenbmc_intf,
6+
dependencies: [gio_unix_dep, glib_dep],
7+
install: true,
8+
)
9+
10+
subdir('pgood_wait')

op-pwrctl/pgood_wait/meson.build

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
executable(
2+
'pgood_wait',
3+
'pgood_wait.c',
4+
dependencies: [libsystemd_dep],
5+
install: true,
6+
)

subprojects/cjson.wrap

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[wrap-file]
2+
directory = cJSON-1.7.18
3+
source_url = https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.18.tar.gz
4+
source_filename = v1.7.18.tar.gz
5+
source_hash = 3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5
6+
patch_filename = cjson_1.7.18-1_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/cjson_1.7.18-1/get_patch
8+
patch_hash = a1068a4cc0b49f8bcbb6a841e7105f15a9a80a05449b842407561cf9f21e5101
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/cjson_1.7.18-1/v1.7.18.tar.gz
10+
wrapdb_version = 1.7.18-1
11+
12+
[provide]
13+
libcjson = libcjson_dep
14+
libcjson_utils = libcjson_utils_dep

0 commit comments

Comments
 (0)