0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 14:13:36 +00:00
Chongyun Lee 9ee17a9593
revdeps(abseil-cpp): revbump (#21312)
* aapt: revbump
* et: revbump
* libncnn: revbump
* libprotobuf-c: revbump
* libprotobuf: revbump
* protobuf-static: revbump
* libwebrtc-audio-processing: revbump
* mosh: revbump
* pika: revbump
* opencv: revbump
* python-torch: revbump
* libgrpc: revbump

due to symbol changes in abseil-cpp
2024-09-01 02:19:24 +08:00

40 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://mosh.org
TERMUX_PKG_DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.4.0
TERMUX_PKG_REVISION=11
TERMUX_PKG_SRCURL=https://github.com/mobile-shell/mosh/releases/download/mosh-${TERMUX_PKG_VERSION}/mosh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_DEPENDS="abseil-cpp, libandroid-support, libc++, libprotobuf, ncurses, openssl, openssh"
TERMUX_PKG_SUGGESTS="mosh-perl"
termux_step_pre_configure() {
termux_setup_protobuf
# Keep this the same version which abseil-cpp requires
CXXFLAGS+=" -std=c++17"
LDFLAGS+=" $($TERMUX_SCRIPTDIR/packages/libprotobuf/interface_link_libraries.sh)"
}
termux_step_post_make_install() {
cd $TERMUX_PREFIX/bin
mv mosh mosh.pl
$CXX $CXXFLAGS $LDFLAGS \
-isystem $TERMUX_PREFIX/include \
-DPACKAGE_VERSION=\"$TERMUX_PKG_VERSION\" \
-std=c++11 -Wall -Wextra -Werror \
$TERMUX_PKG_BUILDER_DIR/mosh.cc -o mosh-bin
cat <<-EOF > mosh
#!$TERMUX_PREFIX/bin/sh
if [ -e "$TERMUX_PREFIX/bin/mosh.pl" ]; then
exec "$TERMUX_PREFIX/bin/mosh.pl" "\$@"
else
exec "$TERMUX_PREFIX/bin/mosh-bin" "\$@"
fi
EOF
chmod 0700 mosh
}