- Now we use cabal (comparable to rust's cargo) to build binary packages.
Reason:
- Haskell's cabal packaging system is like rust's cargo. Every packages
depends upon some specific version of other library. Hence, it is
hard to maintain each and every version.
- Patching packages so that they use latest of dependencies breaks
compatibility.
Benefits:
- Enables building very large packages like `pandoc`.
- Reduces disk space used.
- Lesser packages to maintain.
Signed-off-by: Aditya Alok <alok@termux.dev>
and `posix_spawnp` defined in libandroid-spawn.
There are other symbols defined in libandroid-spawn, but hopefully this
is sufficient for the purpose of guarding underlinking.
Reference: https://github.com/termux/termux-packages/issues/14623
The pattern `for lib in "$(find [...])"` does not work if `find` matches
more than one file. Double quotes around `$(...)` must be removed.
This bug was introduced in 849112f9e7, and
the check did not work correctly from then on, until now.
After upgrading grep from 3.7 to 3.8 it now warns when pattern
contains unnecessary escaped characters, like:
grep: warning: stray \ before !
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before !
grep: warning: stray \ before /
grep: warning: stray \ before !
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before !
grep: warning: stray \ before /
Silence these warnings by fixing our termux_step_massage function.
This caused undefined symbols to go undetected in libzmq in latest
build. Probably more packages are affected, should do a rebuild of
all packages again to check for undefined symbols.
Missed this when changing back and forth from having the code in a
subfunction instead.
This caused termux_step_massage to return prematurely, and subpackages
to not be generated (which is how I noticed it).
Fixes commit 849112f9e7 ("scripts(massage): remove symbol loop in
undefined syms check").
Building packages that use libtool for linking libraries has issues
with ndk-r23 (https://github.com/android/ndk/issues/1614). This check
makes sure that the built libraries do not give an error like
CANNOT LINK EXECUTABLE "tesseract": cannot locate symbol "__extenddftf2" referenced by "/data/data/com.termux/files/usr/lib/libtesseract.so"...
once used on device. In https://github.com/android/ndk/issues/1614 it
seemed like arm gave false positives and needed special consideration,
but when I tested it again today the same false positives do not occur
in built libraries, so no "if arm then .." workaround has been added
for now.
This variable will disable shebang fixing during massage step. Normally
such fix shouldn't be disabled, but there are packages where it causes
a huge overhead and is not needed anyway.
Packages that are known to be affected by overhead and take long time
for building:
* papirus-icon-theme from x11-packages
By moving the checks we can make the function more general, and
thereby re-use it for creating subpackages and potentially hostbuild
tools packages.
tests: building libandroid-support and build-essential.
Variables
TERMUX_PKG_PLATFORM_INDEPENDENT
TERMUX_DEBUG
TERMUX_PKG_HAS_DEBUG
TERMUX_PKG_ESSENTIAL
TERMUX_SUBPKG_ESSENTIAL
TERMUX_PKG_NO_STATICSPLIT
TERMUX_PKG_BUILD_IN_SRC
TERMUX_PKG_FORCE_CMAKE
TERMUX_PKG_HOSTBUILD
should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.
build-package.sh should make decision based on variable's value but not on
whether it is set or empty.
%ci:no-build
Partial compatibility for on-device builds.
There is no guarantee that it will be possible to build all available
packages and built packages will have same reliability that cross-compiled
but should solve "self-hosting" problems as much as possible.