mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
Reasons: * Port build shouldn't use cross-compilation mode because it buids for the same architecture. * RUSTFLAGS isn't passed to the build of all or some Rust ports in the cross-compilation mode. Essential changes: * Remove the CARGO_BUILD_TARGET make variable. * Remove CARGO_BUILD_TARGET and CARGO_TARGET_* from CARGO_ENV. * Update many ports that used CARGO_BUILD_TARGET. * Build paths now don't include the architecture triplet part. Immadiate benefits: * Unbreak build on architectures like i386 that sometimes require special RUSTFLAGS that were not effective in the cross-compilation mode. Ports that really need cross-compilation for some reason should enable it on case-by-case basis. Example: net-p2p/cncli (Not sure why does net-p2p/cncli actually need it, but it only builds with these options.) PR: 280305 Approved by: rust@FreeBSD.org (maintainer's timeout; 98 days)
21 lines
540 B
Python
21 lines
540 B
Python
Add explicit <triple> subdir for --target from USES=cargo
|
|
|
|
--- cargo_build.py.orig 2021-09-10 16:56:00 UTC
|
|
+++ cargo_build.py
|
|
@@ -6,6 +6,7 @@ instead of the source tree.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
+import os
|
|
import shlex
|
|
import subprocess
|
|
import sys
|
|
@@ -43,7 +44,7 @@ if out_path:
|
|
out_basename = out_path.name
|
|
filename = filename or out_basename
|
|
subprocess.run(['cp', '-a',
|
|
- './{}/{}'.format(binary_dir, filename),
|
|
+ os.path.join('.', binary_dir, filename),
|
|
out_path],
|
|
check=True)
|
|
|