diff --git a/packages/gobject-introspection/build.sh b/packages/gobject-introspection/build.sh index a73cd1e00..bc0fc4aa0 100644 --- a/packages/gobject-introspection/build.sh +++ b/packages/gobject-introspection/build.sh @@ -7,8 +7,23 @@ TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_SRCURL=https://github.com/GNOME/gobject-introspection/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=13595a257df7d0b71b002ec115f1faafd3295c9516f307e2c57bd219d5cd8369 TERMUX_PKG_BUILD_DEPENDS="glib, python" -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dpython=python3.10" + +_PYTHON_VERSION=3.10 + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dpython=python${_PYTHON_VERSION}" termux_step_pre_configure() { - CPPFLAGS+=" -I$TERMUX_PREFIX/include/python3.10 -I$TERMUX_PREFIX/include/python3.10/cpython" + CPPFLAGS+=" -I$TERMUX_PREFIX/include/python${_PYTHON_VERSION} -I$TERMUX_PREFIX/include/python${_PYTHON_VERSION}/cpython" +} + +termux_step_post_make_install() { + soabi=cpython-${_PYTHON_VERSION//.} + + cd $TERMUX_PREFIX/lib/gobject-introspection/giscanner + m=_giscanner + for s in $m.$soabi-*.so; do + if [ -f $s ]; then + mv $s $m.$soabi.so + fi + done }