git: 9993ff909cae - main - devel/py-maturin: Unbreak with CARGO_BUILD_TARGET in the environment (D31872)
Tobias Kortkamp
tobik at FreeBSD.org
Fri Sep 10 08:22:16 UTC 2021
The branch main has been updated by tobik:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9993ff909caebf3849ce6fd5bbaad81672f5a351
commit 9993ff909caebf3849ce6fd5bbaad81672f5a351
Author: Tobias Kortkamp <tobik at FreeBSD.org>
AuthorDate: 2021-09-10 08:13:23 +0000
Commit: Tobias Kortkamp <tobik at FreeBSD.org>
CommitDate: 2021-09-10 08:21:28 +0000
devel/py-maturin: Unbreak with CARGO_BUILD_TARGET in the environment (D31872)
error: can't copy '/wrkdirs/usr/ports/devel/py-maturin/work-py38/maturin-0.8.3/target/release/maturin': doesn't exist or not a regular file
http://package18.nyi.freebsd.org/data/122amd64-default-foo/2021-09-09_14h16m24s/logs/errors/py38-maturin-0.8.3_8.log
PR: 258337
---
devel/py-maturin/Makefile | 1 +
devel/py-maturin/files/patch-setup.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/devel/py-maturin/Makefile b/devel/py-maturin/Makefile
index 990e64880778..a955f349f6fc 100644
--- a/devel/py-maturin/Makefile
+++ b/devel/py-maturin/Makefile
@@ -259,6 +259,7 @@ CARGO_CRATES= addr2line-0.13.0 \
CARGO_BUILD= no
CARGO_INSTALL= no
CARGO_TARGET_DIR= ${WRKSRC}/target
+MAKE_ENV= ${CARGO_ENV}
# The binary is usually built via setup.py which uses different compiler flags.
# That line is patched out there to use the compiler flags from the Ports
diff --git a/devel/py-maturin/files/patch-setup.py b/devel/py-maturin/files/patch-setup.py
index 4ae38086b865..e10581b5368d 100644
--- a/devel/py-maturin/files/patch-setup.py
+++ b/devel/py-maturin/files/patch-setup.py
@@ -11,7 +11,7 @@ itself. Also change the destination directory to honor ${PREFIX}.
- ["cargo", "rustc", "--bin", "maturin", "--", "-C", "link-arg=-s"]
- )
- source = os.path.join(source_dir, "target", "debug", executable_name)
-+ source = os.path.join(source_dir, "target", "release", executable_name)
++ source = os.path.join(source_dir, "target", os.getenv("CARGO_BUILD_TARGET", ""), "release", executable_name)
+ #subprocess.check_call(
+ # ["cargo", "rustc", "--bin", "maturin", "--", "-C", "link-arg=-s"]
+ #)
More information about the dev-commits-ports-all
mailing list