Commit Graph

468 Commits

Author SHA1 Message Date
Leonid Pliushch
82a78ca781
build-package.sh: fix undefined AR variable
Building metapackages doesn't involve setup of compiler toolchain,
so certain variables are not set. In general, it was not expected
that package archive generation will use utilities that come with
cross-compiler as this functionality should rely on utilities
installed by host package manager.

/home/builder/termux-packages/scripts/build/termux_step_create_debian_package.sh: line 49: AR: unbound variable
2021-12-04 10:37:55 +02:00
Tee KOBAYASHI
d36fd6b8f8 Globally set confvar gl_cv_func_wcrtomb_works=yes 2021-11-29 09:26:02 +01:00
Lucy Phipps
369d15f4ef
ndk-patches: disable AT_EACCESS
https://android.googlesource.com/platform/bionic.git/+/refs/tags/ndk-r23b/libc/bionic/faccessat.cpp#50
2021-11-29 07:58:58 +00:00
Yaksh Bariya
74a5fbc577
cmake: bump to 3.22.0 2021-11-28 16:05:05 +05:30
Yonle
6da988cb1a meson: Bump 0.90.1 2021-11-27 09:52:19 +05:30
xtkoba
7c228b846e
ndk-patches: Add IFTODT and DTTOIF to dirent.h (#8041)
ndk-patches: Add IFTODT and DTTOIF to dirent.h
2021-11-23 10:12:17 +01:00
Yaksh Bariya
4d27b8efbd
gn: Bump to latest 20211116 2021-11-22 07:09:18 +05:30
Henrik Grimler
96dd5b5f96
Remove unstable-repo from list of repos
It has been merged with main repo so no need to look for package
dependencies in it.
2021-11-14 20:58:36 +01:00
Butta
034874f693 build-package: switch the archiver for debian packages over to the one from the NDK, which gets on-device builds working again
Also, remove the binutils-gold dependency for on-device builds, since we switched
everything over to lld now, just like the latest NDK 23.
2021-11-14 12:42:51 +05:30
Oskar
a6b59d4792
golang: update to 1.17.3 (#7928) 2021-11-04 20:35:46 +01:00
Lucy Phipps
b612321109
librav1e: update to 0.5.0 2021-11-02 20:22:18 +00:00
Ivan Max
6aadac515d Fixed versions for pacman packages
Closes https://github.com/termux/termux-packages/pull/7919
2021-11-02 21:41:45 +02:00
Lucy Phipps
ee97e92bfa
ac_cv_func_endpwent=yes 2021-11-01 09:41:43 +00:00
Ian Hu
5a5c68fa27 update protoc-3.19.1-linux-x86_64.zip sha256 2021-10-29 11:13:45 +02:00
Leonid Pliushch
6572b28692
build-package.sh: introduce TERMUX_PKG_NO_SHEBANG_FIX
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
2021-10-25 12:52:36 +03:00
Henrik Grimler
0816c82b13
termux_get_repo_files: remove some identation
To make script easier to read. Also use local vars to not have to
repeat some of the long paths to RELEASE/PACKAGES files.
2021-10-24 18:46:34 +02:00
Henrik Grimler
8796b282e1 extract_dep_info: init. TERMUX_PKG_PLATFORM_INDEPENDENT to false
Otherwise we run into problems when building arch-independent packages
that depend on arch-dependent packages, for example perl packages like
parallel.  Before, when downloading the perl dependency it then
believed perl to be arch-independent.
2021-10-24 18:09:04 +02:00
Henrik Grimler
611c40a283 setup_toolchain: specify NM as well 2021-10-24 13:22:40 +02:00
Henrik Grimler
f167d07541
termux_step_setup_toolchain: export PKG_CONFIG and PKGCONFIG
Ghostscript uses the latter one in its configure script.
2021-10-24 08:03:58 +02:00
Henrik Grimler
d5ba6ecc6b toolchain: fix broken as symlinks in r23b
r23b was suppose to fix so that -fno-integrated-as worked again (which
libx265 needs for example), but the symlinks added point towards an
absolute path in /buildbot/src/android/ndk-release-r23 instead of to
../../bin/. Re-create symlinks with correct destination.
2021-10-23 15:57:11 +02:00
Lucy Phipps
2a62732791
termux-elf-cleaner: update to 1.10 2021-10-23 09:47:06 +01:00
Henrik Grimler
8c1a1b4ba5 termux_step_setup_toolchain: do not add prefix to pkg-config
And create the pkg-config wrapper inside termux_setup_toolchain.
2021-10-22 23:05:45 +02:00
Henrik Grimler
307ffe5a90 termux_setup_standalone_toolchain: remove one indentation level 2021-10-22 23:05:45 +02:00
Henrik Grimler
3f3e2ce49f termux_step_setup_toolchain: print info about applied ndk-patch 2021-10-22 23:05:45 +02:00
Henrik Grimler
a465f14c90 Update to use android-ndk r23 2021-10-22 23:05:45 +02:00
Henrik Grimler
a75de594ba
termux_setup_protobuf: update checksum 2021-10-21 08:39:45 +02:00
Ian Hu
b74407193e fix termux_setup_protobuf with new checksum 2021-10-10 17:49:20 +02:00
Oskar
374a950dae
golang: update to 1.17.2 (#7706) 2021-10-09 00:37:06 +03:00
Leonid Pliushch
653d72b8cf
build-package.sh: use cloudflare-backed package host 2021-10-08 23:54:38 +03:00
Leonid Pliushch
b984aaf99f
build-package.sh: subpackages should use TERMUX_SUBPKG_GROUPS 2021-09-28 18:24:07 +03:00
Ivan Max
5465f29528
build-package.sh: introduce TERMUX_PKG_GROUPS for pacman packaging format (#7609)
This metadata field allows to define groups to which the given packages belong.

See https://wiki.archlinux.org/title/Pacman#Installing_package_groups
2021-09-28 12:48:55 +03:00
Ivan Max
a522f80f0f
build-package.sh: correct version info for pacman package format (#7605) 2021-09-27 12:02:40 +03:00
Ivan Max
3f0a61c2f0
build-package.sh: pacman format: transform package version containing letters (#7597)
Example: 1.0.0a --> 1.0.0.a
2021-09-25 11:19:59 +03:00
Jeeva K
fc285d3366 update cpu_family to aarch64 accordingly 2021-09-24 14:00:18 +03:00
Henrik Grimler
26da480d36 build-package: mv code for creating llvm-config
After https://github.com/termux/termux-packages/commit/e34ae5da030d,
llvm-config was created before termux_step_get_dependencies, meaning
that it gets overwritten if libllvm is installed.

Fix this by creating llvm-config in a new function
termux_step_override_config_scripts, that is run right after
termux_step_get_dependencies.
2021-09-17 12:02:53 +02:00
Henrik Grimler
70ee9001e4 termux_setup_protobuf: fix checksum after protobuf update 2021-09-16 22:01:20 +02:00
Yaksh Bariya
5c242cdbea gn: Bump to latest commit 2021-09-16 18:53:22 +01:00
Ivan Max
925273464b
build-package.sh: avoid dashes in version field for pacman package format (#7525) 2021-09-14 12:36:23 +03:00
Oskar
8a780c7c7e
golang: upgrade to 1.17.1 (#7416) 2021-09-13 17:50:02 +01: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
1c272f516b build-package: use xz compression for control archives (again)
All packages that have conffiles, and a gz compressed control.tar.gz,
currently fails to install on arm if the deb is built locally or
downloaded and then installed with `apt install
./foo_1.0_arm.deb`. The error looks like:

    $ apt install ./tmp/foo.deb
    Reading package lists... Error!
    E: Tar checksum failed, archive corrupted
    E: Could not read meta data from
/data/data/com.termux/files/home/tmp/foo.deb
    E: The package lists or status file could not be parsed or opened.

If the package does not have conffiles, or if xz compression is used,
everything works. Let's change back to xz compression for all new and
updated packages for now to workaround this issue.

Even if `apt install ./foo.deb` fails the deb can still be installed
with `dpkg -i ./foo.deb` (seems dpkg does not do the same checksum
check?).
2021-09-05 21:35:12 +02:00
YAKSH BARIYA
2d38944910
new package: gn (#7290) 2021-09-03 20:46:03 +03:00
Henrik Grimler
e6239bb81c build-package: delete old $PREFIX ealier in build
Currently there is a problem building packages that use *-config
scripts (for example gnupg), we are creating a
/bin/sh->/data/data/com.termux/files/usr/bin/sh symlink so that the
shebang for the scripts can be interpreted, but after
ecd214881a ("build-package: add new arg -c for "continue build"") the
symlink was deleted in termux_step_get_dependencies.
2021-09-03 17:56:57 +02:00
Butta
da42afeb7a termux_step_patch_package: apply patches in alphabetical order
Before 32c67fa, patches were applied in alphabetical order, which some packages
like swift relied on, so go back to that.
2021-09-02 21:13:58 +05:30
Yaksh Bariya
c70f3b4efa cmake: Bump to 3.21.2 2021-09-01 21:56:25 +05:30
Henrik Grimler
32c67fa030 termux_step_patch_package: add support for on device patches
Name a patch *.patch.ondevice for it to only be applied when building
on device.

This can be useful if for example a tool for building documentation is
missing on device, or if a tool needed during build (but not runtime)
uses something that triggers selinux, fdsan or some other android
security thing.
2021-09-01 11:12:24 +02:00
Henrik Grimler
b782c7da0e toolchain: add -fPIC to CPPFLAGS for i686
When adding this, we go from compiling with

  /home/builder/.termux-build/_cache/android-r21d-api-24-v4/bin/clang++ [...] -mrelocation-model pic -pic-level 2 -pic-is-pie [...]

to

  /home/builder/.termux-build/_cache/android-r21d-api-24-v5/bin/clang++ [...] -mrelocation-model pic -pic-level 2 [...]

Before, we got a warning when compiling libandroid-spawn:

  /home/builder/.termux-build/_cache/android-r21d-api-24-v4/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: warning: shared library text segment is not shareable

and trying to use a program linked against libandroid-spawn gave an
error, see
https://github.com/termux/termux-packages/issues/7215#issuecomment-906154438
the Without this, libraries might end up with text relocations. For
some reason it does not seem to be an issue on the other arches.

%ci:no-build
2021-08-27 10:02:20 +02:00
Henrik Grimler
b5821cbf80 termux_step_setup_build_folders: create more cache folders
Should have been added in 05728b58e5.
2021-08-25 22:38:00 +02:00
Henrik Grimler
05728b58e5 termux_get_repo_files: do not create folders
This has already been done in termux_step_setup_build_folders. Doing
it here causes problems, after
ecd214881a
as BUILDDIR now might be SRCDIR, which should
not be created as it breaks zip extraction.
2021-08-25 21:41:56 +02:00
Henrik Grimler
6445645d7e build-package: mv code for setting up src and build to to its own function
%ci:no-build
2021-08-24 21:40:46 +02:00
Henrik Grimler
12e395d3a9 step_configure_cmake: mv cmake and ninja setup functions to step_configure
Only keep actual configure steps in termux_step_configure_cmake. This
way we can skip termux_step_configure_cmake on a continued build.
2021-08-24 21:40:46 +02:00
Henrik Grimler
3407018962 build-package: error if hostbuilt tools are missing 2021-08-24 21:40:46 +02:00
Henrik Grimler
ecd214881a build-package: add new arg -c for "continue build"
As replacement for TERMUX_PKG_QUICK_REBUILD. Running
./build-package.sh -c <package> starts a build for <package>, but does
not extract and patch the source from scratch. Instead it sets up the
build variables and starts from termux_step_make.

When working on a big package that can take hours to build it is
convenient to be able to build until there is an error, then apply
some new patch (manually) to the source, and then continue from where
the build failed.
2021-08-24 21:40:46 +02:00
Henrik Grimler
4f8d054066 Revert "termux_step_create_datatar.sh: add data/ to tar instead of ./"
Unfortunately this does not play nicely with aptly, see
https://github.com/termux/termux-packages/pull/7335#issuecomment-904202191.

This reverts commit b7e6ef99702aea61cd8baedd0c7ef315c35ab30c.
2021-08-24 13:30:52 +02:00
Henrik Grimler
c5e4480515 Revert "termux_create_subpackages: add data/ to tar instead of ./"
Unfortunately this does not play nicely with aptly, see
https://github.com/termux/termux-packages/pull/7335#issuecomment-904202191.

This reverts commit b8e2bdf853.
2021-08-24 13:30:20 +02:00
Henrik Grimler
b8e2bdf853 termux_create_subpackages: add data/ to tar instead of ./
Follow-up on b7e6ef99702aea61cd8baedd0c7ef315c35ab30c, forgot about
the subpackages in that one.
2021-08-24 07:05:13 +02:00
Henrik Grimler
23530a540c build-package: create timestamp file after get_dependencies
Fixes issue introduced in e34ae5da03.
2021-08-21 22:37:51 +02:00
Henrik Grimler
23e760143b termux_step_start_build: get llvm version in standard way
And fix indentation, and remove echo of llvm version.
2021-08-21 21:04:43 +02:00
Henrik Grimler
0c8a398d0e termux_step_start_build: remove some extra spaces 2021-08-21 20:59:24 +02: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
Henrik Grimler
2c70621a98 build-package: rename TERMUX_DEBUG to TERMUX_DEBUG_BUILD
To make it more self-explanatory.
2021-08-21 20:55:57 +02:00
Henrik Grimler
ea1772da55 termux_step_setup_variables: sort variables alphabetically 2021-08-21 20:54:44 +02:00
Oskar
ed869e42dc
golang: revert to 1.16 (#7373)
Issue: https://github.com/termux/termux-packages/issues/7356
2021-08-21 16:58:27 +03:00
Oskar
a353946fc5
golang: update to 1.17 (#7345) 2021-08-17 23:31:46 +01:00
Henrik Grimler
ec352dd663 termux_download: don't warn if SKIP_CHECKSUM is passed 2021-08-17 15:22:46 +02:00
Henrik Grimler
bd6bc93daf termux_step_start_build: strip prefixed ./ if found
All, or at least most, of our debs contain "./" as a folder. This
causes problems when extracting on some systems, as ./ then is the
system root directory /, and tar cannot change the permissions of this
folder.  Trying to build on arch for example gives:

    tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
    tar: Exiting with failure status due to previous errors

The issue appeared on arch somewhat recently, maybe with tar 1.33. To
avoid having to rebuild all packages we now handle both data.tar.xz
types, with prefixed ./, and without.

Also remove some indentation levels while we are at it.
2021-08-17 15:22:18 +02:00
Henrik Grimler
854bd813f4 termux_step_create_datatar.sh: add data/ to tar instead of ./
This avoids "./" being part of the tar. "./" translates to the
systemroot / when we extract, and this is problematic since tar cannot
change permissions and ownerships of this folder. tar 1.34 gives an
error:

    tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
    tar: Exiting with failure status due to previous errors

when we try to extract the data.tar.xz.
2021-08-17 15:22:18 +02:00
MedzikUser
1edd9011d5
golang: update to 1.16.7 (#7308) 2021-08-15 00:59:49 +03:00
Henrik Grimler
4cdb5cdf5d licenses: Simplified BSD->BSD Simplified 2021-08-02 11:38:35 +02:00
Henrik Grimler
73bc3b19ca licenses: install license file for Simplified BSD
Simplified BSD's license also contain copyright information, so we
cannot use a generic license file.
2021-08-02 10:35:03 +02:00
Leonid Pliushch
51866303ed
build-package.sh: run termux-elf-cleaner for ./opt 2021-07-29 22:38:21 +03:00
Yaksh Bariya
ea9994dad7
cmake: Bump to 3.21.1 2021-07-29 17:20:15 +05:30
Leonid Pliushch
9c6960abd9
build-package.sh: retry download if packages list checksum is bad 2021-07-23 17:42:03 +03:00
Leonid Pliushch
f219100650
build-package.sh: retry if metadata signature is bad
Do not fail immediately if signature is bad. This often happens when metadata
has been downloaded during repository update. Usually signature becomes fixed
in a few seconds, so we can rather wait than abort build immediately.
2021-07-23 00:29:32 +03:00
Leonid Pliushch
3da76dfd64
golang: update to 1.16.6 2021-07-16 22:39:09 +03:00
Leonid Pliushch
165b741de8
cmake: update to 3.21.0 2021-07-16 22:01:03 +03:00
Butta
167739f5b8 nushell: try again to fix i686 build by exporting RUSTFLAGS earlier and adding a flag 2021-07-15 23:34:56 +05:30
Leonid Pliushch
4b8c077711
Revert "Merge pull request #7104 from thunder-coding/cache-godeps"
This reverts commit f6892c38d8, reversing
changes made to 4d9075fea3.
2021-07-10 17:00:18 +03:00
Yaksh Bariya
b8037128f3
termux_go_get: Do not override $GOPATH 2021-07-05 12:22:15 +05:30
Yaksh Bariya
92f1afaa54
Fix go cache reliability in some edge cases 2021-07-05 09:33:28 +05:30
Yaksh Bariya
40aef7e5ea
Move golang cache logic out of build.sh 2021-07-05 09:22:16 +05:30
Yaksh Bariya
73c1d3d83e Bump cmake to 3.20.5 2021-06-24 12:00:29 +03:00
Butta
1ce096c0ab cmake: update from 3.20.2 to 3.20.4 2021-06-17 09:37:45 +05:30
Suhan G Paradkar
0c103765f4
golang: update to 1.16.5 (#7020) 2021-06-16 16:49:39 +03:00
Henrik Grimler
c6914fccf7 termux_setup_protobuf: update sha256 2021-06-15 16:13:02 +02:00
Leonid Pliushch
c9e8d1cb2b
build-package.sh: use packages.termux.org when running with -I/-i options 2021-06-03 14:59:39 +03:00
Leonid Pliushch
09bfea7a17
remove cirrus ci configuration
Cirrus CI has huge startup delays when using high CPU configuration, which
happen due to limited availability of the community cluster resources.
Unfortunately we can't use lower CPU configuration for termux-packages
because llvm/rust/swift may hit timeout.

Probably we will have more benefits with using Github Actions even without
-I option supplied to build-package.sh
2021-05-19 18:12:24 +03:00
Leonid Pliushch
607103f807
fix ./scripts/build/ci/cirrus-ci_dispatcher.sh
Script was copied from x11-packages, so there were parts unsuitable for
termux-packages.
2021-05-19 17:46:54 +03:00
Leonid Pliushch
bf2c32cae1
add scripts for Cirrus CI
No automatic uploads to grimler.se currently.
2021-05-19 17:06:40 +03:00
Henrik Grimler
b3b5a3f35f mv checks from termux_step_create_datatar to termux_step_massage
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.
2021-05-16 20:08:37 +02:00
Henrik Grimler
a618264bb3 termux_step_handle_hostbuild: be more verbose when patching 2021-05-16 18:07:26 +02:00
Henrik Grimler
6d0883d177 termux_download_deb: add workaround for download of arch all pkgs
Aptly mixes the all debs into the folders for the other arches, unless
the all arch is explicitly added. This workaround tries to find the
package in the aarch64 Packages file if the all Packages file is not
found.
2021-05-14 11:58:09 +02:00
Leonid Pliushch
5c45d87234
build-package.sh: use Github Pages repositories for Unstable/X11 packages 2021-05-10 21:01:21 +03:00
Henrik Grimler
54975d7db5 ndk-headers: fix paths in utmp.h
And bump toolchain and ndk-sysroot. Also update patch offsets while we
are at it.
2021-05-07 08:28:05 +02:00
Henrik Grimler
a44289837e
termux_extract_dep_info: fix logic for subpackages (#6753)
Most packages have subpackages that are the same arch or
arch-independent compared to the parent package. Emscripten and its
subpackages emscripten-{binaryen,llvm} are an exception, the main
package are arch independent while the subpackages are not. To handle
this correctly we need to modify termux_extract_dep_info as done here.
2021-05-05 21:20:39 +02:00
Butta
f1d8495d04 cmake: update from 3.19.6 to 3.20.2 2021-05-02 13:53:13 +05:30
Leonid Pliushch
a92e355891
build-package.sh: use grimler.se mirrors for unstable & x11 repos
Use non-IPFS repositories for fetching dependencies when building packages.
This is required at least for CI as gateways seem to block requests due to
either rate limit or restriction for usage by cloud platforms.
2021-04-30 16:29:45 +03:00
Leonid Pliushch
107c098419
build-package.sh: try dweb.link ipfs gateway for x11 & unstable repositories 2021-04-28 14:16:17 +03:00
Leonid Pliushch
679c8645ed
build-package.sh: define CMAKE_STRIP when configuring cmake build 2021-04-18 17:20:02 +03:00
Richard Boß
60eff6a0ef
golang: update to 1.16.3 (#6636) 2021-04-16 14:14:45 +03:00