|
| 1 | +TERMUX_PKG_HOMEPAGE=https://github.com/google/brotli |
| 2 | +TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (Python bindings)" |
| 3 | +TERMUX_PKG_LICENSE="MIT" |
| 4 | +TERMUX_PKG_MAINTAINER="@termux" |
| 5 | +TERMUX_PKG_VERSION=1.1.0 |
| 6 | +TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz |
| 7 | +TERMUX_PKG_SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff |
| 8 | +TERMUX_PKG_DEPENDS="python, python-pip" |
| 9 | +TERMUX_PKG_PYTHON_COMMON_DEPS="wheel" |
| 10 | +TERMUX_PKG_BUILD_IN_SRC=true |
| 11 | +TERMUX_PKG_AUTO_UPDATE=true |
| 12 | + |
| 13 | +TERMUX_PYTHON_VERSION=3.12 |
| 14 | +TERMUX_PYTHON_HOME=$TERMUX_PREFIX/lib/python${TERMUX_PYTHON_VERSION} |
| 15 | +TERMUX_PYTHON_CROSSENV_PREFIX=$TERMUX_PKG_BUILDDIR/python${TERMUX_PYTHON_VERSION/./}-crossenv-prefix-$TERMUX_ARCH |
| 16 | +TUR_AUTO_AUDIT_WHEEL=true |
| 17 | +TUR_AUDIT_WHEEL_NO_LIBS=true |
| 18 | + |
| 19 | +source $TERMUX_SCRIPTDIR/common-files/tur_build_wheel.sh |
| 20 | + |
| 21 | +termux_step_configure() { |
| 22 | + mkdir -p $TERMUX_PKG_TMPDIR/_fake_bin |
| 23 | + sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \ |
| 24 | + -e "s|@COMPILER@|$(command -v ${CC})|g" \ |
| 25 | + "$TERMUX_PKG_BUILDER_DIR"/wrapper.py.in \ |
| 26 | + > $TERMUX_PKG_TMPDIR/_fake_bin/"$(basename ${CC})" |
| 27 | + chmod +x $TERMUX_PKG_TMPDIR/_fake_bin/"$(basename ${CC})" |
| 28 | + export PATH="$TERMUX_PKG_TMPDIR/_fake_bin:$PATH" |
| 29 | + |
| 30 | + # ERROR: ./lib/python3.12/site-packages/_brotli.cpython-312.so contains undefined symbols: |
| 31 | + # 31: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND log2 |
| 32 | + LDFLAGS+=" -lm" |
| 33 | + LDFLAGS+=" -Wl,--no-as-needed,-lpython${TERMUX_PYTHON_VERSION}" |
| 34 | +} |
| 35 | + |
| 36 | +termux_step_make() { |
| 37 | + : |
| 38 | +} |
| 39 | + |
| 40 | +termux_step_make_install() { |
| 41 | + pip install . --prefix=$TERMUX_PREFIX -vv --no-build-isolation --no-deps |
| 42 | +} |
0 commit comments