|
@ -435,18 +435,35 @@ termux_step_handle_buildarch() { |
|
|
# Function to get TERMUX_PKG_VERSION from build.sh |
|
|
# Function to get TERMUX_PKG_VERSION from build.sh |
|
|
termux_extract_dep_info() { |
|
|
termux_extract_dep_info() { |
|
|
package=$1 |
|
|
package=$1 |
|
|
|
|
|
if [ ! -d packages/$package ] && [ packages/${package} == packages/${package/-dev/} ]; then |
|
|
|
|
|
# We are probably dealing with a subpackage |
|
|
|
|
|
TERMUX_ARCH=$( |
|
|
|
|
|
# set TERMUX_SUBPKG_PLATFORM_INDEPENDENT to mother package's value and override if needed |
|
|
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT="" |
|
|
|
|
|
source $(dirname $(find packages/ -name "$package.subpackage.sh"))/build.sh |
|
|
|
|
|
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=$TERMUX_PKG_PLATFORM_INDEPENDENT |
|
|
|
|
|
source $(find packages/ -name "$package.subpackage.sh") |
|
|
|
|
|
if [ "$TERMUX_SUBPKG_PLATFORM_INDEPENDENT" = yes ]; then |
|
|
|
|
|
echo all |
|
|
|
|
|
else |
|
|
|
|
|
echo $TERMUX_ARCH |
|
|
|
|
|
fi |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
package=$(basename $(dirname $(find packages/ -name "$package.subpackage.sh"))) |
|
|
|
|
|
elif [ ! packages/${package} == packages/${package/-dev/} ]; then |
|
|
|
|
|
# dev package |
|
|
|
|
|
package=${package/-dev/} |
|
|
|
|
|
fi |
|
|
( |
|
|
( |
|
|
# Reset TERMUX_PKG_PLATFORM_INDEPENDENT and TERMUX_PKG_REVISION since these aren't |
|
|
# 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 |
|
|
# mandatory in a build.sh. Otherwise these will equal the main package's values for |
|
|
# deps that should have the default values |
|
|
# deps that should have the default values |
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT="" |
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT="" |
|
|
TERMUX_PKG_REVISION="0" |
|
|
TERMUX_PKG_REVISION="0" |
|
|
|
|
|
source packages/$package/build.sh |
|
|
source $package/build.sh |
|
|
if [ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = yes ]; then TERMUX_ARCH=all; fi |
|
|
if [ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = yes ]; then |
|
|
if [ "$TERMUX_PKG_REVISION" != "0" ] || [ "$TERMUX_PKG_VERSION" != "${TERMUX_PKG_VERSION/-/}" ]; then |
|
|
TERMUX_ARCH=all |
|
|
|
|
|
fi |
|
|
|
|
|
if [ ! "$TERMUX_PKG_REVISION" = 0 ]; then |
|
|
|
|
|
TERMUX_PKG_VERSION+="-$TERMUX_PKG_REVISION" |
|
|
TERMUX_PKG_VERSION+="-$TERMUX_PKG_REVISION" |
|
|
fi |
|
|
fi |
|
|
echo ${TERMUX_ARCH} ${TERMUX_PKG_VERSION} |
|
|
echo ${TERMUX_ARCH} ${TERMUX_PKG_VERSION} |
|
|