Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b42f51

Browse filesBrowse files
committed
Add libraqm and its depenencies to build
1 parent 794bfea commit 2b42f51
Copy full SHA for 2b42f51

11 files changed

+114
-1
lines changed

‎extern/meson.build

Copy file name to clipboardExpand all lines: extern/meson.build
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,29 @@ else
3030
freetype_dep = freetype_proj.get_variable('freetype_dep')
3131
endif
3232

33+
if get_option('system-libraqm')
34+
libraqm_dep = dependency('raqm', version: '>=0.10.2')
35+
else
36+
LOCAL_LIBRAQM_VERSION = '0.10.2'
37+
38+
subproject('harfbuzz',
39+
default_options: [
40+
'default_library=static',
41+
'freetype=enabled',
42+
'glib=disabled',
43+
'gobject=disabled',
44+
'cairo=disabled',
45+
'icu=disabled',
46+
'tests=disabled',
47+
]
48+
)
49+
subproject('sheenbidi', default_options: ['default_library=static'])
50+
libraqm_proj = subproject(
51+
f'libraqm-@LOCAL_LIBRAQM_VERSION@',
52+
default_options: ['default_library=static', 'sheenbidi=true'])
53+
libraqm_dep = libraqm_proj.get_variable('libraqm_dep')
54+
endif
55+
3356
if get_option('system-qhull')
3457
qhull_dep = dependency('qhull_r', version: '>=8.0.2', required: false)
3558
if not qhull_dep.found()

‎lib/matplotlib/ft2font.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/ft2font.pyi
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ from numpy.typing import NDArray
88

99
__freetype_build_type__: str
1010
__freetype_version__: str
11+
__libraqm_version__: str
1112

1213
class FaceFlags(Flag):
1314
SCALABLE = cast(int, ...)

‎meson.options

Copy file name to clipboardExpand all lines: meson.options
+2Lines 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

Copy file name to clipboardExpand all lines: src/ft2font.h
+2Lines 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

Copy file name to clipboardExpand all lines: src/ft2font_wrapper.cpp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,5 +1765,6 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
17651765

17661766
m.attr("__freetype_version__") = version_string;
17671767
m.attr("__freetype_build_type__") = FREETYPE_BUILD_TYPE;
1768+
m.attr("__libraqm_version__") = raqm_version_string();
17681769
m.def("__getattr__", ft2font__getattr__);
17691770
}

‎src/meson.build

Copy file name to clipboardExpand all lines: src/meson.build
+1-1Lines 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/harfbuzz.wrap

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[wrap-file]
2+
directory = harfbuzz-11.2.0
3+
source_url = https://github.com/harfbuzz/harfbuzz/releases/download/11.2.0/harfbuzz-11.2.0.tar.xz
4+
source_filename = harfbuzz-11.2.0.tar.xz
5+
source_hash = 50f7d0a208367e606dbf6eecc5cfbecc01a47be6ee837ae7aff2787e24b09b45
6+
7+
# This patch allows using our bundled FreeType.
8+
diff_files = harfbuzz-11.2.0-bundle-freetype.patch

‎subprojects/libraqm-0.10.2.wrap

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[wrap-file]
2+
source_url = https://github.com/HOST-Oman/libraqm/archive/v0.10.2/libraqm-0.10.2.tar.gz
3+
source_filename = libraqm-0.10.2.tar.gz
4+
source_hash = db68fd9f034fc40ece103e511ffdf941d69f5e935c48ded8a31590468e42ba72
5+
6+
# This patch allows using our bundled FreeType.
7+
diff_files = libraqm-0.10.2-bundle-freetype.patch
8+
9+
[provide]
10+
libraqm-0.10.2 = libraqm_dep
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff -uPNr harfbuzz-11.2.0.orig/meson.build harfbuzz-11.2.0/meson.build
2+
--- harfbuzz-11.2.0.orig/meson.build 2025-04-28 08:56:32.000000000 -0400
3+
+++ harfbuzz-11.2.0/meson.build 2025-05-03 03:25:39.602646412 -0400
4+
@@ -115,31 +115,7 @@
5+
# Sadly, FreeType's versioning schemes are different between pkg-config and CMake
6+
7+
# Try pkg-config name
8+
- freetype_dep = dependency('freetype2',
9+
- version: freetype_min_version,
10+
- method: 'pkg-config',
11+
- required: false,
12+
- allow_fallback: false)
13+
- if not freetype_dep.found()
14+
- # Try cmake name
15+
- freetype_dep = dependency('Freetype',
16+
- version: freetype_min_version_actual,
17+
- method: 'cmake',
18+
- required: false,
19+
- allow_fallback: false)
20+
- # Subproject fallback
21+
- if not freetype_dep.found()
22+
- freetype_proj = subproject('freetype2',
23+
- version: freetype_min_version_actual,
24+
- required: get_option('freetype'),
25+
- default_options: ['harfbuzz=disabled'])
26+
- if freetype_proj.found()
27+
- freetype_dep = freetype_proj.get_variable('freetype_dep')
28+
- else
29+
- freetype_dep = dependency('', required: false)
30+
- endif
31+
- endif
32+
- endif
33+
+ freetype_dep = dependency('freetype2', version: freetype_min_version)
34+
endif
35+
36+
glib_dep = dependency('glib-2.0', version: glib_min_version, required: get_option('glib'))
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--- a/meson.build 2025-03-26 03:32:12.444735795 -0400
2+
+++ b/meson.build 2025-03-26 03:32:16.117435140 -0400
3+
@@ -45,8 +45,7 @@
4+
if not freetype.found()
5+
freetype = dependency(
6+
'freetype2',
7+
version: '>= @0@'.format(freetype_version[0]),
8+
- method: 'pkg-config',
9+
fallback: ['freetype2', 'freetype_dep'],
10+
default_options: [
11+
'png=disabled',
12+
--- a/src/meson.build 2025-03-26 03:59:08.651929905 -0400
13+
+++ b/src/meson.build 2025-03-26 04:00:09.537615893 -0400
14+
@@ -42,6 +42,11 @@
15+
install: true,
16+
)
17+
18+
+libraqm_dep = declare_dependency(
19+
+ include_directories: include_directories('.'),
20+
+ link_with: libraqm,
21+
+)
22+
+
23+
libraqm_test = static_library(
24+
'raqm-test',
25+
'raqm.c',

‎subprojects/sheenbidi.wrap

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[wrap-file]
2+
directory = SheenBidi-2.8
3+
source_url = https://github.com/Tehreer/SheenBidi/archive/refs/tags/v2.8/sheenbidi-2.8.tar.gz
4+
source_filename = sheenbidi-2.8.tar.gz
5+
source_hash = 6f27d5f347447f593bde573e4cb477925f7ed96afa4f936e7852803e1ddf3fea

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.