feat: update depot version and enhance host build support
- Bump the version of the "depot" package from 0.26.1 to 0.27.0 in Cargo.toml and Cargo.lock. - Modify meson.build, autotools.rs, cmake.rs, custom.rs, makefile.rs, and other builder files to include a new parameter for host build directory. - Implement logic to handle host builds across various build systems (Autotools, CMake, Meson). - Add tests to ensure that environment variables for host build directories are correctly expanded. - Introduce new flags in PackageSpec to control host build behavior.
This commit is contained in:
@@ -12,6 +12,7 @@ pub fn build(
|
||||
destdir: &Path,
|
||||
cross: Option<&CrossConfig>,
|
||||
export_compiler_flags: bool,
|
||||
_host_build_dir: Option<&Path>,
|
||||
) -> Result<()> {
|
||||
let mut state = StateTracker::new_with_namespace(
|
||||
src_dir,
|
||||
@@ -217,7 +218,7 @@ exec "$@"
|
||||
"cp built.txt $DESTDIR/usr/bin/installed.txt".into(),
|
||||
];
|
||||
|
||||
build(&spec, src_path, dest_path, None, true)?;
|
||||
build(&spec, src_path, dest_path, None, true, None)?;
|
||||
|
||||
// Verify build step
|
||||
let built_file = src_path.join("built.txt");
|
||||
@@ -271,7 +272,7 @@ exec "$@"
|
||||
"printf 'bin' > \"$DESTDIR/usr/bin/foo\"".into(),
|
||||
];
|
||||
|
||||
build(&spec, src_path, dest_path, None, true)?;
|
||||
build(&spec, src_path, dest_path, None, true, None)?;
|
||||
|
||||
assert_eq!(
|
||||
fs::read_to_string(dest_path.join("usr/lib32/libfoo.so.1"))?,
|
||||
|
||||
Reference in New Issue
Block a user