git: 962d7764a4fc - main - devel/py-maturin: fix runtime on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 27 Oct 2021 23:58:08 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=962d7764a4fc1a26d8b5a638264cedd52ef84529

commit 962d7764a4fc1a26d8b5a638264cedd52ef84529
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-27 23:52:39 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-27 23:52:39 +0000

    devel/py-maturin: fix runtime on powerpc64*
---
 devel/py-maturin/files/patch-src_target.rs | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/devel/py-maturin/files/patch-src_target.rs b/devel/py-maturin/files/patch-src_target.rs
new file mode 100644
index 000000000000..9941f29c9394
--- /dev/null
+++ b/devel/py-maturin/files/patch-src_target.rs
@@ -0,0 +1,29 @@
+--- src/target.rs.orig	2021-10-27 17:18:18 UTC
++++ src/target.rs
+@@ -72,7 +72,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
+         ],
+         Os::Windows => vec![Arch::X86, Arch::X86_64, Arch::Aarch64],
+         Os::Macos => vec![Arch::Aarch64, Arch::X86_64],
+-        Os::FreeBsd => vec![Arch::X86_64, Arch::Aarch64],
++        Os::FreeBsd => vec![Arch::X86_64, Arch::Aarch64, Arch::Powerpc64, Arch::Powerpc64Le],
+         Os::OpenBsd => vec![Arch::X86, Arch::X86_64, Arch::Aarch64],
+     }
+ }
+@@ -143,6 +143,8 @@ impl Target {
+         match (&self.os, &self.arch) {
+             (Os::FreeBsd, Arch::X86_64)
+             | (Os::FreeBsd, Arch::Aarch64)
++            | (Os::FreeBsd, Arch::Powerpc64)
++            | (Os::FreeBsd, Arch::Powerpc64Le)
+             | (Os::OpenBsd, Arch::X86)
+             | (Os::OpenBsd, Arch::X86_64)
+             | (Os::OpenBsd, Arch::Aarch64) => {
+@@ -155,6 +157,8 @@ impl Target {
+                     Arch::X86_64 => "amd64",
+                     Arch::X86 => "i386",
+                     Arch::Aarch64 => "arm64",
++                    Arch::Powerpc64 => "powerpc64",
++                    Arch::Powerpc64Le => "powerpc64le",
+                     _ => panic!(
+                         "unsupported architecutre should not have reached get_platform_tag()"
+                     ),