From baceef7eab9133949964c3f57cc66465e1be9e64 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Sun, 20 Oct 2024 23:25:31 +0800 Subject: [PATCH] new package: python3.12-lxml --- .../0001-customize-configure.patch | 12 +++++++ tur-pypi-312/python3.12-lxml/build.sh | 36 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tur-pypi-312/python3.12-lxml/0001-customize-configure.patch create mode 100644 tur-pypi-312/python3.12-lxml/build.sh diff --git a/tur-pypi-312/python3.12-lxml/0001-customize-configure.patch b/tur-pypi-312/python3.12-lxml/0001-customize-configure.patch new file mode 100644 index 0000000..e4fa37f --- /dev/null +++ b/tur-pypi-312/python3.12-lxml/0001-customize-configure.patch @@ -0,0 +1,12 @@ +--- a/buildlibxml.py ++++ b/buildlibxml.py +@@ -483,6 +483,9 @@ + '--prefix=%s' % prefix, + ] + ++ configure_cmd_extra = [x.strip() for x in os.environ.get("TERMUX_CONFIGURE_CMD_EXTRA", "").split() if x.strip()] ++ configure_cmd += configure_cmd_extra ++ + # build zlib + zlib_configure_cmd = [ + './configure', diff --git a/tur-pypi-312/python3.12-lxml/build.sh b/tur-pypi-312/python3.12-lxml/build.sh new file mode 100644 index 0000000..5d63330 --- /dev/null +++ b/tur-pypi-312/python3.12-lxml/build.sh @@ -0,0 +1,36 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/lxml/lxml +TERMUX_PKG_DESCRIPTION="A straightforward binding of libsass for Python" +TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_MAINTAINER="@termux-user-repository" +TERMUX_PKG_VERSION="5.3.0" +TERMUX_PKG_SRCURL=https://github.com/lxml/lxml/releases/download/lxml-$TERMUX_PKG_VERSION/lxml-$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_SHA256=4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f +TERMUX_PKG_DEPENDS="python" +TERMUX_PKG_PYTHON_COMMON_DEPS="wheel" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+" +TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag" + +TERMUX_PYTHON_VERSION=3.12 +TERMUX_PYTHON_CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python${TERMUX_PYTHON_VERSION/./}-crossenv-prefix-$TERMUX_ARCH +TUR_AUTO_AUDIT_WHEEL=true +TUR_AUDIT_WHEEL_NO_LIBS=true + +source $TERMUX_SCRIPTDIR/common-files/tur_build_wheel.sh + +termux_pkg_auto_update() { + local tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}" "${TERMUX_PKG_UPDATE_TAG_TYPE}")" + if grep -qP "^lxml-${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then + termux_pkg_upgrade_version "$tag" + else + echo "WARNING: Skipping auto-update: Not stable release($tag)" + fi +} + +termux_step_pre_configure() { + export STATIC_DEPS=true + export TERMUX_CONFIGURE_CMD_EXTRA="--build=x86_64-linux-gnu --host=$TERMUX_HOST_PLATFORM" + + export CFLAGS+=" -fPIC" +}