这是indexloc提供的服务,不要输入任何密码
Skip to content

tree-wide: support full bootstrapping of ffplay, rust, and mesa #24669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cb17176
fix(scripts/build/termux_step_override_config_scripts): do not skip a…
robertkirkman May 10, 2025
bb10d8c
fix(main/python-brotli): separate `build.sh` from `brotli` again
robertkirkman May 10, 2025
366f9c6
fix(x11/{sdl2,sdl2-compat}): create `libSDL2.so` symbolic link during…
robertkirkman May 10, 2025
b51fba7
fix(main/librsvg): prevent `meson.build` from using `pkg-config` to a…
robertkirkman May 10, 2025
fb67fba
fix(main/wasi-libc): enable termux_step_host_build() to complete succ…
robertkirkman May 10, 2025
fc2c6ea
bump(main/libtheora): 1.2.0
robertkirkman May 10, 2025
438eaea
fix(main/glib): always remove `$TERMUX_HOSTBUILD_MARKER`
robertkirkman May 10, 2025
afd7f25
revbump({main/ffmpeg,x11/ffplay}): for `libtheora` 1.2.0
robertkirkman May 10, 2025
f85dd54
revbump({main/vlc,x11/vlc-qt}): for `libtheora` 1.2.0
robertkirkman May 10, 2025
d98e1da
fix(main/libmpeg2): do not check for X11 during configure
robertkirkman May 10, 2025
bd8aa8a
revbump(main/gpac): for `libtheora` 1.2.0
robertkirkman May 10, 2025
66f99a9
revbump(main/gst-plugins-base): for `libtheora` 1.2.0
robertkirkman May 10, 2025
7cfdb5e
revbump(main/mplayer): for `libtheora` 1.2.0
robertkirkman May 10, 2025
5476407
revbump(x11/godot): for `libtheora` 1.2.0
robertkirkman May 10, 2025
811b904
revbump(x11/handbrake): for `libtheora` 1.2.0
robertkirkman May 10, 2025
d7075f1
revbump(x11/love): for `libtheora` 1.2.0
robertkirkman May 10, 2025
5732a38
revbump(x11/recordmydesktop): for `libtheora` 1.2.0
robertkirkman May 10, 2025
c73534b
chore(scripts/big-pkgs.list): add `wasi-libc`
robertkirkman May 10, 2025
2e3d168
fix(main/tor): do not automatically enable `libseccomp`
robertkirkman May 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions packages/brotli/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (command line
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BREAKS="brotli-dev"
TERMUX_PKG_REPLACES="brotli-dev"
TERMUX_PKG_FORCE_CMAKE=true
Expand All @@ -31,11 +30,4 @@ termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/share/man/man{1,3}
cp "$TERMUX_PKG_SRCDIR/docs/brotli.1" "$TERMUX_PREFIX/share/man/man1/"
cp "$TERMUX_PKG_SRCDIR"/docs/*.3 "$TERMUX_PREFIX/share/man/man3/"

cd "$TERMUX_PKG_SRCDIR"
# ERROR: ./lib/python3.12/site-packages/_brotli.cpython-312.so contains undefined symbols:
# 31: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND log2
LDFLAGS+=" -lm"
LDFLAGS+=" -Wl,--no-as-needed -lpython${TERMUX_PYTHON_VERSION}"
pip install . --prefix="$TERMUX_PREFIX" -vv --no-build-isolation --no-deps
}
4 changes: 0 additions & 4 deletions packages/brotli/python-brotli.subpackage.sh

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ffmpeg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align version with `ffplay` package.
TERMUX_PKG_VERSION="7.1.1"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1
TERMUX_PKG_DEPENDS="fontconfig, freetype, fribidi, game-music-emu, harfbuzz, libaom, libandroid-glob, libandroid-stub, libass, libbluray, libbz2, libdav1d, libgnutls, libiconv, liblzma, libmp3lame, libopencore-amr, libopenmpt, libopus, librav1e, libsoxr, libsrt, libssh, libtheora, libv4l, libvidstab, libvmaf, libvo-amrwbenc, libvorbis, libvpx, libwebp, libx264, libx265, libxml2, libzimg, libzmq, littlecms, ocl-icd, rubberband, svt-av1, xvidcore, zlib"
Expand Down
6 changes: 5 additions & 1 deletion packages/glib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library providing core building blocks for libraries and
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.84.1"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/glib/${TERMUX_PKG_VERSION%.*}/glib-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=2b4bc2ec49611a5fc35f86aca855f2ed0196e69e53092bab6bb73396bf30789a
TERMUX_PKG_AUTO_UPDATE=true
Expand Down Expand Up @@ -65,6 +65,10 @@ termux_step_host_build() {
}

termux_step_pre_configure() {
# always remove this marker because glib-cross' files are installed during termux_step_host_build(),
# so the command scripts/run-docker.sh ./build-package.sh -a all gtk3 (without -I, with -a all)
# would otherwise have .../files/usr/bin/glib-compile-resources: Exec format error
rm -rf $TERMUX_HOSTBUILD_MARKER
# glib checks for __BIONIC__ instead of __ANDROID__:
CFLAGS+=" -D__BIONIC__=1"
_PREFIX="$TERMUX_PKG_TMPDIR/prefix"
Expand Down
2 changes: 1 addition & 1 deletion packages/gpac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="An open-source multimedia framework focused on modularit
TERMUX_PKG_LICENSE="LGPL-2.1-or-later"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.4.0"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/gpac/gpac/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=99c8c994d5364b963d18eff24af2576b38d38b3460df27d451248982ea16157a
TERMUX_PKG_DEPENDS="ffmpeg, freetype, liba52, libjpeg-turbo, liblzma, libmad, libnghttp2, libogg, libpng, libtheora, libvorbis, openjpeg, openssl, pulseaudio, xvidcore, zlib"
Expand Down
1 change: 1 addition & 0 deletions packages/gst-plugins-base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="GStreamer base plug-ins"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.26.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=659553636f84dcf388cad5cf6530e02b0b2d3dc450e76199287ba9db6a6c5226
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
6 changes: 6 additions & 0 deletions packages/libmpeg2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ TERMUX_PKG_DESCRIPTION="MPEG-2 decoder libraries"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.5.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://libmpeg2.sourceforge.io/files/libmpeg2-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4
# this package is not in x11-repo, so its X11 features should not
# be auto-enabled even if X11 libraries are detected in the $TERMUX_PREFIX.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
no_x=yes
"

termux_step_pre_configure() {
autoreconf -vfi
Expand Down
2 changes: 1 addition & 1 deletion packages/librsvg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library to render SVG files using cairo"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.60.0"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/librsvg/${TERMUX_PKG_VERSION%.*}/librsvg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=0b6ffccdf6e70afc9876882f5d2ce9ffcf2c713cbaaf1ad90170daa752e1eec3
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
22 changes: 22 additions & 0 deletions packages/librsvg/do-not-use-pkg-config-to-find-vapigen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Sometimes, if other packages (exact reproduction steps unknown)
were built in the same $TERMUX_PREFIX before librsvg,
the build of librsvg will fail because the vapigen placed in $PATH by termux_setup_gir()
will not be found. This prevents that by forcing librsvg to search $PATH for vapigen.

Before:
../src/meson.build:131:17: ERROR: Dependency "vapigen" not found, tried pkgconfig

After:
Program vapigen found: YES (/home/builder/.termux-build/_cache/gir-cross/bin/vapigen)

--- a/meson.build
+++ b/meson.build
@@ -128,7 +128,7 @@ gidocgen = find_program('gi-docgen', version: gidocgen_required,
gi_dep = dependency('gobject-introspection-1.0',
version: introspection_required,
required: get_option('introspection'))
-vapigen_dep = dependency('vapigen',
+vapigen_dep = find_program('vapigen',
version: vapigen_required,
required: get_option('vala'))

20 changes: 16 additions & 4 deletions packages/libtheora/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ TERMUX_PKG_HOMEPAGE=https://www.theora.org/
TERMUX_PKG_DESCRIPTION="An open video codec developed by the Xiph.org"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://downloads.xiph.org/releases/theora/libtheora-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc
TERMUX_PKG_VERSION=1.2.0
TERMUX_PKG_SRCURL=https://downloads.xiph.org/releases/theora/libtheora-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=279327339903b544c28a92aeada7d0dcfd0397b59c2f368cc698ac56f515906e
TERMUX_PKG_DEPENDS="libogg, libvorbis"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-examples"

termux_step_pre_configure() {
# prior to libtheora 1.2.0, its assembly optimizations were not enabled by configure on 32-bit ARM Android
# now, they are being automatically enabled on 32-bit ARM Android, but fail to build
# and seem to be non-position-independent assembly because trying to fix them by reproducing and
# fixing their errors on 32-bit GNU/Linux Clang until build succeeds there,
# eventually leads to this when compiling the same code for 32-bit ARM Android:
# ld.lld: error: relocation R_ARM_ABS32 cannot be used against local symbol; recompile with -fPIC
# issue tracked upstream here: https://gitlab.xiph.org/xiph/theora/-/issues/2340
if [[ "$TERMUX_ARCH" == "arm" ]]; then
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-asm"
fi
}
2 changes: 1 addition & 1 deletion packages/mplayer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="The Movie Player"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.5
TERMUX_PKG_REVISION=7
TERMUX_PKG_REVISION=8
TERMUX_PKG_SRCURL=https://mplayerhq.hu/MPlayer/releases/MPlayer-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=650cd55bb3cb44c9b39ce36dac488428559799c5f18d16d98edb2b7256cbbf85
TERMUX_PKG_DEPENDS="ffmpeg, fontconfig, freetype, fribidi, liba52, libass, libbluray, libdvdnav, libdvdread, libiconv, libjpeg-turbo, liblzo, libmad, libmp3lame, libogg, libpng, libtheora, libtwolame, libvorbis, libx11, libx264, libxext, libxss, libxv, mpg123, ncurses, openal-soft, pulseaudio, xvidcore, zlib"
Expand Down
27 changes: 27 additions & 0 deletions packages/python-brotli/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
TERMUX_PKG_HOMEPAGE=https://github.com/google/brotli
TERMUX_PKG_DESCRIPTION="lossless compression algorithm and format (Python bindings)"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.1.0
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/google/brotli/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff
TERMUX_PKG_DEPENDS="python, python-pip"
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true

termux_step_configure() {
# ERROR: ./lib/python3.12/site-packages/_brotli.cpython-312.so contains undefined symbols:
# 31: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND log2
LDFLAGS+=" -lm"
LDFLAGS+=" -Wl,--no-as-needed -lpython${TERMUX_PYTHON_VERSION}"
}

termux_step_make() {
:
}

termux_step_make_install() {
pip install . --prefix="$TERMUX_PREFIX" -vv --no-build-isolation --no-deps
}
10 changes: 9 additions & 1 deletion packages/tor/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="The Onion Router anonymizing overlay network"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.4.8.16"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.torproject.org/dist/tor-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=6540dd377a120fb8e7d27530aa3b7ff72a0fa5b4f670fe1d64c987c1cfd390cb
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -13,7 +14,14 @@ TERMUX_PKG_BUILD_DEPENDS="libandroid-glob"
# helpful in our case. Although it would be good to go through the source and
# ensure that in future there is not any other Android specific behaviour which
# affects security/anonymity.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-zstd --disable-unittests"
# without --disable-seccomp, tor would automatically enable seccomp if libseccomp was
# previously installed in $TERMUX_PREFIX and fail with:
# src/lib/sandbox/sandbox.c:890:32: error: use of undeclared identifier 'PF_FILE'
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-zstd
--disable-unittests
--disable-seccomp
"
TERMUX_PKG_CONFFILES="etc/tor/torrc"
TERMUX_PKG_SERVICE_SCRIPT=("tor" 'exec tor 2>&1')

Expand Down
2 changes: 1 addition & 1 deletion packages/vlc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A popular libre and open source media player and multime
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.0.21"
TERMUX_PKG_REVISION=7
TERMUX_PKG_REVISION=8
TERMUX_PKG_SRCURL=https://download.videolan.org/pub/videolan/vlc/${TERMUX_PKG_VERSION}/vlc-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0
TERMUX_PKG_DEPENDS="chromaprint, dbus, ffmpeg, fluidsynth, fontconfig, freetype, fribidi, glib, gst-plugins-base, gstreamer, harfbuzz, liba52, libandroid-shmem, libandroid-spawn, libaom, libarchive, libass, libbluray, libc++, libcaca, libcairo, libcddb, libdav1d, libdvbpsi, libdvdnav, libdvdread, libebml, libflac, libgcrypt, libgnutls, libgpg-error, libiconv, libidn, libjpeg-turbo, liblua52, libmad, libmatroska, libmpeg2, libnfs, libogg, libopus, libpng, librsvg, libsecret, libsoxr, libssh2, libtheora, libtwolame, libvorbis, libvpx, libx11, libx264, libx265, libxcb, libxml2, mpg123, ncurses, opengl, pulseaudio, samba, taglib, zlib"
Expand Down
16 changes: 14 additions & 2 deletions packages/wasi-libc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, BSD 2-Clause, MIT"
TERMUX_PKG_LICENSE_FILE="LICENSE, src/wasi-libc/LICENSE-MIT, src/wasi-libc/libc-bottom-half/cloudlibc/LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="25"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=git+https://github.com/WebAssembly/wasi-sdk
TERMUX_PKG_GIT_BRANCH=wasi-sdk-${TERMUX_PKG_VERSION}
TERMUX_PKG_RECOMMENDS="wasm-component-ld"
Expand Down Expand Up @@ -55,14 +56,25 @@ termux_step_host_build() {
-j ${TERMUX_PKG_MAKE_PROCESSES} \
install

mv -v "${TERMUX_PKG_HOSTBUILD_DIR}/install/share/cmake" "${TERMUX_PREFIX}/share"
mkdir -p "${TERMUX_PREFIX}/share/cmake/Platform"
mv -v "${TERMUX_PKG_HOSTBUILD_DIR}"/install/share/cmake/Platform/*.cmake "${TERMUX_PREFIX}/share/cmake/Platform/"
mv -v "${TERMUX_PKG_HOSTBUILD_DIR}"/install/share/cmake/*.cmake "${TERMUX_PREFIX}/share/cmake/"

local llvm_major_version=$(grep llvm-version "${TERMUX_PREFIX}/share/wasi-sysroot/VERSION" | cut -d" " -f2 | cut -d"." -f1)
mkdir -p "${TERMUX_PREFIX}/lib/clang/${llvm_major_version}/lib"
mv -v "${TERMUX_PREFIX}/clang-resource-dir/lib" "${TERMUX_PREFIX}/lib/clang/${llvm_major_version}"
rm -frv "${TERMUX_PREFIX}/lib/clang/${llvm_major_version}/lib/wasi"*
mv -v "${TERMUX_PREFIX}"/clang-resource-dir/lib/wasi* "${TERMUX_PREFIX}/lib/clang/${llvm_major_version}/lib/"
rm -frv "${TERMUX_PREFIX}/clang-resource-dir"
}

termux_step_configure() {
# always remove this marker because this package is built in termux_step_host_build()
# this prevents "ERROR: No files in package." when the package is built again without deleting
# the docker container.
rm -rf $TERMUX_HOSTBUILD_MARKER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time seeing that variable.
Is this documented?

Copy link
Contributor Author

@robertkirkman robertkirkman May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several other places in the repository where this is done in order to force termux_step_host_build() to always run on every build and never cache. Here is one of them:

termux_step_configure() {
# Remove this marker all the time, as this package is architecture-specific
rm -rf $TERMUX_HOSTBUILD_MARKER
}

reasons this can be necessary vary between each package.

Copy link
Contributor Author

@robertkirkman robertkirkman May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, while on the subject, I just noticed that technically glib requires this too, because if it doesn't have it, then this command:

  • scripts/run-docker.sh ./build-package.sh -a all gtk3

will fail with this error:

  • .../files/usr/bin/glib-compile-resources: Exec format error

(because glib-cross does not get properly installed into $TERMUX_PREFIX if an operation that deletes $TERMUX_PREFIX without deleting all hostbuild markers, like -a all, is combined with the mode that runs when -I is not used)

Basically any package that installs something into $TERMUX_PREFIX during termux_step_host_build() requires it. I'm doing them one by one while they're touched by the dependency tree of the packages mentioned in each PR related to this subject, I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it would be possible to add a check that counts files modified in $TERMUX_PREFIX since termux_step_create_timestamp_file() right after the end of termux_step_host_build() but before anything else runs, and remove/don't create $TERMUX_HOSTBUILD_MARKER if that number of files is greater than 0, and that would fix some of these automatically, but it wouldn't cover all of them and that might be kind of an overly invasive change.

# also, termux_step_configure() does not do anything else for this package
}

termux_step_make() {
:
}
Expand Down
1 change: 1 addition & 0 deletions scripts/big-pkgs.list
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rust
swift
thunderbird
tinygo
wasi-libc
wasmer
zig
ghc
6 changes: 1 addition & 5 deletions scripts/build/termux_step_override_config_scripts.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
termux_step_override_config_scripts() {
if [ "$TERMUX_ON_DEVICE_BUILD" = true ]; then
if [ "$TERMUX_ON_DEVICE_BUILD" = true ] || [ "$TERMUX_PACKAGE_LIBRARY" = "glibc" ]; then
return
fi

# Make $TERMUX_PREFIX/bin/sh executable on the builder, so that build
# scripts can assume that it works on both builder and host later on:
ln -sf /bin/sh "$TERMUX_PREFIX/bin/sh"

if [ "$TERMUX_INSTALL_DEPS" = false ] || [ "$TERMUX_PACKAGE_LIBRARY" = "glibc" ]; then
return
fi

if [ "$TERMUX_PKG_DEPENDS" != "${TERMUX_PKG_DEPENDS/libllvm/}" ] ||
[ "$TERMUX_PKG_BUILD_DEPENDS" != "${TERMUX_PKG_BUILD_DEPENDS/libllvm/}" ]; then
LLVM_DEFAULT_TARGET_TRIPLE=$TERMUX_HOST_PLATFORM
Expand Down
1 change: 1 addition & 0 deletions x11-packages/ffplay/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
# Please align the version with `ffmpeg` package.
TERMUX_PKG_VERSION="7.1.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1
TERMUX_PKG_DEPENDS="ffmpeg, libandroid-shmem, libx11, libxcb, libxext, libxv, pulseaudio, sdl2 | sdl2-compat"
Expand Down
2 changes: 1 addition & 1 deletion x11-packages/godot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Advanced cross-platform 2D and 3D game engine"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.4.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/godotengine/godot/archive/$TERMUX_PKG_VERSION-stable.tar.gz
TERMUX_PKG_SHA256=a486c523494e155b6912a607b5813577f8f39285f8ad43ac76cb9141edad9888
TERMUX_PKG_DEPENDS="ca-certificates, glu, libandroid-execinfo, libc++, libenet, libogg, libtheora, libvorbis, libvpx, libwebp, libwslay, libxcursor, libxi, libxinerama, libxkbcommon, libxrandr, mbedtls, miniupnpc, opengl, opusfile, pcre2, speechd, zstd, fontconfig"
Expand Down
2 changes: 1 addition & 1 deletion x11-packages/handbrake/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_LICENSE_FILE="COPYING, LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.9.2"
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/HandBrake/HandBrake/releases/download/${TERMUX_PKG_VERSION}/HandBrake-${TERMUX_PKG_VERSION}-source.tar.bz2
TERMUX_PKG_SHA256=f56696b9863a6c926c0eabdcb980cece9aa222c650278d455ac6873d3220ce49
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
2 changes: 1 addition & 1 deletion x11-packages/love/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="ZLIB"
TERMUX_PKG_LICENSE_FILE="license.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="11.5"
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/love2d/love/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=6f55c265be5e03696c4770150c4388f5cffbdb3727606724cf88332baab429f7
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
1 change: 1 addition & 0 deletions x11-packages/recordmydesktop/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Produces a OGG encapsulated Theora/Vorbis recording of y
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.4.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/Enselic/recordmydesktop/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=69602d32c1be82cd92083152c7c44c0206ca0d6419d76a6144ffcfe07b157a72
TERMUX_PKG_DEPENDS="libandroid-shmem, libice, libogg, libpopt, libsm, libtheora, libvorbis, libx11, libxdamage, libxext, libxfixes, zlib"
Expand Down
8 changes: 3 additions & 5 deletions x11-packages/sdl2-compat/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Simple DirectMedia Layer (SDL) sdl2-compat"
TERMUX_PKG_LICENSE="ZLIB"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.32.56"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/libsdl-org/sdl2-compat/releases/download/release-${TERMUX_PKG_VERSION}/sdl2-compat-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=27e845b1b7dc0a91a85f1a1f18892ed205adb38caf767741eb258008d8264de0
TERMUX_PKG_DEPENDS="sdl3"
Expand All @@ -27,11 +28,8 @@ termux_step_pre_configure() {
diff -uNr "${TERMUX_PKG_TMPDIR}"/{a,b} --color || :
}

termux_step_post_massage() {
termux_step_post_make_install() {
# ld(1)ing with `-lSDL2` won't work without this:
# https://github.com/termux/x11-packages/issues/633
cd ${TERMUX_PKG_MASSAGEDIR}/${TERMUX_PREFIX}/lib || exit 1
if [ ! -e "./libSDL2.so" ]; then
ln -sf libSDL2-2.0.so libSDL2.so
fi
ln -sf libSDL2-2.0.so ${TERMUX_PREFIX}/lib/libSDL2.so
}
8 changes: 3 additions & 5 deletions x11-packages/sdl2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A library for portable low-level access to a video frame
TERMUX_PKG_LICENSE="ZLIB"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="2.32.6"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.libsdl.org/release/SDL2-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=6a7a40d6c2e00016791815e1a9f4042809210bdf10cc78d2c75b45c4f52f93ad
TERMUX_PKG_DEPENDS="libdecor, libiconv, libwayland, libx11, libxcursor, libxext, libxfixes, libxi, libxkbcommon, libxrandr, libxss, pulseaudio"
Expand Down Expand Up @@ -71,11 +72,8 @@ termux_step_pre_configure() {
termux_setup_wayland_cross_pkg_config_wrapper
}

termux_step_post_massage() {
termux_step_post_make_install() {
# ld(1)ing with `-lSDL2` won't work without this:
# https://github.com/termux/x11-packages/issues/633
cd ${TERMUX_PKG_MASSAGEDIR}/${TERMUX_PREFIX}/lib || exit 1
if [ ! -e "./libSDL2.so" ]; then
ln -sf libSDL2-2.0.so libSDL2.so
fi
ln -sf libSDL2-2.0.so ${TERMUX_PREFIX}/lib/libSDL2.so
}
2 changes: 1 addition & 1 deletion x11-packages/vlc-qt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A popular libre and open source media player and multime
TERMUX_PKG_LICENSE="GPL-2.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.0.21"
TERMUX_PKG_REVISION=7
TERMUX_PKG_REVISION=8
TERMUX_PKG_SRCURL=https://download.videolan.org/pub/videolan/vlc/${TERMUX_PKG_VERSION}/vlc-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0
TERMUX_PKG_DEPENDS="chromaprint, dbus, ffmpeg, fluidsynth, fontconfig, freetype, fribidi, glib, gst-plugins-base, gstreamer, harfbuzz, liba52, libandroid-shmem, libandroid-spawn, libaom, libarchive, libass, libbluray, libc++, libcaca, libcairo, libcddb, libdav1d, libdvbpsi, libdvdnav, libdvdread, libebml, libflac, libgcrypt, libgnutls, libgpg-error, libiconv, libidn, libjpeg-turbo, liblua52, libmad, libmatroska, libmpeg2, libnfs, libogg, libopus, libpng, librsvg, libsecret, libsoxr, libssh2, libtheora, libtwolame, libvorbis, libvpx, libx11, libx264, libx265, libxcb, libxml2, mpg123, ncurses, opengl, pulseaudio, qt5-qtbase, qt5-qtsvg, qt5-qtx11extras, samba, taglib, xcb-util-keysyms, zlib"
Expand Down
Loading