Commit Graph

560 Commits

Author SHA1 Message Date
Arun 73948c0b62 upgpkg(main/cmake): update to 3.24.1 2022-08-27 12:27:35 +05:30
Jia Yuan Lo 035c918418
scripts: add termux_setup_gnu_as_23c for NDK r25 (#11615)
NDK r25 has removed GNU Assembler (GAS). Removal of GAS introduced a number of build issues.
The most prominent is:
/usr/bin/as: unrecognized option '-EL'

Some options to solve this:
1. Disable building custom assembly and suffer performance penalty
2. Hand rewrite the custom assembly to be LLVM compatible
3. Wait for upstream to write LLVM compatible assembly (openssl, openssl-1.1)
4. Bring back GAS from NDK r23c

In this commit, GAS is brought back as a separate toolchain instead of following NDK r23c file hierarchy.
We pass "--gcc-toolchain=GAS_TOOLCHAIN_DIR" to NDK r25 clang to detect.
Packages only have to add "termux_step_gnu_as_23c" to build.sh to enable GAS.
In the future, we expect packages should follow option 3 more than option 4 as that is a last resort.

This commit also bumps revision for packages that rely (or previously rely) on "-fno-integrated-as":
hors, libffi, libgcrypt, libpixman, openssl, openssl-1.1

Co-authored-by: Henrik Grimler <grimler@termux.dev>
Co-authored-by: Chongyun Lee <45286352+licy183@users.noreply.github.com>
2022-08-24 23:17:08 +08:00
MedzikUser 188397112d
golang: update to 1.19 2022-08-23 12:51:01 +02:00
2096779623 6a6ff5716d
licenses: install license file for X11
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-08-23 08:44:57 +02:00
Henrik Grimler 960026cc47
scripts: bump toolchain after termux-elf-cleaner fix 2022-08-18 17:01:50 +02:00
Chongyun Lee d32ad10f1f
scripts/toolchains: set api-level for elf cleaner 2022-08-18 22:38:53 +08:00
Henrik Grimler 5070174c4d
scripts(massage): fix undefined symbols grep pattern
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.
2022-08-14 09:17:07 +02:00
Jia Yuan Lo c2f84f4118
scripts(toolchain): dont include NDK vulkan headers 2022-08-13 12:21:55 +02:00
Butta c621ca0437
fixup(termux_setup_swift): TERMUX_STANDALONE_TOOLCHAIN is no longer defined till after the host build
I checked all 30 packages and the CMake setup script that use this variable, and this is
the only one that needed to be changed.
2022-08-13 12:21:15 +02:00
Henrik Grimler d6ad4c50b5
scripts(toolchain): add possibility to install android NDK 25
Same ndk-patches and termux_step_setup_toolchain can be used as for
NDK 23c it seems.
2022-08-13 12:20:04 +02:00
Henrik Grimler ef7cb78563
scripts(toolchain): remove termux_setup_standalone_toolchain func
Run everything in termux_setup_toolchain_23c instead.  There is no
need to have two functions.
2022-08-13 12:20:02 +02:00
Henrik Grimler e7f4ad8b6d
scripts: rename termux_step_setup_toolchain to indicate NDK version
And keep ndk-patches in 23c/ subdirectory.  Run
termux_step_setup_toolchain_23c only if TERMUX_NDK_VERSION equals 23c.

This is a step towards having the possibility to use different NDK
versions.  Using a different NDK version than the one termux
officially supports should *really* not be done except for
testing/debug/development reasons, or if it is strictly necessary to
be able to compile a program (for example for packages that need a
fortran compiler, which at the moment is only supported with old
gcc-using NDKs).
2022-08-13 12:19:59 +02:00
Henrik Grimler 5df676bf3a
scripts(setup_toolchain): keep toolchain revision in setup function
Having it in termux_step_start_build is confusing, have it next to
related code instead.
2022-08-13 12:19:54 +02:00
Henrik Grimler b044a49d0f
scripts: export TERMUX_PACKAGE_FORMAT and TERMUX_PACKAGE_MANAGER
Otherwise these variables is not visible to child shells.  This caused
configure step of termux-tools to always use debian/apt combination,
since it checks for variables among environmental variables and they
were not visible.
2022-08-10 09:00:33 +02:00
Henrik Grimler 924b664573
scripts: also add built subpkgs to $TERMUX_BUILT_PACKAGES_DIRECTORY
Otherwise a package with subpackages might be built many times if
packages that depend on a it, or its subpackages, are modified.
2022-08-09 11:15:30 +02:00
Chongyun Lee 78443182a0
build-scripts: fix termux_step_create_subpkg_debscripts 2022-08-07 10:00:42 +02:00
Henrik Grimler 9641ff5fba
scripts(massage): use $READELF instead of hardcoding llvm-readelf 2022-08-02 11:48:51 +02:00
Henrik Grimler 792ccc6ca3
fix(scripts,step_massage): continue in for loop, not return
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").
2022-08-01 10:59:43 +02:00
Henrik Grimler 849112f9e7
scripts(massage): remove symbol loop in undefined syms check
Instead create a (rather large) grep pattern, and call egrep only
once.
2022-07-31 20:12:54 +02:00
Henrik Grimler 0de0a8dd52
scripts(termux_error_exit): echo with -e to allow multiline messages 2022-07-31 20:12:51 +02:00
Henrik Grimler 146a5fb9c8
scripts(start_build): fix typo
Fixes 8129569eef ("scripts: fix for building on device")
2022-07-31 19:00:35 +02:00
Li Chong Yun 8129569eef
scripts: fix for building on device
The pre-built binary cannot execute on device. Use the one from repo instead.
2022-07-31 18:56:55 +02:00
Henrik Grimler 5ab6d52854
scripts(massage): specify target api level when running elf-cleaner
Termux-elf-cleaner 2.0.0 added the possibility to specify target api
level with --api-level, instead of just during compile time.
2022-07-30 16:44:07 +02:00
Henrik Grimler 5d07daf772
scripts(start_build.sh): download pre-compiled termux-elf-cleaner
CI now compiles the program on every release, so lets download that
instead of the source in termux_step_start_build.sh.
2022-07-30 16:44:05 +02:00
Lucinda May Phipps 7e2daf81e1 termux-step-massage: faster empty package check 2022-07-28 15:27:20 +05:00
agnostic-apollo f598de4ae4 fix(termux_step_massage): Fix typo in 034f29eb 2022-07-28 15:27:20 +05:00
agnostic-apollo 571db28a3d termux_step_configure_cmake: Revert CMAKE_INSTALL_LIBDIR old behaviour changed in 2af00064
Absolute paths are still allowed in `DCMAKE_INSTALL_LIBDIR` as per https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Different packages have different way of handling `DCMAKE_INSTALL_LIBDIR`. The `libprotobuf` is appending an absolute path to `build` directory (#10068), while `libjpeg-turbo` is not appending a relative `lib` path to `DCMAKE_INSTALL_PREFIX` and instead  appending to `build` directory and so all the lib files stay at `/home/builder/.termux-build/libjpeg-turbo/build/lib` and hence won't get added to the `deb`, which results in `openjdk-17` failing if `-i` is not passed to `build-package.sh`, since it can't find `libjpeg.so` with `-L${TERMUX_PREFIX}/lib` after compilation from source, unless `-L$TERMUX_TOPDIR/libjpeg-turbo/build/lib` is passed.

Considering that most packages would likely be considering an absolute path passed in `DCMAKE_INSTALL_LIBDIR` to actually be absolute, the default behaviour should be reverted, specially considering it is what's been working, otherwise lot of packages would need testing, like from https://github.com/termux/termux-packages/commit/9155acd040.

```
checking for which libjpeg to use... system
checking jpeglib.h usability... yes
configure: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!
checking jpeglib.h presence... no
checking for jpeglib.h... yes
configure: WARNING: jpeglib.h: proceeding with the compiler's result
configure: error: --with-libjpeg=system specified, but no libjpeg found
checking for jpeg_CreateDecompress in -ljpeg... no
configure exiting with result code 1
```

```
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/tjbench
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.a
-- Installing: /data/data/com.termux/files/usr/include/turbojpeg.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.a
-- Installing: /data/data/com.termux/files/usr/bin/rdjpgcom
-- Installing: /data/data/com.termux/files/usr/bin/wrjpgcom
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.ijg
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.md
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/example.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/tjexample.c
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/libjpeg.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/structure.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/usage.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/wizard.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/LICENSE.md
-- Installing: /data/data/com.termux/files/usr/share/man/man1/cjpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/djpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/jpegtran.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/rdjpgcom.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/wrjpgcom.1
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libjpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libturbojpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake
-- Installing: /data/data/com.termux/files/usr/include/jconfig.h
-- Installing: /data/data/com.termux/files/usr/include/jerror.h
-- Installing: /data/data/com.termux/files/usr/include/jmorecfg.h
-- Installing: /data/data/com.termux/files/usr/include/jpeglib.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/cjpeg
-- Installing: /data/data/com.termux/files/usr/bin/djpeg
-- Installing: /data/data/com.termux/files/usr/bin/jpegtran
...
2022-07-28 15:27:20 +05: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
Henrik Grimler bc0fa8e154 chore(scripts/*): add shebang to scripts that can be run
Most scripts are set up to just be sourced, but these ones can handle
being run as well. They have not had a shebang set though, use
/usr/bin/bash to ensure they work as intended.
2022-07-22 16:38:44 +02:00
Henrik Grimler 034f29eb0e scripts(massage): only suggest autoreconf if configure.{ac,in} exist 2022-07-22 16:38:44 +02:00
Chongyun Lee 90fda1305b chore: Move REPO-related variables to properties.sh 2022-07-11 15:43:24 +08:00
Uchiha Kakashi 82524e036d
termux_setup_python_crossenv: update to 1.3.0 2022-07-11 03:38:31 +08:00
Henrik Grimler 6cf9f35fac
scripts,ci(*): use termux.dev instead of termux.org
We are now mainly promoting and using termux.dev, so lets switch all
the urls.
2022-07-02 10:41:16 +02:00
Butta 458c71668c enhance(termux_setup_swift): add a config file to cross-compile Swift packages
Also, fix the checks for whether Swift is installed in the Termux app.
2022-06-25 22:55:36 +05:30
Butta a0f84bfd9a fix(termux_step_massage): use llvm-readelf instead, as that's what the NDK and Termux use 2022-06-25 22:55:36 +05:30
Henrik Grimler 5be1ac63f0
ci(setup-android-sdk.sh): update to ndk r23c 2022-06-23 20:29:28 +02:00
Butta b8bfe98f10 upgpkg(swift): 5.6.1 to 5.6.2
Also, add a termux_setup_swift() bash function and move downloading the prebuilt
Swift toolchain for linux there.
2022-06-16 21:31:13 +05:30
tjhexf 302bb99f06 golang: update to 1.18.3 2022-06-07 19:04:25 +05:30
Aditya Alok 3568da318c
scripts(build/termux_setup_meson): patch meson libintl check
- patch meson to always return true for libintl check

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-05-29 11:54:07 +05:30
Yaksh Bariya 009d9a9e98
fixup(termux_setup_cmake): update CMake version
See 2f60dadf60 where checksum was updated
but version wasn't
2022-05-29 10:36:51 +05:30
Yaksh Bariya 2f60dadf60
upgpkg(main/cmake): update to v3.23.2 2022-05-29 10:27:59 +05:30
Yaksh Bariya ad28dd2ad7
Revert "chore,scripts(termux_step_setup_variables): use main host instead of Cloudflare"
This reverts commit 4da820d32c.

Fixed now
2022-05-28 12:36:16 +05:30
Yaksh Bariya 4da820d32c
chore,scripts(termux_step_setup_variables): use main host instead of Cloudflare
Should be reverted as soon as @Grimler91 fixes the DNS/CNAME
configuration

Closes #10835
Closes #10836
2022-05-28 12:27:51 +05:30
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
Tee KOBAYASHI e91b7fa888 termux-services: Make `log/run` a regular file
so that it is populated properly before installing termux-services.
2022-05-16 08:13:54 +09:00
Tee KOBAYASHI daa043f4b8 mesa: Update to 22.0.3 2022-05-13 22:47:46 +09:00
Tee KOBAYASHI 15fe94ce97 golang: Update to 1.18.2 2022-05-11 19:36:24 +05:30
Yaksh Bariya ca4ed956a4
upgpkg(gn): update to 20220502 2022-05-05 17:35:31 +05:30
Aditya Alok 21353d954a
fix(setup ghc): cd to `TERMUX_SCRIPTDIR` before executing buildorder.py
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-25 22:18:06 +05:30