-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partial compatibility for on-device builds. There is no guarantee that it will be possible to build all available packages and built packages will have same reliability that cross-compiled but should solve "self-hosting" problems as much as possible.
- Loading branch information
Leonid Plyushch
committed
Aug 6, 2019
1 parent
5f36563
commit 63441cc
Showing
15 changed files
with
238 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
termux_setup_ninja() { | ||
local NINJA_VERSION=1.9.0 | ||
local NINJA_FOLDER=$TERMUX_COMMON_CACHEDIR/ninja-$NINJA_VERSION | ||
if [ ! -x "$NINJA_FOLDER/ninja" ]; then | ||
mkdir -p "$NINJA_FOLDER" | ||
local NINJA_ZIP_FILE=$TERMUX_PKG_TMPDIR/ninja-$NINJA_VERSION.zip | ||
termux_download https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip \ | ||
"$NINJA_ZIP_FILE" \ | ||
1b1235f2b0b4df55ac6d80bbe681ea3639c9d2c505c7ff2159a3daf63d196305 | ||
unzip "$NINJA_ZIP_FILE" -d "$NINJA_FOLDER" | ||
chmod 755 $NINJA_FOLDER/ninja | ||
|
||
if [ -z "$TERMUX_ON_DEVICE_BUILD" ]; then | ||
if [ ! -x "$NINJA_FOLDER/ninja" ]; then | ||
mkdir -p "$NINJA_FOLDER" | ||
local NINJA_ZIP_FILE=$TERMUX_PKG_TMPDIR/ninja-$NINJA_VERSION.zip | ||
termux_download https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip \ | ||
"$NINJA_ZIP_FILE" \ | ||
1b1235f2b0b4df55ac6d80bbe681ea3639c9d2c505c7ff2159a3daf63d196305 | ||
unzip "$NINJA_ZIP_FILE" -d "$NINJA_FOLDER" | ||
chmod 755 $NINJA_FOLDER/ninja | ||
fi | ||
export PATH=$NINJA_FOLDER:$PATH | ||
else | ||
# For on-device builds don't care about which version of cmake is installed. | ||
# In most cases it should be suitable. | ||
apt install -yq ninja | ||
fi | ||
export PATH=$NINJA_FOLDER:$PATH | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
termux_step_finish_build() { | ||
echo "termux - build of '$TERMUX_PKG_NAME' done" | ||
test -t 1 && printf "\033]0;%s - DONE\007" "$TERMUX_PKG_NAME" | ||
mkdir -p /data/data/.built-packages | ||
echo "$TERMUX_PKG_FULLVERSION" > "/data/data/.built-packages/$TERMUX_PKG_NAME" | ||
|
||
if [ -n "$TERMUX_ON_DEVICE_BUILD" ]; then | ||
# For on-device builds cross-compiling is not supported so we can | ||
# store information about built packages under $TERMUX_TOPDIR. | ||
mkdir -p "$TERMUX_TOPDIR/.built-packages" | ||
echo "$TERMUX_PKG_FULLVERSION" > "$TERMUX_TOPDIR/.built-packages/$TERMUX_PKG_NAME" | ||
else | ||
mkdir -p /data/data/.built-packages | ||
echo "$TERMUX_PKG_FULLVERSION" > "/data/data/.built-packages/$TERMUX_PKG_NAME" | ||
fi | ||
|
||
exit 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.