new package: python3-libloot (because it's a dependency of amethyst-mod-manager)
This commit is contained in:
1 parent
ea57aa19e7
commit
c68e6ccd67
1 file changed
+36
@@ -0,0 +1,36 @@
|
|||||||
|
# Template file for 'python3-libloot'
|
||||||
|
pkgname=python3-libloot
|
||||||
|
version=0.29.7
|
||||||
|
revision=1
|
||||||
|
archs="~*-musl"
|
||||||
|
build_helper="rust python3"
|
||||||
|
hostmakedepends="python3-devel maturin rust cargo rust-src patchelf python3-packaging-bootstrap"
|
||||||
|
makedepends="python3-devel"
|
||||||
|
depends="python3"
|
||||||
|
short_desc="Experimental Python wrapper around libloot"
|
||||||
|
maintainer="Juan Rojas <juandmcr@protonmail.com>"
|
||||||
|
license="GPL-3.0-only"
|
||||||
|
homepage="https://github.com/loot/libloot"
|
||||||
|
distfiles="https://github.com/loot/libloot/archive/refs/tags/${version}.tar.gz"
|
||||||
|
checksum=ed168a13ba42b353e6bb863f0b85f14295a951ec210b19ae8893b27c4681c7a6
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
cd "${wrksrc}/python"
|
||||||
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
|
export PYO3_CROSS_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib/python3.14"
|
||||||
|
export CARGO_UNSTABLE_BUILD_STD="std,panic_abort"
|
||||||
|
export RUSTC_BOOTSTRAP=1
|
||||||
|
fi
|
||||||
|
maturin build --release
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
PY_TAG="$(python3 -c 'import sys; print(f"cpython-{sys.version_info.major}{sys.version_info.minor}")')"
|
||||||
|
ARCH="$(xbps-uhelper arch)"
|
||||||
|
SO_NAME="loot.${PY_TAG}-${ARCH}-linux-gnu.so"
|
||||||
|
|
||||||
|
LOOT_SO="$(find "${wrksrc}/target" -name 'libloot*.so' -o -name 'loot*.so' | head -1)"
|
||||||
|
|
||||||
|
vmkdir "${py3_sitelib}"
|
||||||
|
vcopy "$LOOT_SO" "${py3_sitelib}/${SO_NAME}"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user