Skip to content

Commit 34ee0bf

Browse files
committed
Add libraqm to build
1 parent a3682f3 commit 34ee0bf

File tree

6 files changed

+24
-1
lines changed

6 files changed

+24
-1
lines changed

extern/meson.build

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ else
2121
freetype_dep = freetype_proj.get_variable('freetype_dep')
2222
endif
2323

24+
if get_option('system-libraqm')
25+
libraqm_dep = dependency('raqm', version: '>=0.7.2')
26+
else
27+
LOCAL_LIBRAQM_VERSION = '0.7.2'
28+
29+
libraqm_proj = subproject(
30+
f'libraqm-@LOCAL_LIBRAQM_VERSION@',
31+
default_options: ['default_library=static'])
32+
libraqm_dep = libraqm_proj.get_variable('libraqm_dep')
33+
endif
34+
2435
if get_option('system-qhull')
2536
qhull_dep = dependency('qhull_r', version: '>=8.0.2', required: false)
2637
if not qhull_dep.found()

meson.options

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# FreeType on AIX.
88
option('system-freetype', type: 'boolean', value: false,
99
description: 'Build against system version of FreeType')
10+
option('system-libraqm', type: 'boolean', value: false,
11+
description: 'Build against system version of libraqm')
1012
option('system-qhull', type: 'boolean', value: false,
1113
description: 'Build against system version of Qhull')
1214

src/ft2font.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ extern "C" {
2222
#include FT_TRUETYPE_TABLES_H
2323
}
2424

25+
#include <raqm.h>
26+
2527
/*
2628
By definition, FT_FIXED as 2 16bit values stored in a single long.
2729
*/

src/ft2font_wrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,5 +1806,6 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
18061806

18071807
m.attr("__freetype_version__") = version_string;
18081808
m.attr("__freetype_build_type__") = FREETYPE_BUILD_TYPE;
1809+
m.attr("__libraqm_version__") = raqm_version_string();
18091810
m.def("__getattr__", ft2font__getattr__);
18101811
}

src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extension_data = {
5353
'ft2font_wrapper.cpp',
5454
),
5555
'dependencies': [
56-
freetype_dep, pybind11_dep, agg_dep.partial_dependency(includes: true),
56+
freetype_dep, libraqm_dep, pybind11_dep, agg_dep.partial_dependency(includes: true),
5757
],
5858
'cpp_args': [
5959
'-DFREETYPE_BUILD_TYPE="@0@"'.format(

subprojects/libraqm-0.7.2.wrap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[wrap-file]
2+
source_url = https://github.com/HOST-Oman/libraqm/archive/v0.7.2/libraqm-0.7.2.tar.gz
3+
source_filename = libraqm-0.7.2.tar.gz
4+
source_hash = eeccbb0bf23ef77d8ff2be24a9c6c1547cc8e443d3d6b57814d73d44758d95c2
5+
6+
[provide]
7+
libraqm-0.7.2 = libraqm_dep

0 commit comments

Comments
 (0)