From dc9f2495816a530c41351d880c1d62ae270fc64e Mon Sep 17 00:00:00 2001 From: Maxython Date: Mon, 23 Sep 2024 23:26:16 +0300 Subject: [PATCH] testing --- gpkg/gobject-introspection/build.sh | 11 ++- gpkg/gobject-introspection/meson.build.patch | 13 +++ .../tools-meson.build.patch | 2 +- gpkg/llvm/build.sh | 87 ++++++++++--------- gpkg/python/build.sh | 17 +--- 5 files changed, 74 insertions(+), 56 deletions(-) create mode 100644 gpkg/gobject-introspection/meson.build.patch diff --git a/gpkg/gobject-introspection/build.sh b/gpkg/gobject-introspection/build.sh index c90db5b54..f0eed3056 100644 --- a/gpkg/gobject-introspection/build.sh +++ b/gpkg/gobject-introspection/build.sh @@ -8,12 +8,17 @@ 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 -" +#TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +#-Dpython=$TERMUX_PREFIX/bin/python3 +#" termux_step_pre_configure() { + qemu-aarch64 --version + exit 1 + + export PYTHONPATH="${PYTHONPATH}:${TERMUX_PYTHON_CROSSENV_PREFIX}/build/lib/python${TERMUX_PYTHON_VERSION}/site-packages" CPPFLAGS+="-I$TERMUX_PREFIX/include/python${TERMUX_PYTHON_VERSION} -I$TERMUX_PREFIX/include/python${TERMUX_PYTHON_VERSION}/cpython" } diff --git a/gpkg/gobject-introspection/meson.build.patch b/gpkg/gobject-introspection/meson.build.patch new file mode 100644 index 000000000..6c4ad133b --- /dev/null +++ b/gpkg/gobject-introspection/meson.build.patch @@ -0,0 +1,13 @@ +--- src/meson.build 2024-04-01 16:21:25.000000000 +0300 ++++ src/meson.build.patch 2024-09-25 23:39:47.744895572 +0300 +@@ -25,10 +25,6 @@ + error('Requires Python @0@, @1@ found.'.format(python_version_req, python_version)) + endif + +-if python_version.version_compare('>=3.12') +- pymod.find_installation(get_option('python'), modules: ['setuptools']) +-endif +- + cc = meson.get_compiler('c') + + project_c_args = [] diff --git a/gpkg/gobject-introspection/tools-meson.build.patch b/gpkg/gobject-introspection/tools-meson.build.patch index a96fe75bf..6bdfb61b2 100644 --- a/gpkg/gobject-introspection/tools-meson.build.patch +++ b/gpkg/gobject-introspection/tools-meson.build.patch @@ -9,7 +9,7 @@ -else - python_cmd = '/usr/bin/env python@0@'.format(python.language_version().split('.')[0]) -endif -+python_cmd = '@TERMUX_PREFIX@/bin/env ' + python.path() ++python_cmd = '@TERMUX_PREFIX@/bin/env @TERMUX_PREFIX@/bin/python3' tool_output = [] foreach tool : tools 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 -}