Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ termux_step_post_massage() {
# shellcheck source=scripts/build/termux_step_create_debscripts.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_debscripts.sh"

# Function to generate debscripts for python packages.
# shellcheck source=scripts/build/termux_step_create_python_debscripts.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_python_debscripts.sh"

# Convert Debian maintainer scripts into pacman-compatible installation hooks.
# This is used only when creating pacman packages.
# shellcheck source=scripts/build/termux_step_create_pacman_install_hook.sh
Expand Down
8 changes: 0 additions & 8 deletions disabled-packages/python-pandas/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,3 @@ termux_step_pre_configure() {
termux_step_make_install() {
pip install --no-deps --no-build-isolation . --prefix $TERMUX_PREFIX
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
13 changes: 3 additions & 10 deletions packages/borgbackup/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ TERMUX_PKG_DESCRIPTION="Deduplicating and compressing backup program"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION="1.4.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/borgbackup/borg/releases/download/${TERMUX_PKG_VERSION}/borgbackup-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=79bbfa745d1901d685973584bd2d16a350686ddd176f6a2244490fb01996441f
TERMUX_PKG_DEPENDS="libacl, liblz4, openssl, python, xxhash, zstd"
TERMUX_PKG_DEPENDS="libacl, liblz4, openssl, python, python-pip, xxhash, zstd"
TERMUX_PKG_PYTHON_COMMON_DEPS="build, Cython, pkgconfig, setuptools, setuptools-scm, wheel"
TERMUX_PKG_PYTHON_TARGET_DEPS="'msgpack==1.0.8', packaging"
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -17,13 +18,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyver="${TERMUX_PYTHON_VERSION//./}"
local _wheel="borgbackup-${TERMUX_PKG_VERSION}-cp${_pyver}-cp${_pyver}-linux_${TERMUX_ARCH}.whl"
pip install --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install $TERMUX_PKG_PYTHON_TARGET_DEPS
EOF
pip install --force-reinstall --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}
1 change: 1 addition & 0 deletions packages/calcurse/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="calcurse is a calendar and scheduling application for th
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.8.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://calcurse.org/files/calcurse-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=849ba852c7f37b6772365cb0c42a94cde0fe75efba91363e96a0e7ef797ba565
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
6 changes: 1 addition & 5 deletions packages/calcurse/calcurse-caldav.subpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ TERMUX_SUBPKG_DESCRIPTION="Sync calcurse with remote caldav calendar"
TERMUX_SUBPKG_DEPENDS="python, python-pip"
TERMUX_SUBPKG_REPLACES="calcurse (<< 4.7.1-1)"
TERMUX_SUBPKG_BREAKS="calcurse (<< 4.7.1-1)"

termux_step_create_subpkg_debscripts() {
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo "pip3 install httplib2" >> postinst
}
TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS="httplib2"
10 changes: 1 addition & 9 deletions packages/electrum/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Electrum is a lightweight Bitcoin wallet"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.5.8"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://download.electrum.org/$TERMUX_PKG_VERSION/Electrum-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=dd8595a138132dee87cee76ce760a1d622fc2fd65d3b6ac7df7e53b7fb6ea7e8
# The python dependency list should be compared to
Expand All @@ -19,11 +19,3 @@ TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_CONFLICTS="asciinema (<< 1.4.0-1)"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_SERVICE_SCRIPT=("electrum" 'exec electrum daemon 2>&1')

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
9 changes: 1 addition & 8 deletions packages/hash-slinger/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Various tools to generate special DNS records"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.4"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/letoams/hash-slinger/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=46274aa2124c766c2c15c73576f895db7556bf03c7d3e9e4bb917858fae34ffc
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -22,11 +23,3 @@ termux_step_make_install() {
install -Dm600 -t $TERMUX_PREFIX/share/man/man1 ${f}.1
done
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
10 changes: 1 addition & 9 deletions packages/lv2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@ TERMUX_PKG_DESCRIPTION="A plugin standard for audio systems"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.18.10
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://lv2plug.in/spec/lv2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=78c51bcf21b54e58bb6329accbb4dae03b2ed79b520f9a01e734bd9de530953f
TERMUX_PKG_DEPENDS="libxml2, libxslt, python, sord, python-pip, python-lxml"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dplugins=disabled"
TERMUX_PKG_PYTHON_TARGET_DEPS="pygments, rdflib"

termux_step_create_debscripts() {
cat <<-EOF >./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
14 changes: 3 additions & 11 deletions packages/manim/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ TERMUX_PKG_DESCRIPTION="A community-maintained Python framework for creating mat
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Nguyen Khanh @nguynkhn"
TERMUX_PKG_VERSION="0.19.2"
TERMUX_PKG_SRCURL=https://github.com/ManimCommunity/manim/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://github.com/ManimCommunity/manim/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=e61992a84c684702ce732e66ae46f85341ebe4cb208f8a4c5cb33ce9ea070f02
TERMUX_PKG_DEPENDS="ffmpeg, libcairo, pango, xorgproto, python-numpy, python-pillow, pycairo, python-scipy, python-skia-pathops"
TERMUX_PKG_DEPENDS="ffmpeg, libcairo, pango, xorgproto, python-numpy, python-pillow, python-pip, pycairo, python-scipy, python-skia-pathops"
TERMUX_PKG_SUGGESTS="texlive-installer"
TERMUX_PKG_PYTHON_TARGET_DEPS="'av>=9.0.0,<14.0.0', 'beautifulsoup4>=4.12', 'click>=8.0', 'cloup>=2.0.0', 'decorator>=4.3.2', 'importlib-metadata>=8.6.1', 'isosurfaces>=0.1.0', 'manimpango>=0.5.0,<1.0.0', 'mapbox-earcut>=1.0.0,<1.0.3', 'moderngl-window>=2.0.0', 'moderngl>=5.0.0,<6.0.0', 'networkx>=2.6', 'pydub>=0.20.0', 'pygments>=2.0.0', 'rich>=12.0.0', 'screeninfo>=0.7', 'srt>=3.0.0', 'svgelements>=1.8.0', 'tqdm>=4.0.0', 'typing-extensions>=4.12.0', 'watchdog>=2.0.0'"
TERMUX_PKG_PYTHON_COMMON_DEPS="poetry"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXCLUDED_ARCHES="arm, i686"

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
9 changes: 1 addition & 8 deletions packages/matplotlib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ LICENSE/LICENSE_STIX
LICENSE/LICENSE_YORICK"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.10.8"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/matplotlib/matplotlib/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=dbc50c7b15bb8d7dbe51a27a58322ed73f09291772d9e3184f03f11c576693f7
TERMUX_PKG_AUTO_UPDATE=true
Expand Down Expand Up @@ -58,11 +59,3 @@ termux_step_make_install() {
local _whl="matplotlib-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
pip install --no-deps --prefix=$TERMUX_PREFIX --force-reinstall $TERMUX_PKG_SRCDIR/dist/$_whl
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip. This may take a while..."
MATHLIB="m" pip3 install matplotlib
EOF
}
4 changes: 2 additions & 2 deletions packages/nala/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Commandline frontend for the apt package manager"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.16.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gitlab.com/volian/nala/-/archive/v${TERMUX_PKG_VERSION}/nala-v${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=49e384aa3b94597d09c61b7accc41d1cf10cb6beea85d4620c80c28d7cdc4d5f
TERMUX_PKG_DEPENDS="python-apt, python-pip"
Expand All @@ -12,6 +13,7 @@ TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_PYTHON_COMMON_DEPS="poetry"
TERMUX_PKG_PYTHON_TARGET_DEPS="anyio, httpx, jsbeautifier, pexpect, python-debian, rich, tomli, typer, typing-extensions"
TERMUX_PKG_PYTHON_RUNTIME_DEPS="nala, python-debian"

termux_step_pre_configure() {
rm -rf nala/__init__.py.orig
Expand Down Expand Up @@ -42,7 +44,5 @@ termux_step_create_debscripts() {
mkdir -p $TERMUX_PREFIX/var/lib/nala
mkdir -p $TERMUX_PREFIX/var/log/nala
mkdir -p $TERMUX_PREFIX/var/lock
echo "Installing dependencies through pip..."
pip3 install nala python-debian
EOF
}
3 changes: 2 additions & 1 deletion packages/python-bcrypt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ TERMUX_PKG_DESCRIPTION="Acceptable password hashing for your software and your s
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="5.0.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://pypi.io/packages/source/b/bcrypt/bcrypt-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="python"
TERMUX_PKG_DEPENDS="python, python-pip"
TERMUX_PKG_BUILD_DEPENDS="openssl"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, setuptools-rust"
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down
11 changes: 6 additions & 5 deletions packages/python-contourpy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ TERMUX_PKG_DESCRIPTION="Python library for calculating contours in 2D quadrilate
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.3.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=git+https://github.com/contourpy/contourpy
TERMUX_PKG_DEPENDS="python, python-numpy"
TERMUX_PKG_DEPENDS="python, python-numpy, python-pip"
TERMUX_PKG_BUILD_DEPENDS="pybind11"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, meson-python, build"
_NUMPY_VERSION=$(. $TERMUX_SCRIPTDIR/packages/python-numpy/build.sh; echo $TERMUX_PKG_VERSION)
TERMUX_PKG_PYTHON_BUILD_DEPS="'pybind11>=2.12.0', 'numpy==$_NUMPY_VERSION'"
TERMUX_PKG_PYTHON_BUILD_DEPS="'numpy==$_NUMPY_VERSION'"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag"
TERMUX_MESON_WHEEL_CROSSFILE="$TERMUX_PKG_TMPDIR/wheel-cross-file.txt"
Expand All @@ -22,7 +23,7 @@ termux_step_configure() {
cp -f $TERMUX_MESON_CROSSFILE $TERMUX_MESON_WHEEL_CROSSFILE
sed -i 's|^\(\[binaries\]\)$|\1\npython = '\'$(command -v python)\''|g' \
$TERMUX_MESON_WHEEL_CROSSFILE
sed -i 's|^\(\[properties\]\)$|\1\nnumpy-include-dir = '\'$PYTHON_SITE_PKG/numpy/_core/include\''|g' \
sed -i 's|^\(\[properties\]\)$|\1\nnumpy-include-dir = '\'$TERMUX_PYTHON_HOME/site-packages/numpy/_core/include\''|g' \
$TERMUX_MESON_WHEEL_CROSSFILE

termux_step_configure_meson
Expand All @@ -37,5 +38,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyv="${TERMUX_PYTHON_VERSION/./}"
local _whl="contourpy-$TERMUX_PKG_VERSION-cp$_pyv-cp$_pyv-linux_$TERMUX_ARCH.whl"
pip install --no-deps --prefix=$TERMUX_PREFIX $TERMUX_PKG_SRCDIR/dist/$_whl
pip install --force-reinstall --no-deps --prefix=$TERMUX_PREFIX $TERMUX_PKG_SRCDIR/dist/$_whl
}
14 changes: 4 additions & 10 deletions packages/python-cryptography/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, BSD 3-Clause"
TERMUX_PKG_LICENSE_FILE="LICENSE, LICENSE.APACHE, LICENSE.BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="46.0.3"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/pyca/cryptography/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b40f9434d14affd208f03f4832aa616cb49e9ce414cb103825a8184eb94002f5
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -16,14 +17,7 @@ TERMUX_PKG_PYTHON_TARGET_DEPS="'cffi>=1.12'"

termux_step_configure() {
termux_setup_rust
export CARGO_BUILD_TARGET=${CARGO_TARGET_NAME}
export PYO3_CROSS_LIB_DIR=$TERMUX_PREFIX/lib
}

termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install $TERMUX_PKG_PYTHON_TARGET_DEPS
EOF
export CARGO_BUILD_TARGET="${CARGO_TARGET_NAME}"
export PYO3_CROSS_LIB_DIR="${TERMUX_PREFIX}/lib"
export ANDROID_API_LEVEL="${TERMUX_PKG_API_LEVEL}"
}
3 changes: 2 additions & 1 deletion packages/python-greenlet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_LICENSE_FILE="LICENSE, LICENSE.PSF"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.3.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/python-greenlet/greenlet/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5d854395dc71b38a22e7e25467e7fc66e6a6fe538165318416cd2bb892692c6c
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_DEPENDS="libc++, python"
TERMUX_PKG_DEPENDS="libc++, python, python-pip"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
4 changes: 2 additions & 2 deletions packages/python-grpcio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_SRCURL=git+https://github.com/grpc/grpc
TERMUX_PKG_VERSION="1.76.0"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag"
TERMUX_PKG_DEPENDS="abseil-cpp, c-ares, ca-certificates, libc++, libre2, openssl, python, zlib"
TERMUX_PKG_DEPENDS="abseil-cpp, c-ares, ca-certificates, libc++, libre2, openssl, python, python-pip, zlib"
TERMUX_PKG_BUILD_DEPENDS="gflags, gflags-static"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, setuptools, 'Cython>=3.0.0'"
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down
11 changes: 10 additions & 1 deletion packages/python-llvmlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TERMUX_PKG_VERSION=(
"0.46.0"
"20.1.8"
)
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=(
"https://github.com/numba/llvmlite/archive/refs/tags/v${TERMUX_PKG_VERSION[0]}.tar.gz"
"https://github.com/llvm/llvm-project/releases/download/llvmorg-${TERMUX_PKG_VERSION[1]}/llvm-project-${TERMUX_PKG_VERSION[1]}.src.tar.xz"
Expand All @@ -21,7 +22,6 @@ TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_RM_AFTER_INSTALL="include"

# See http://llvm.org/docs/CMake.html:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
Expand Down Expand Up @@ -101,6 +101,8 @@ __llvmlite_build_llvm() {
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_TARGET_ARCH=$LLVM_TARGET_ARCH"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_HOST_TRIPLE=$LLVM_DEFAULT_TARGET_TRIPLE"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCMAKE_INSTALL_PREFIX=$_LLVMLITE_LLVM_INSTALL_DIR"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCMAKE_INSTALL_INCLUDEDIR=$_LLVMLITE_LLVM_INSTALL_DIR/include"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCMAKE_INSTALL_LIBDIR=$_LLVMLITE_LLVM_INSTALL_DIR/lib"

# Backup dirs and envs
local __old_ldflags="$LDFLAGS"
Expand Down Expand Up @@ -175,3 +177,10 @@ termux_step_make_install() {
export LLVMLITE_SKIP_BUILD_LIBRARY=1
pip install . --prefix="$TERMUX_PREFIX" -vv --no-build-isolation --no-deps
}

termux_step_post_massage() {
local dir="include"
if [[ -d "${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/$dir" ]]; then
termux_error_exit "$dir should not exist in $TERMUX_PKG_NAME!"
fi
}
3 changes: 2 additions & 1 deletion packages/python-msgpack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="MessagePack serializer implementation for Python"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.1.2"
TERMUX_PKG_REVISION=1
# _cmsgpack.c is absent in https://github.com/msgpack/msgpack-python/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SRCURL=https://pypi.org/packages/source/m/msgpack/msgpack-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e
Expand All @@ -17,5 +18,5 @@ termux_step_make() {
termux_step_make_install() {
local _pyver="${TERMUX_PYTHON_VERSION//./}"
local _wheel="msgpack-${TERMUX_PKG_VERSION}-cp${_pyver}-cp${_pyver}-linux_${TERMUX_ARCH}.whl"
pip install --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
pip install --force-reinstal --no-deps --prefix="$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/dist/${_wheel}"
}
4 changes: 2 additions & 2 deletions packages/python-numpy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
# Revbump revdeps after updating
TERMUX_PKG_VERSION="2.2.5"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=git+https://github.com/numpy/numpy
TERMUX_PKG_DEPENDS="libc++, libopenblas, python"
TERMUX_PKG_AUTO_UPDATE=false
Expand Down Expand Up @@ -34,7 +34,7 @@ termux_step_configure() {
cp -f $TERMUX_MESON_CROSSFILE $TERMUX_MESON_WHEEL_CROSSFILE
sed -i 's|^\(\[binaries\]\)$|\1\npython = '\'$(command -v python)\''|g' \
$TERMUX_MESON_WHEEL_CROSSFILE
sed -i 's|^\(\[properties\]\)$|\1\nnumpy-include-dir = '\'$PYTHON_SITE_PKG/numpy/_core/include\''|g' \
sed -i 's|^\(\[properties\]\)$|\1\nnumpy-include-dir = '\'$TERMUX_PYTHON_HOME/site-packages/numpy/_core/include\''|g' \
$TERMUX_MESON_WHEEL_CROSSFILE

local _longdouble_format=""
Expand Down
4 changes: 2 additions & 2 deletions packages/python-onnxruntime/0001-use-system-abseil.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ This reverts f70215d4e6af2a1b5a0cc232460e2f86125b055d

--- a/cmake/external/abseil-cpp.cmake
+++ b/cmake/external/abseil-cpp.cmake
@@ -28,7 +28,7 @@
@@ -36,7 +36,7 @@ onnxruntime_fetchcontent_declare(
URL_HASH SHA1=${DEP_SHA1_abseil_cpp}
EXCLUDE_FROM_ALL
PATCH_COMMAND ${ABSL_PATCH_COMMAND}
- FIND_PACKAGE_ARGS 20240722 NAMES absl
- FIND_PACKAGE_ARGS 20250512 NAMES absl
+ FIND_PACKAGE_ARGS NAMES absl
)

Expand Down
Loading