summaryrefslogtreecommitdiff
path: root/net-im/fractal/files/patch-scripts_cargo.sh
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2023-05-17 22:04:12 -0400
committerCharlie Li <vishwin@FreeBSD.org>2023-05-17 22:04:12 -0400
commit2e0d3fa0bccae53d09ffa1c4f07802ec517d9127 (patch)
tree2de7a6d6d37c5ac6fe13d06a04bb5bab3bc1406d /net-im/fractal/files/patch-scripts_cargo.sh
parentgraphics/mesa-devel: update to 23.1.b.1578 (diff)
net-im/fractal: update to 4.4.2
Manage crates ourselves; use the generated source asset rather than the upload (which bundles vendored crates that get stale quick). Event: FreeBSD Developer Summit May 2023 Event: BSDCan 2023
Diffstat (limited to 'net-im/fractal/files/patch-scripts_cargo.sh')
-rw-r--r--net-im/fractal/files/patch-scripts_cargo.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/net-im/fractal/files/patch-scripts_cargo.sh b/net-im/fractal/files/patch-scripts_cargo.sh
new file mode 100644
index 000000000000..a602980a268f
--- /dev/null
+++ b/net-im/fractal/files/patch-scripts_cargo.sh
@@ -0,0 +1,20 @@
+--- scripts/cargo.sh.orig 2020-08-07 12:02:09 UTC
++++ scripts/cargo.sh
+@@ -1,15 +1,13 @@ export OUTPUT="$2"
+ #!/bin/sh
+
+ export OUTPUT="$2"
+-export CARGO_TARGET_DIR="$3"/target
+-export CARGO_HOME="$CARGO_TARGET_DIR"/cargo-home
+ export FRACTAL_PROFILE="$4"
+
+ if [ "$FRACTAL_PROFILE" = "Devel" ]
+ then
+ echo "DEBUG MODE"
+- cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/debug/fractal-gtk "$OUTPUT"
++ cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/"$CARGO_BUILD_TARGET"/debug/fractal-gtk "$OUTPUT"
+ else
+ echo "RELEASE MODE"
+- cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/release/fractal-gtk "$OUTPUT"
++ cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/"$CARGO_BUILD_TARGET"/release/fractal-gtk "$OUTPUT"
+ fi