Skip to content

Commit d2dbbc6

Browse files
authored
feat: Add support for livechart-2 (#352)
1 parent 1d3e227 commit d2dbbc6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ You'll need the following dependencies to build:
5858
* libgtk-4-dev (>= 4.10)
5959
* [libryokucha](https://github.com/ryonakano/ryokucha)
6060
* [livechart](https://github.com/lcallarec/live-chart) (>= 1.10.0)
61+
* alternatively, [livechart-2 (the elementary fork)](https://github.com/elementary/live-chart) (>= 2.0.0)
6162
* meson (>= 0.58.0)
6263
* valac
6364

src/meson.build

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ config_file = configure_file(
1111
configuration: config_data
1212
)
1313

14+
# Check for the elementary fork first
15+
livechart_dep = dependency('livechart-2', version: '>= 2.0.0', required: false)
16+
if not livechart_dep.found()
17+
# Check for the upstream next
18+
# Fallback to the upstream submodule finally even if it not found
19+
livechart_dep = dependency('livechart', version: '>= 1.10.0', allow_fallback: get_option('use_submodule'))
20+
endif
21+
1422
granite_dep = dependency('granite-7', version: '>= 7.2.0', required: get_option('granite'))
1523
if granite_dep.found()
1624
add_project_arguments('--define=USE_GRANITE', language: 'vala')
@@ -23,7 +31,7 @@ dependencies = [
2331
dependency('gstreamer-1.0', version: '>= 1.20'),
2432
dependency('gtk4', version: '>= 4.10'),
2533
dependency('libadwaita-1'),
26-
dependency('livechart', version: '>= 1.10.0', allow_fallback: get_option('use_submodule')),
34+
livechart_dep,
2735
dependency('pango'),
2836
dependency('ryokucha', allow_fallback: get_option('use_submodule')),
2937
]

0 commit comments

Comments
 (0)