Files
termux-packages/packages/libxml2/build.sh
termux-pacman-bot 7c0b03f013 fix(main/libxml2): add missing python build dependency in case package needs to be built without libxml2-python.subpackage
```
[termux_setup_python_pip]: Applying python-crossenv-PYTHONPATH.patch
ERROR: /data/data/com.termux/files/usr/bin/python3.11 does not exist
```
2024-07-09 07:09:04 +00:00

39 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=http://www.xmlsoft.org
TERMUX_PKG_DESCRIPTION="Library for parsing XML documents"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.13.2"
TERMUX_PKG_REVISION=1
_MAJOR_VERSION="${TERMUX_PKG_VERSION%.*}"
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/libxml2/${_MAJOR_VERSION}/libxml2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=e7c8f5e0b5542159e0ddc409c22c9164304b581eaa9930653a76fb845b169263
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_SETUP_PYTHON=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-legacy
--with-python
"
TERMUX_PKG_RM_AFTER_INSTALL="share/gtk-doc"
TERMUX_PKG_DEPENDS="libiconv, liblzma, zlib"
TERMUX_PKG_BUILD_DEPENDS="python"
TERMUX_PKG_BREAKS="libxml2-dev"
TERMUX_PKG_REPLACES="libxml2-dev"
termux_step_pre_configure() {
# SOVERSION suffix is needed for SONAME of shared libs to avoid conflict
# with system ones (in /system/lib64 or /system/lib):
sed -i 's/^\(linux\*android\)\*)/\1-notermux)/' configure
}
termux_step_post_massage() {
# Check if SONAME is properly set:
if ! readelf -d lib/libxml2.so | grep -q '(SONAME).*\[libxml2\.so\.'; then
termux_error_exit "SONAME for libxml2.so is not properly set."
fi
local _GUARD_FILE="lib/libxml2.so.2"
if [ ! -e "${_GUARD_FILE}" ]; then
termux_error_exit "Error: file ${_GUARD_FILE} not found."
fi
}