From ac3a9354b29a20dcff8f33740e564dcffa582612 Mon Sep 17 00:00:00 2001 From: Maxython Date: Mon, 23 Sep 2024 23:26:16 +0300 Subject: [PATCH] testing --- .github/workflows/build.yml | 7 ++- get-build-package.sh | 2 +- gpkg/gobject-introspection/build.sh | 1 + gpkg/llvm/build.sh | 87 ++++++++++++++++------------- gpkg/python/build.sh | 17 ++---- 5 files changed, 60 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9730e70f..3432302bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,12 @@ jobs: fetch-depth: 1000 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.2.0 + run: | + sudo apt update + yes | sudo apt install qemu-user qemu-user-static binfmt-support + sudo update-binfmts --enable qemu-aarch64 + sudo update-binfmts --enable qemu-arm + docker run --rm --privileged tonistiigi/binfmt --install all - name: Get files from termux-packages repository run: ./get-build-package.sh diff --git a/get-build-package.sh b/get-build-package.sh index 0212bc94e..69cf69ad0 100755 --- a/get-build-package.sh +++ b/get-build-package.sh @@ -2,7 +2,7 @@ # Script that installs build-package.sh to compile glibc packages -BRANCH="master" +BRANCH="termux_step_get_dependencies_python.sh" git clone --depth 1 -b ${BRANCH} --single-branch https://github.com/termux/termux-packages.git diff --git a/gpkg/gobject-introspection/build.sh b/gpkg/gobject-introspection/build.sh index c90db5b54..96b27a65f 100644 --- a/gpkg/gobject-introspection/build.sh +++ b/gpkg/gobject-introspection/build.sh @@ -8,6 +8,7 @@ TERMUX_PKG_SRCURL=https://download.gnome.org/sources/gobject-introspection/${TER TERMUX_PKG_SHA256=a1df7c424e15bda1ab639c00e9051b9adf5cea1a9e512f8a603b53cd199bc6d8 TERMUX_PKG_DEPENDS="libgirepository-glibc, python-glibc" TERMUX_PKG_BUILD_DEPENDS="coreutils-glibc" +TERMUX_PKG_PYTHON_COMMON_DEPS="setuptools" TERMUX_PKG_MESON_NATIVE=true TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -Dpython=$TERMUX_PREFIX/bin/python3 diff --git a/gpkg/llvm/build.sh b/gpkg/llvm/build.sh index da16b0d20..e2252febf 100644 --- a/gpkg/llvm/build.sh +++ b/gpkg/llvm/build.sh @@ -25,47 +25,56 @@ termux_step_post_get_source() { done } -termux_step_configure() { - termux_setup_cmake - termux_setup_ninja - - CFLAGS=${CFLAGS/-g /-g1 } - CXXFLAGS=${CXXFLAGS/-g /-g1 } - - local LLVM_TARGET_ARCH="X86" - if [ $TERMUX_ARCH = "arm" ]; then - LLVM_TARGET_ARCH="ARM" - elif [ $TERMUX_ARCH = "aarch64" ]; then - LLVM_TARGET_ARCH="AArch64" - fi +#termux_step_configure() { +# termux_setup_cmake +# termux_setup_ninja +# +# CFLAGS=${CFLAGS/-g /-g1 } +# CXXFLAGS=${CXXFLAGS/-g /-g1 } +# +# local LLVM_TARGET_ARCH="X86" +# if [ $TERMUX_ARCH = "arm" ]; then +# LLVM_TARGET_ARCH="ARM" +# elif [ $TERMUX_ARCH = "aarch64" ]; then +# LLVM_TARGET_ARCH="AArch64" +# fi +# +# cmake ${TERMUX_PKG_SRCDIR} \ +# -G Ninja \ +# -DCMAKE_BUILD_TYPE=Release \ +# -DCMAKE_FIND_ROOT_PATH=$TERMUX_PREFIX \ +# -DCMAKE_INSTALL_DOCDIR=share/doc \ +# -DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \ +# -DCMAKE_SKIP_RPATH=ON \ +# -DLLVM_BINUTILS_INCDIR=$TERMUX_PREFIX/include \ +# -DLLVM_BUILD_DOCS=ON \ +# -DLLVM_BUILD_LLVM_DYLIB=ON \ +# -DLLVM_BUILD_TESTS=ON \ +# -DLLVM_ENABLE_BINDINGS=OFF \ +# -DLLVM_ENABLE_FFI=ON \ +# -DLLVM_ENABLE_RTTI=ON \ +# -DLLVM_ENABLE_SPHINX=ON \ +# -DCMAKE_SYSTEM_NAME=Linux \ +# -DLLVM_HOST_TRIPLE=$TERMUX_HOST_PLATFORM \ +# -DCMAKE_LIBRARY_ARCHITECTURE=$TERMUX_HOST_PLATFORM \ +# -DCMAKE_SYSTEM_PROCESSOR=$LLVM_TARGET_ARCH \ +# -DCMAKE_C_COMPILER=$CC \ +# -DCMAKE_CXX_COMPILER=$CXX \ +# -DLLVM_INCLUDE_BENCHMARKS=OFF \ +# -DLLVM_INSTALL_UTILS=ON \ +# -DLLVM_LINK_LLVM_DYLIB=ON \ +# -DLLVM_USE_PERF=ON \ +# -DSPHINX_WARNINGS_AS_ERRORS=OFF +#} - cmake ${TERMUX_PKG_SRCDIR} \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_FIND_ROOT_PATH=$TERMUX_PREFIX \ - -DCMAKE_INSTALL_DOCDIR=share/doc \ - -DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \ - -DCMAKE_SKIP_RPATH=ON \ - -DLLVM_BINUTILS_INCDIR=$TERMUX_PREFIX/include \ - -DLLVM_BUILD_DOCS=ON \ - -DLLVM_BUILD_LLVM_DYLIB=ON \ - -DLLVM_BUILD_TESTS=ON \ - -DLLVM_ENABLE_BINDINGS=OFF \ - -DLLVM_ENABLE_FFI=ON \ - -DLLVM_ENABLE_RTTI=ON \ - -DLLVM_ENABLE_SPHINX=ON \ - -DCMAKE_SYSTEM_NAME=Linux \ - -DLLVM_HOST_TRIPLE=$TERMUX_HOST_PLATFORM \ - -DCMAKE_LIBRARY_ARCHITECTURE=$TERMUX_HOST_PLATFORM \ - -DCMAKE_SYSTEM_PROCESSOR=$LLVM_TARGET_ARCH \ - -DCMAKE_C_COMPILER=$CC \ - -DCMAKE_CXX_COMPILER=$CXX \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_USE_PERF=ON \ - -DSPHINX_WARNINGS_AS_ERRORS=OFF +# =TEST= +termux_step_configure() { + echo "TESTING" +} +termux_step_make() { + echo "TESTING" } +# ====== termux_step_post_make_install() { ( diff --git a/gpkg/python/build.sh b/gpkg/python/build.sh index ca3c24b3d..a4e34b9bc 100644 --- a/gpkg/python/build.sh +++ b/gpkg/python/build.sh @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="custom" TERMUX_PKG_LICENSE_FILE="LICENSE" TERMUX_PKG_MAINTAINER="@termux-pacman" TERMUX_PKG_VERSION=3.12.6 +TERMUX_PKG_REVISION=1 _MAJOR_VERSION="${TERMUX_PKG_VERSION%.*}" _SETUPTOOLS_VERSION=69.5.1 TERMUX_PKG_SRCURL=(https://www.python.org/ftp/python/${TERMUX_PKG_VERSION%rc*}/Python-${TERMUX_PKG_VERSION}.tar.xz @@ -13,6 +14,7 @@ TERMUX_PKG_SHA256=(1999658298cf2fb837dffed8ff3c033ef0c98ef20cf73c5d5f66bed5ab896 TERMUX_PKG_DEPENDS="libbz2-glibc, libexpat-glibc, gdbm-glibc, libffi-glibc, libnsl-glibc, libxcrypt-glibc, openssl-glibc, zlib-glibc" TERMUX_PKG_BUILD_DEPENDS="sqlite-glibc, mpdecimal-glibc, llvm-glibc" TERMUX_PKG_PROVIDES="python3-glibc" +TERMUX_PKG_RM_AFTER_INSTALL="glibc/lib/python${_MAJOR_VERSION}/site-packages/*/" TERMUX_PKG_BUILD_IN_SRC=true termux_step_pre_configure() { @@ -62,7 +64,6 @@ termux_step_make_install() { } termux_step_post_make_install() { - echo README.txt > ${TERMUX_PKG_SRCDIR}/setuptools-files ( export TERMUX_PKG_SETUP_PYTHON=true export TERMUX_SKIP_DEPCHECK=true @@ -70,17 +71,7 @@ termux_step_post_make_install() { termux_step_get_dependencies_python cd ${TERMUX_PKG_SRCDIR}/setuptools-${_SETUPTOOLS_VERSION} - pip install --no-deps . --prefix $TERMUX_PREFIX - - pip show -f setuptools | grep "^ " | sed 's/ //' \ - | awk -F '/' '{printf $1 "\n"}' | uniq >> ${TERMUX_PKG_SRCDIR}/setuptools-files + pip install --no-deps . --target ${TERMUX_PKG_SRCDIR}/setuptools + cp -r ${TERMUX_PKG_SRCDIR}/setuptools/setuptools/_distutils ${TERMUX_PYTHON_HOME}/distutils ) } - -termux_step_post_massage() { - for i in glibc/lib/python${_MAJOR_VERSION}/site-packages/*; do - if ! grep -q "^${i##*/}$" ${TERMUX_PKG_SRCDIR}/setuptools-files; then - rm -fr $i - fi - done -}