diff --git a/srcpkgs/python3-etebase/patches/no-rustfmt.patch b/srcpkgs/python3-etebase/patches/no-rustfmt.patch new file mode 100644 index 00000000000..f39ce94b164 --- /dev/null +++ b/srcpkgs/python3-etebase/patches/no-rustfmt.patch @@ -0,0 +1,13 @@ +Void doesn't seem to ship rustfmt, so disable its bindings. + +--- a/build.rs ++++ b/build.rs +@@ -9,7 +9,7 @@ + + let python_cfg = PythonConfig::new("etebase_python".to_owned()); + let swig_gen = flapigen::Generator::new(LanguageConfig::PythonConfig(python_cfg)) +- .rustfmt_bindings(true); ++ .rustfmt_bindings(false); + swig_gen.expand("python bindings", &in_src, &out_src); + println!("cargo:rerun-if-changed={}", in_src.display()); + } diff --git a/srcpkgs/python3-etebase/template b/srcpkgs/python3-etebase/template index 04ac50ecf91..4d2e930cf38 100644 --- a/srcpkgs/python3-etebase/template +++ b/srcpkgs/python3-etebase/template @@ -1,14 +1,13 @@ # Template file for 'python3-etebase' pkgname=python3-etebase version=0.31.5 -revision=1 +revision=2 wrksrc="etebase-py-${version}" build_style=python3-module build_helper="rust" -hostmakedepends="python3-setuptools python3-wheel python3-setuptools-rust cargo" -makedepends="libsodium libsodium-devel openssl-devel pkg-config rust-std" -depends="python3-msgpack openssl" -checkdepends="python3-pytest python3-pytest ${depends}" +hostmakedepends="python3-setuptools-rust python3-wheel cargo pkg-config" +makedepends="libsodium libsodium-devel openssl-devel" +depends="python3-msgpack" short_desc="Python library for Etebase" maintainer="DragonGhost7 " license="BSD-3-Clause" @@ -16,12 +15,16 @@ homepage="https://github.com/etesync/etebase-py/" changelog="https://raw.githubusercontent.com/etesync/etebase-py/master/ChangeLog.md" distfiles="https://github.com/etesync/etebase-py/archive/refs/tags/v${version}.tar.gz" checksum=3f372b18cc518e04788ca553fb05989f77f393d041688a44f69b7b5b56d71048 -make_check=no #checking requires starting the server on localhost -nocross=yes +# Tests require a locally running server +make_check=no + +if [ "$CROSS_BUILD" ]; then + makedepends+=" rust-std" +fi pre_build() { - vsed -i -e 's|.rustfmt_bindings(true);|.rustfmt_bindings(false);|' build.rs -#rustfmt binary is not present in the default cargo installation. + # fixes an indexmap error when cross compiling + cargo update --package autocfg:1.0.0 --precise 1.1.0 } post_install() {