python3-etebase: rebuild for Python 3.11 and fix

This commit is contained in:
Andrew J. Hesford 2022-10-13 16:42:10 -04:00
parent df369fe038
commit 7865dff402
2 changed files with 25 additions and 9 deletions

View File

@ -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());
}

View File

@ -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 <darkiridiumghost@gmail.com>"
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() {