File do-not-guess-rust-target.patch of Package signal-desktop
Remove upstream's botched attempt at supporting cross-compilation which we don't need and breaks build on armv7
--- a/node_modules/@signalapp/libsignal-client/binding.gyp
+++ b/node_modules/@signalapp/libsignal-client/binding.gyp
@@ -28,7 +28,6 @@
'--os-name=<(NODE_OS_NAME)',
'--configuration=<(CONFIGURATION_NAME)',
'--cargo-build-dir', '<(INTERMEDIATE_DIR)/rust',
- '--cargo-target=<(CARGO_ARCH)-<(CARGO_TARGET_SUFFIX)',
'--node-arch=<(target_arch)'
],
'inputs': [],
--- a/node_modules/@signalapp/libsignal-client/build_node_bridge.py
+++ b/node_modules/@signalapp/libsignal-client/build_node_bridge.py
@@ -51,7 +51,7 @@
print('ERROR: --os-name is required')
return 1
- cargo_target = options.cargo_target
+ cargo_target = subprocess.run(["sh", "-c", "rustc -vV | awk '/host/ { print $NF }'"], stdout=subprocess.PIPE, errors='strict').stdout.strip()
if cargo_target is None:
print('ERROR: --cargo-target is required')
return 1