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.
This commit is contained in:
parent
819b17a347
commit
a44289837e
@ -4,11 +4,15 @@ termux_extract_dep_info() {
|
||||
if [ "$PKG" != "$(basename ${PKG_DIR})" ]; then
|
||||
# We are dealing with a subpackage
|
||||
TERMUX_ARCH=$(
|
||||
# set TERMUX_SUBPKG_PLATFORM_INDEPENDENT to parent package's value and override if needed
|
||||
# set TERMUX_SUBPKG_PLATFORM_INDEPENDENT to
|
||||
# parent package's value and override if
|
||||
# needed
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=false
|
||||
source ${PKG_DIR}/build.sh
|
||||
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=$TERMUX_PKG_PLATFORM_INDEPENDENT
|
||||
if [ "$TERMUX_INSTALL_DEPS" = "false" ] || [ "$TERMUX_PKG_NO_STATICSPLIT" = "true" ] || [ "${PKG/-static/}-static" != "${PKG}" ]; then
|
||||
if [ "$TERMUX_INSTALL_DEPS" = "false" ] || \
|
||||
[ "$TERMUX_PKG_NO_STATICSPLIT" = "true" ] || \
|
||||
[ "${PKG/-static/}-static" != "${PKG}" ]; then
|
||||
source ${PKG_DIR}/${PKG}.subpackage.sh
|
||||
fi
|
||||
if [ "$TERMUX_SUBPKG_PLATFORM_INDEPENDENT" = "true" ]; then
|
||||
@ -17,20 +21,21 @@ termux_extract_dep_info() {
|
||||
echo $TERMUX_ARCH
|
||||
fi
|
||||
)
|
||||
|
||||
elif [ "${PKG/-static/}-static" == "${PKG}" ]; then
|
||||
# static lib package
|
||||
PKG=${PKG/-static/}
|
||||
else
|
||||
TERMUX_ARCH=$(
|
||||
source ${PKG_DIR}/build.sh
|
||||
if [ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = "true" ]; then
|
||||
echo all
|
||||
else
|
||||
echo $TERMUX_ARCH
|
||||
fi
|
||||
)
|
||||
fi
|
||||
(
|
||||
# Reset TERMUX_PKG_PLATFORM_INDEPENDENT and TERMUX_PKG_REVISION since these aren't
|
||||
# mandatory in a build.sh. Otherwise these will equal the main package's values for
|
||||
# deps that should have the default values
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=false
|
||||
TERMUX_PKG_REVISION="0"
|
||||
source ${PKG_DIR}/build.sh
|
||||
[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = "true" ] && TERMUX_ARCH=all
|
||||
if [ "$TERMUX_PKG_REVISION" != "0" ] || [ "$TERMUX_PKG_VERSION" != "${TERMUX_PKG_VERSION/-/}" ]; then
|
||||
if [ "$TERMUX_PKG_REVISION" != "0" ] || \
|
||||
[ "$TERMUX_PKG_VERSION" != "${TERMUX_PKG_VERSION/-/}" ]; then
|
||||
TERMUX_PKG_VERSION+="-$TERMUX_PKG_REVISION"
|
||||
fi
|
||||
echo ${TERMUX_ARCH} ${TERMUX_PKG_VERSION}
|
||||
|
Loading…
Reference in New Issue
Block a user