ff4ff35918
Red Bear OS is a full fork. All sources must be available from git clone with zero network access. Removed gitignore rules that excluded fetched source trees under recipes/*/source/, local/recipes/kde/*/source/, local/recipes/qt/*/source/, and vendor source trees. Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded. 127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt frameworks, mesa, wayland, DRM drivers, and every other recipe source.
35 lines
1.1 KiB
Rust
35 lines
1.1 KiB
Rust
use std::path::PathBuf;
|
|
use std::process::Command;
|
|
|
|
fn main() {
|
|
// Directory for the fontconfig build
|
|
let build_dir = PathBuf::from("build");
|
|
|
|
// Configure and build fontconfig using meson
|
|
let mut meson = Command::new("meson");
|
|
meson.current_dir("../");
|
|
meson.arg("setup")
|
|
.arg(build_dir.to_str().unwrap())
|
|
.arg("-Dfontations=enabled");
|
|
|
|
let status = meson.status().expect("Failed to execute meson");
|
|
if !status.success() {
|
|
panic!("Meson setup failed");
|
|
}
|
|
|
|
let mut ninja = Command::new("ninja");
|
|
ninja.current_dir("../");
|
|
ninja.arg("-C").arg(build_dir.to_str().unwrap());
|
|
let status = ninja.status().expect("Failed to execute ninja");
|
|
if !status.success() {
|
|
panic!("Ninja build failed");
|
|
}
|
|
|
|
// Tell cargo to look for fontconfig in the build directory
|
|
println!("cargo:rustc-link-search=native={}", build_dir.join("lib").display());
|
|
println!("cargo:rustc-link-lib=dylib=fontconfig");
|
|
|
|
// Rerun this build script if the fontconfig source code changes
|
|
println!("cargo:rerun-if-changed=src");
|
|
}
|