Commit Graph

11 Commits

Author SHA1 Message Date
Maxython d502e7489d scripts(build-package.sh): fix on device compilation of packages when force building and revert `-f` flag behaviour
- Reverted behviour of `-f` flag changed in b9b5987 and only force build current package instead of dependencies.
- Added a  new `-F` flag to force build current package and dependencies as well.
- If both `-I` and `-F` flags are passed and dependencies cannot be compiled on device, i.e `$TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED` is set to `true` in `build.sh` of package, then they will be downloaded instead.
- If only `-F` flag is passed without the `-I` flag, and building on device is not supported, then building with fail with error.
- The `$TERMUX_BUILD_PACKAGE_CALL_DEPTH` variable will be used to track depth of recursive calls to `build-package.sh`.
- The file at `$TERMUX_BUILD_PACKAGE_CALL_BUILT_PACKAGES_LIST_FILE_PATH` will be used to track list of packages and their dependencies that have been compiled at any instant by recursive calls to `build-package.sh`.
- Added `scripts/utils/package/package.sh` to store package utils. The `pacakge__is_package_version_built()` method can be used to check if a certain package version has been built. In future this should include `$TERMUX_APP_PACKAGE` as well.

Co-authored-by: agnostic-apollo <agnosticapollo@gmail.com>
Co-authored-by: Maxython <mixython@gmail.com>
2023-01-03 20:06:03 +05:00
Chongyun Lee ca3322bf31
fix(scripts): bug in termux_step_get_dependencies 2022-12-04 18:53:50 +01:00
agnostic-apollo b9b5987319 fix(build-package.sh): Ensure dependency packages are force rebuilt as well if `-f` is passed 2022-07-28 15:27:20 +05:00
agnostic-apollo cd2928cbe1 fix(build-package.sh): Do not use dependencies while building from repo if it hosts packages built for a different package name than TERMUX_APP_PACKAGE 2022-07-28 15:27:20 +05:00
agnostic-apollo 0275d9bff3 changed(scripts|main/termux-tools): Use TERMUX_APP_PACKAGE_MANAGER instead of TERMUX_MAIN_PACKAGE_FORMAT
Make changes as per new design implemented in termux/termux-app@b950efec and termux/termux-app#2740

The package build and termux-tools scripts use current package manager for custom logic. The `termux-tools/termux-setup-package-manager` script has been added that will now be used to provide backward compatibility for termux-app `< 0.119.0` (when its released) and validate the package manager. It will also ensure the variable in not unset to prevent `unbound variable` errors if `set -u` is being used by calling scripts.

Closes #10782
2022-05-23 12:14:55 +05:00
Henrik Grimler 59f1c7b183
Revert "feat(ghc): enable cross-compiling haskell packages on CI"
This will need some more work.  Currently
termux_create_haskell_debscripts is run for all packages, even
non-haskell ones, which causes errors in postinst and prerm scripts in
an ugly way.

This reverts commit dc2474b2c2.
2022-03-09 07:40:36 +01:00
Aditya Alok dc2474b2c2 feat(ghc): enable cross-compiling haskell packages on CI
- `termux_setup_ghc_cross_compiler` should not be called by build.sh, as it installs cross-compiler
in $TERMUX_PREFIX (otherwise ghc adds wrong `rpaths` to built libs and executables)

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-09 10:01:57 +09:00
Maxython 465159a72e
build-package.sh: change logic for package manager selection to be more stable
termux_step_setup_variables: added logic with TERMUX_PACKAGE_FORMAT
for easier compilation.
2022-02-11 22:38:40 +01:00
Ivan Max ece5419863
build-package.sh: setting up to work with pacman (#8451) 2022-01-14 15:16:37 +02:00
Leonid Pliushch 07852c874b
build-package.sh: allow to select package formats between debian and pacman 2021-09-10 19:55:28 +03:00
Henrik Grimler e34ae5da03 build-package: mv code for getting deps out of step_start_build
Into new function termux_step_get_dependencies.
2021-08-21 20:59:24 +02:00