build-package: mv termux_setup_cmake to scripts/build/setup
This commit is contained in:
parent
4df44858f6
commit
55e037366d
@ -22,25 +22,7 @@ source scripts/build/setup/termux_setup_ninja.sh
|
||||
source scripts/build/setup/termux_setup_meson.sh
|
||||
|
||||
# Utility function to setup a current cmake build system
|
||||
termux_setup_cmake() {
|
||||
local TERMUX_CMAKE_MAJORVESION=3.13
|
||||
local TERMUX_CMAKE_MINORVERSION=4
|
||||
local TERMUX_CMAKE_VERSION=$TERMUX_CMAKE_MAJORVESION.$TERMUX_CMAKE_MINORVERSION
|
||||
local TERMUX_CMAKE_TARNAME=cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64.tar.gz
|
||||
local TERMUX_CMAKE_TARFILE=$TERMUX_PKG_TMPDIR/$TERMUX_CMAKE_TARNAME
|
||||
local TERMUX_CMAKE_FOLDER=$TERMUX_COMMON_CACHEDIR/cmake-$TERMUX_CMAKE_VERSION
|
||||
if [ ! -d "$TERMUX_CMAKE_FOLDER" ]; then
|
||||
termux_download https://cmake.org/files/v$TERMUX_CMAKE_MAJORVESION/$TERMUX_CMAKE_TARNAME \
|
||||
"$TERMUX_CMAKE_TARFILE" \
|
||||
563a39e0a7c7368f81bfa1c3aff8b590a0617cdfe51177ddc808f66cc0866c76
|
||||
rm -Rf "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64"
|
||||
tar xf "$TERMUX_CMAKE_TARFILE" -C "$TERMUX_PKG_TMPDIR"
|
||||
mv "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64" \
|
||||
"$TERMUX_CMAKE_FOLDER"
|
||||
fi
|
||||
export PATH=$TERMUX_CMAKE_FOLDER/bin:$PATH
|
||||
export CMAKE_INSTALL_ALWAYS=1
|
||||
}
|
||||
source scripts/build/setup/termux_setup_cmake.sh
|
||||
|
||||
# First step is to handle command-line arguments. Not to be overridden by packages.
|
||||
termux_step_handle_arguments() {
|
||||
|
19
scripts/build/setup/termux_setup_cmake.sh
Normal file
19
scripts/build/setup/termux_setup_cmake.sh
Normal file
@ -0,0 +1,19 @@
|
||||
termux_setup_cmake() {
|
||||
local TERMUX_CMAKE_MAJORVESION=3.13
|
||||
local TERMUX_CMAKE_MINORVERSION=4
|
||||
local TERMUX_CMAKE_VERSION=$TERMUX_CMAKE_MAJORVESION.$TERMUX_CMAKE_MINORVERSION
|
||||
local TERMUX_CMAKE_TARNAME=cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64.tar.gz
|
||||
local TERMUX_CMAKE_TARFILE=$TERMUX_PKG_TMPDIR/$TERMUX_CMAKE_TARNAME
|
||||
local TERMUX_CMAKE_FOLDER=$TERMUX_COMMON_CACHEDIR/cmake-$TERMUX_CMAKE_VERSION
|
||||
if [ ! -d "$TERMUX_CMAKE_FOLDER" ]; then
|
||||
termux_download https://cmake.org/files/v$TERMUX_CMAKE_MAJORVESION/$TERMUX_CMAKE_TARNAME \
|
||||
"$TERMUX_CMAKE_TARFILE" \
|
||||
563a39e0a7c7368f81bfa1c3aff8b590a0617cdfe51177ddc808f66cc0866c76
|
||||
rm -Rf "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64"
|
||||
tar xf "$TERMUX_CMAKE_TARFILE" -C "$TERMUX_PKG_TMPDIR"
|
||||
mv "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64" \
|
||||
"$TERMUX_CMAKE_FOLDER"
|
||||
fi
|
||||
export PATH=$TERMUX_CMAKE_FOLDER/bin:$PATH
|
||||
export CMAKE_INSTALL_ALWAYS=1
|
||||
}
|
Loading…
Reference in New Issue
Block a user