Skip to content

Commit 54debe5

Browse files
committed
Add harfbuzz Rust bridge, simple tests
1 parent 3b602be commit 54debe5

8 files changed

Lines changed: 2071 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/bridge_harfbuzz/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,24 @@ links = "harfbuzz"
2222
exclude = ["/harfbuzz/docs/", "/harfbuzz/perf/", "/harfbuzz/test/"]
2323

2424
[dependencies]
25+
tectonic_bridge_freetype2 = { path = "../bridge_freetype2", version = "0.0.0-dev.0" }
2526
tectonic_bridge_graphite2 = { path = "../bridge_graphite2", version = "0.0.0-dev.0" }
27+
libc = "0.2"
2628

2729
[build-dependencies]
2830
cc = "^1.0.66"
2931
tectonic_dep_support = { path = "../dep_support", version = "0.0.0-dev.0" }
3032
tectonic_cfg_support = { path = "../cfg_support", version = "0.0.0-dev.0" }
3133

34+
[target.'cfg(target_os = "macos")'.dependencies]
35+
tectonic_mac_core = { path = "../mac_core", version = "0.0.0-dev.0" }
36+
3237
[features]
3338
external-harfbuzz = []
3439

3540
[package.metadata.internal_dep_versions]
41+
tectonic_bridge_freetype2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
3642
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
43+
tectonic_mac_core = "6932d5f15fec0fb5c219b887bdd11b72641af07a"
3744
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"
3845
tectonic_cfg_support = "thiscommit:aeRoo7oa"

crates/bridge_harfbuzz/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ mod inner {
9393
}
9494

9595
// Include paths exported by our internal dependencies:
96+
let freetype2_include_path = env::var("DEP_FREETYPE2_INCLUDE_PATH").unwrap();
9697
let graphite2_include_path = env::var("DEP_GRAPHITE2_INCLUDE_PATH").unwrap();
9798
let graphite2_static = !env::var("DEP_GRAPHITE2_DEFINE_STATIC").unwrap().is_empty();
9899

@@ -104,6 +105,10 @@ mod inner {
104105
.define("HAVE_GRAPHITE2", "1")
105106
.file("harfbuzz/src/harfbuzz.cc");
106107

108+
for item in freetype2_include_path.split(';') {
109+
cfg.include(item);
110+
}
111+
107112
for item in graphite2_include_path.split(';') {
108113
cfg.include(item);
109114
}
@@ -138,6 +143,10 @@ mod inner {
138143
include_dir.to_str().expect("non-string-friendly OUT_DIR")
139144
);
140145

146+
for item in freetype2_include_path.split(';') {
147+
print!(";{item}");
148+
}
149+
141150
for item in graphite2_include_path.split(';') {
142151
print!(";{item}");
143152
}

0 commit comments

Comments
 (0)