Skip to content

Commit 41168a9

Browse files
authored
Merge pull request #1092 from pkgw/openssl3
Update CI builds to Ubuntu 22.04 / OpenSSL 3
2 parents 730d730 + 9a365a5 commit 41168a9

14 files changed

Lines changed: 75 additions & 70 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,28 +138,31 @@ overlay-triplets-path = "dist/vcpkg-triplets"
138138
# add them to crates/dep_support/src/lib.rs:new_from_vcpkg() to give users
139139
# guidance if they might need to set $VCPKGRS_TRIPLET.
140140
[package.metadata.vcpkg.target]
141-
x86_64-apple-darwin = { install = ["freetype", "harfbuzz[icu,graphite2]"] }
141+
x86_64-apple-darwin = { install = ["freetype", "harfbuzz[graphite2]", "icu"] }
142142
aarch64-apple-darwin = { triplet = "arm64-osx", install = [
143143
"freetype",
144-
"harfbuzz[icu,graphite2]",
144+
"harfbuzz[graphite2]",
145+
"icu",
145146
] }
146147
x86_64-unknown-linux-gnu = { install = [
147148
"fontconfig",
148149
"freetype",
149-
"harfbuzz[icu,graphite2]",
150+
"harfbuzz[graphite2]",
151+
"icu",
150152
] }
151153
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = [
152154
"fontconfig",
153155
"freetype",
154-
"harfbuzz[icu,graphite2]",
156+
"harfbuzz[graphite2]",
157+
"icu",
155158
] }
156159

157160
[package.metadata.internal_dep_versions]
158161
tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
159162
tectonic_bridge_flate = "thiscommit:2021-01-01:eer4ahL4"
160163
tectonic_bridge_graphite2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
161-
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
162-
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
164+
tectonic_bridge_harfbuzz = "thiscommit:2023-09-17:FZwRtUP"
165+
tectonic_bridge_icu = "thiscommit:2023-09-17:AwTXf3W"
163166
tectonic_bundles = "thiscommit:2022-03-29:SFnXSaL"
164167
tectonic_cfg_support = "thiscommit:aeRoo7oa"
165168
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"

crates/bridge_harfbuzz/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright 2020-2021 the Tectonic Project
1+
# Copyright 2020-2023 the Tectonic Project
22
# Licensed under the MIT License.
33

44
# See README.md for discussion of features (or lack thereof) in this crate.
55

66
[package]
77
name = "tectonic_bridge_harfbuzz"
8-
version = "0.0.0-dev.0" # assigned with cranko (see README)
8+
version = "0.0.0-dev.0" # assigned with cranko (see README)
99
authors = ["Peter Williams <peter@newton.cx>"]
1010
description = """
1111
Expose the Harfbuzz C/C++ APIs to Rust/Cargo.
@@ -21,7 +21,6 @@ exclude = ["/harfbuzz/docs/", "/harfbuzz/perf/", "/harfbuzz/test/"]
2121

2222
[dependencies]
2323
tectonic_bridge_graphite2 = { path = "../bridge_graphite2", version = "0.0.0-dev.0" }
24-
tectonic_bridge_icu = { path = "../bridge_icu", version = "0.0.0-dev.0" }
2524

2625
[build-dependencies]
2726
cc = "^1.0.66"
@@ -32,5 +31,4 @@ external-harfbuzz = []
3231

3332
[package.metadata.internal_dep_versions]
3433
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
35-
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
3634
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"

crates/bridge_harfbuzz/build.rs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 the Tectonic Project
1+
// Copyright 2020-2023 the Tectonic Project
22
// Licensed under the MIT License.
33

44
//! Harfbuzz build script.
@@ -7,15 +7,23 @@
77
mod inner {
88
use tectonic_dep_support::{Configuration, Dependency, Spec};
99

10-
// TODO: ICU not necessary if Harfbuzz >= 2.5.
1110
struct HarfbuzzSpec;
1211

1312
impl Spec for HarfbuzzSpec {
13+
// We require Harfbuzz >= 1.4, but that version is ancient, and
14+
// specifying the version constraint in this string causes problems with
15+
// the `pkgconf` implementation of pkg-config on Windows/MSYS2.
16+
// (Specifically, its `--modversion` mode won't print anything out when
17+
// given two arguments, causing an unhandled crash inside the pkg_config
18+
// Rust library.) Likewise, for Harfbuzz < 2.5, the `harfbuzz-icu`
19+
// pkg-config item is needed, but this may also cause problems for
20+
// pkgconf. If you really need to compile against very old Harfbuzz,
21+
// patch this file and don't use pkgconf.
1422
fn get_pkgconfig_spec(&self) -> &str {
15-
"harfbuzz >= 1.4 harfbuzz-icu"
23+
"harfbuzz"
1624
}
1725

18-
// TODO: can we ensure that the ICU and graphite2 options are enabled?
26+
// TODO: can we ensure that the graphite2 option is enabled?
1927
fn get_vcpkg_spec(&self) -> &[&str] {
2028
&["harfbuzz"]
2129
}
@@ -75,26 +83,19 @@ mod inner {
7583
// Include paths exported by our internal dependencies:
7684
let graphite2_include_path = env::var("DEP_GRAPHITE2_INCLUDE_PATH").unwrap();
7785
let graphite2_static = !env::var("DEP_GRAPHITE2_DEFINE_STATIC").unwrap().is_empty();
78-
let icu_include_path = env::var("DEP_ICUUC_INCLUDE_PATH").unwrap();
7986

8087
let mut cfg = cc::Build::new();
8188

8289
cfg.cpp(true)
8390
.flag("-std=c++11")
8491
.warnings(false)
8592
.define("HAVE_GRAPHITE2", "1")
86-
.define("HAVE_ICU", "1")
87-
.file("harfbuzz/src/harfbuzz.cc")
88-
.file("harfbuzz/src/hb-icu.cc");
93+
.file("harfbuzz/src/harfbuzz.cc");
8994

9095
for item in graphite2_include_path.split(';') {
9196
cfg.include(item);
9297
}
9398

94-
for item in icu_include_path.split(';') {
95-
cfg.include(item);
96-
}
97-
9899
if graphite2_static {
99100
cfg.define("GRAPHITE2_STATIC", "1");
100101
}
@@ -129,10 +130,6 @@ mod inner {
129130
print!(";{}", item);
130131
}
131132

132-
for item in icu_include_path.split(';') {
133-
print!(";{}", item);
134-
}
135-
136133
println!();
137134

138135
let dest_dir = include_dir.join("harfbuzz");

crates/bridge_harfbuzz/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 the Tectonic Project
1+
// Copyright 2020-2023 the Tectonic Project
22
// Licensed under the MIT License.
33

44
//! No Rust code. This crate exists to export the Harfbuzz *C/C++* API into the
@@ -9,7 +9,4 @@
99
mod linkage {
1010
#[allow(unused_imports)]
1111
use tectonic_bridge_graphite2 as clippyrenamehack1;
12-
13-
#[allow(unused_imports)]
14-
use tectonic_bridge_icu as clippyrenamehack2;
1512
}

crates/bridge_icu/build.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! this crate is needed. Vendoring the ICU library is almost certainly not
88
//! something that one should do.
99
10-
use tectonic_dep_support::{Configuration, Dependency, Spec};
10+
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};
1111

1212
struct IcuSpec;
1313

@@ -22,6 +22,7 @@ impl Spec for IcuSpec {
2222
}
2323

2424
fn main() {
25+
let target = std::env::var("TARGET").unwrap();
2526
let cfg = Configuration::default();
2627
let dep = Dependency::probe(IcuSpec, &cfg);
2728

@@ -39,4 +40,14 @@ fn main() {
3940
println!();
4041

4142
dep.emit();
43+
44+
// vcpkg-rs is not guaranteed to emit libraries in the order required by a
45+
// single-pass linker, so we might need to make sure that's done right.
46+
47+
if cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
48+
// add icudata to the end of the list of libs as vcpkg-rs
49+
// does not order individual libraries as a single pass
50+
// linker requires.
51+
println!("cargo:rustc-link-lib=icudata");
52+
}
4253
}

crates/xetex_layout/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[package]
77
name = "tectonic_xetex_layout"
8-
version = "0.0.0-dev.0" # assigned with cranko (see README)
8+
version = "0.0.0-dev.0" # assigned with cranko (see README)
99
authors = ["Peter Williams <peter@newton.cx>"]
1010
description = """
1111
XeTeX's font loading and layout interface encapsulation, as a crate.
@@ -38,6 +38,6 @@ tectonic_bridge_core = "thiscommit:2021-01-16:wie2Ejoh"
3838
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
3939
tectonic_bridge_freetype2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
4040
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
41-
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
41+
tectonic_bridge_icu = "thiscommit:2023-09-17:6uIZ4lA"
4242
tectonic_cfg_support = "thiscommit:aeRoo7oa"
4343
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"

crates/xetex_layout/build.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{
1313
path::{Path, PathBuf},
1414
};
1515
use tectonic_cfg_support::target_cfg;
16-
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};
16+
use tectonic_dep_support::{Configuration, Dependency, Spec};
1717

1818
struct FontconfigSpec;
1919

@@ -188,16 +188,6 @@ fn main() {
188188

189189
deps.emit();
190190

191-
// vcpkg-rs is not guaranteed to emit libraries in the order required by a
192-
// single-pass linker, so we might need to make sure that's done right.
193-
194-
if dep_cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
195-
// add icudata to the end of the list of libs as vcpkg-rs
196-
// does not order individual libraries as a single pass
197-
// linker requires.
198-
println!("cargo:rustc-link-lib=icudata");
199-
}
200-
201191
// Copy the static header file for C preprocessing convenience.
202192

203193
let mut main_header_src = manifest_dir;

crates/xetex_layout/layout/xetex-XeTeXLayoutInterface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ authorization from the copyright holders.
4040
#include <harfbuzz/hb.h>
4141
#include <harfbuzz/hb-graphite2.h>
4242
#if !HB_VERSION_ATLEAST(2,5,0)
43+
/* Note: this configuration is no longer actively tested */
4344
#include <harfbuzz/hb-icu.h>
4445
#endif
4546
#include <harfbuzz/hb-ot.h>

dist/azure-build-and-test-pkgconfig.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2016-2020 the Tectonic Project
1+
# Copyright 2016-2023 the Tectonic Project
22
# Licensed under the MIT License.
33
#
44
# Azure Pipelines template for a standard build-and-test job getting
@@ -32,9 +32,12 @@ steps:
3232
- bash: |
3333
set -xeuo pipefail
3434
35+
# libfuse2 here is to support the AppImage build associated with
36+
# the "primary" Linux artifact.
3537
pkgs="
3638
libgraphite2-dev
3739
libfontconfig1-dev
40+
libfuse2
3841
libicu-dev
3942
libssl-dev
4043
openssl

0 commit comments

Comments
 (0)