On Fri, Jun 04, 2021 at 10:51:46PM +0100, Stuart Henderson wrote:
> btw, py-adblock doesn't build on i386;
>
> ???? Building a mixed python/rust project
> ???? Found pyo3 bindings with abi3 support for Python ??? 3.6
> ???? maturin failed
> Caused by: Unknown target triple i686-unknown-openbsd
>
> we probably could do with figuring out which arches it does build on,
> we'll get more info from upcoming bulk build reports on other arches,
> and make the dependency in qutebrowser conditional so that qutebrowser
> only depends on py-adblock on arches where it works.
>
> (perhaps tweaks to maturn could let this build on more arches too)
Can you confirm if the packages work on aarch64,sparc64 (rust archs)?
I don't see them among snapshots/packages/{aarch64,sparc64}.
This could possibly work and is similar to the diff upstream for
amd64 but ultimately untested since I don't have a x86 setup.
A near identical diff would do atleast for aarch64.
regards,
Dimitri
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/maturin/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile 2 Jun 2021 20:03:28 -0000 1.1.1.1
+++ Makefile 8 Jun 2021 13:12:56 -0000
@@ -5,6 +5,7 @@ COMMENT = develop crates with pyo3, rust
GH_ACCOUNT = PyO3
GH_PROJECT = maturin
GH_TAGNAME = v0.10.3
+REVISION = 0
CATEGORIES = devel
Index: patches/patch-src_target_rs
===================================================================
RCS file: patches/patch-src_target_rs
diff -N patches/patch-src_target_rs
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_target_rs 8 Jun 2021 13:12:56 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Enable i386 build
+
+Index: src/target.rs
+--- src/target.rs.orig
++++ src/target.rs
+@@ -74,7 +74,7 @@ fn get_supported_architectures(os: &Os) -> Vec<Arch> {
+ Os::Windows => vec![Arch::X86, Arch::X86_64],
+ Os::Macos => vec![Arch::Aarch64, Arch::X86_64],
+ Os::FreeBsd => vec![Arch::X86_64],
+- Os::OpenBsd => vec![Arch::X86_64],
++ Os::OpenBsd => vec![Arch::X86, Arch::X86_64],
+ }
+ }
+
+@@ -149,6 +149,14 @@ impl Target {
+ };
+ let release = info.release().replace(".", "_").replace("-",
"_");
+ format!("freebsd_{}_amd64", release)
++ }
++ (Os::OpenBsd, Arch::X86) => {
++ let info = match PlatformInfo::new() {
++ Ok(info) => info,
++ Err(error) => panic!("{}", error),
++ };
++ let release = info.release().replace(".", "_").replace("-",
"_");
++ format!("openbsd_{}_i686", release)
+ }
+ (Os::OpenBsd, Arch::X86_64) => {
+ let info = match PlatformInfo::new() {