Browse Source

on-device build: Fix up ncurses and ninja, adjust some setup scripts,

and add dependency info to scripts/setup-termux.sh.
android-5
Butta 6 years ago
committed by Leonid Plyushch
parent
commit
7a235cedfd
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 1
      packages/ncurses/build.sh
  2. 4
      packages/ninja/build.sh
  3. 4
      scripts/build/setup/termux_setup_cmake.sh
  4. 5
      scripts/build/setup/termux_setup_ninja.sh
  5. 13
      scripts/build/setup/termux_setup_protobuf.sh
  6. 16
      scripts/setup-termux.sh

1
packages/ncurses/build.sh

@ -61,6 +61,7 @@ termux_step_post_make_install() {
for file in lib${lib}w.so*; do for file in lib${lib}w.so*; do
ln -s $file ${file/w./.} ln -s $file ${file/w./.}
done done
rm -f lib${lib}.a
for file in lib${lib}w.a; do for file in lib${lib}w.a; do
ln -s $file ${file/w./.} ln -s $file ${file/w./.}
done done

4
packages/ninja/build.sh

@ -12,8 +12,12 @@ termux_step_configure() {
} }
termux_step_make() { termux_step_make() {
if [ -n "$TERMUX_ON_DEVICE_BUILD" ]; then
$TERMUX_PKG_SRCDIR/configure.py --bootstrap
else
termux_setup_ninja termux_setup_ninja
ninja -j $TERMUX_MAKE_PROCESSES ninja -j $TERMUX_MAKE_PROCESSES
fi
} }
termux_step_make_install() { termux_step_make_install() {

4
scripts/build/setup/termux_setup_cmake.sh

@ -25,10 +25,6 @@ termux_setup_cmake() {
echo echo
echo " pkg install cmake" echo " pkg install cmake"
echo echo
echo "or build it from source with"
echo
echo " ./build-package.sh cmake"
echo
exit 1 exit 1
fi fi
fi fi

5
scripts/build/setup/termux_setup_ninja.sh

@ -14,7 +14,10 @@ termux_setup_ninja() {
fi fi
export PATH=$NINJA_FOLDER:$PATH export PATH=$NINJA_FOLDER:$PATH
else else
if [ "$(dpkg-query -W -f '${db:Status-Status}\n' ninja 2>/dev/null)" != "installed" ]; then local NINJA_PKG_VERSION=$(bash -c ". $TERMUX_SCRIPTDIR/packages/ninja/build.sh; echo \$TERMUX_PKG_VERSION")
if ([ ! -e "$TERMUX_BUILT_PACKAGES_DIRECTORY/ninja" ] ||
[ "$(cat "$TERMUX_BUILT_PACKAGES_DIRECTORY/ninja")" != "$NINJA_PKG_VERSION" ]) &&
[ "$(dpkg-query -W -f '${db:Status-Status}\n' ninja 2>/dev/null)" != "installed" ]; then
echo "Package 'ninja' is not installed." echo "Package 'ninja' is not installed."
echo "You can install it with" echo "You can install it with"
echo echo

13
scripts/build/setup/termux_setup_protobuf.sh

@ -17,18 +17,5 @@ termux_setup_protobuf() {
fi fi
export PATH=$_PROTOBUF_FOLDER/bin/:$PATH export PATH=$_PROTOBUF_FOLDER/bin/:$PATH
else
if [ "$(dpkg-query -W -f '${db:Status-Status}\n' protobuf 2>/dev/null)" != "installed" ]; then
echo "Package 'protobuf' is not installed."
echo "You can install it with"
echo
echo " pkg install protobuf"
echo
echo "or build it from source with"
echo
echo " ./build-package.sh libprotobuf"
echo
exit 1
fi
fi fi
} }

16
scripts/setup-termux.sh

@ -1,5 +1,8 @@
#!/data/data/com.termux/files/usr/bin/bash #!/data/data/com.termux/files/usr/bin/bash
# Tier 1 packages are required by the core build scripts in scripts/build/.
# Tier 2 packages are required to build many packages.
# Some packages are installed by default and aren't labeled here.
PACKAGES="autoconf" PACKAGES="autoconf"
PACKAGES+=" automake" PACKAGES+=" automake"
PACKAGES+=" bc" PACKAGES+=" bc"
@ -7,13 +10,14 @@ PACKAGES+=" binutils-gold"
PACKAGES+=" bison" PACKAGES+=" bison"
PACKAGES+=" bsdtar" PACKAGES+=" bsdtar"
PACKAGES+=" bzip2" PACKAGES+=" bzip2"
PACKAGES+=" clang" PACKAGES+=" clang" # Tier 1: required to build termux-elf-cleaner, which
# is built first by the core scripts.
PACKAGES+=" cmake" PACKAGES+=" cmake"
PACKAGES+=" coreutils" PACKAGES+=" coreutils"
PACKAGES+=" curl" PACKAGES+=" curl"
PACKAGES+=" diffutils" PACKAGES+=" diffutils"
PACKAGES+=" ed" PACKAGES+=" ed"
PACKAGES+=" file" PACKAGES+=" file" # Tier 1: required by a core script
PACKAGES+=" findutils" PACKAGES+=" findutils"
PACKAGES+=" flex" PACKAGES+=" flex"
PACKAGES+=" gawk" PACKAGES+=" gawk"
@ -27,13 +31,13 @@ PACKAGES+=" libtool"
PACKAGES+=" lzip" PACKAGES+=" lzip"
PACKAGES+=" lzop" PACKAGES+=" lzop"
PACKAGES+=" m4" PACKAGES+=" m4"
PACKAGES+=" make" PACKAGES+=" make" # Tier 2: used for all Makefile projects and to build itself
PACKAGES+=" ninja" PACKAGES+=" ninja" # Tier 2: used by default to build all CMake projects
PACKAGES+=" patch" PACKAGES+=" patch"
PACKAGES+=" perl" PACKAGES+=" perl"
PACKAGES+=" pkg-config" PACKAGES+=" pkg-config" # Tier 2: used to build many packages
PACKAGES+=" protobuf" PACKAGES+=" protobuf"
PACKAGES+=" python" PACKAGES+=" python" # Tier 1: required for buildorder.py core script
PACKAGES+=" python2" PACKAGES+=" python2"
PACKAGES+=" rust" PACKAGES+=" rust"
PACKAGES+=" sed" PACKAGES+=" sed"

Loading…
Cancel
Save