2020-04-28 09:01:16 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.nushell.sh
|
|
|
|
TERMUX_PKG_DESCRIPTION="A new type of shell operating on structured data"
|
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-05-05 03:09:41 +02:00
|
|
|
TERMUX_PKG_VERSION=0.62.0
|
2020-04-28 09:01:16 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/nushell/nushell/archive/$TERMUX_PKG_VERSION.tar.gz
|
2022-05-05 03:09:41 +02:00
|
|
|
TERMUX_PKG_SHA256=ed183be2579979097368441b0ded5cb21653f4e6f50b530729e65883cfe2aa20
|
2021-10-04 12:43:31 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2020-09-04 15:50:17 +02:00
|
|
|
TERMUX_PKG_DEPENDS="openssl, zlib"
|
2022-04-14 09:05:34 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2020-04-28 09:01:16 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2022-04-14 09:05:34 +02:00
|
|
|
TERMUX_PKG_CONFIGURE_EXTRA_ARGS="--features=extra"
|
2021-07-15 13:59:54 +02:00
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
2022-04-14 09:05:34 +02:00
|
|
|
termux_setup_rust
|
|
|
|
|
|
|
|
export CFLAGS="${TARGET_CFLAGS}"
|
|
|
|
|
|
|
|
local _CARGO_TARGET_LIBDIR="target/${CARGO_TARGET_NAME}/release/deps"
|
2022-02-20 18:59:49 +01:00
|
|
|
mkdir -p $_CARGO_TARGET_LIBDIR
|
|
|
|
|
2021-07-15 13:59:54 +02:00
|
|
|
if [ $TERMUX_ARCH = "i686" ]; then
|
2021-07-15 20:07:31 +02:00
|
|
|
RUSTFLAGS+=" -C link-arg=-latomic"
|
2022-02-20 18:59:49 +01:00
|
|
|
elif [ $TERMUX_ARCH = "x86_64" ]; then
|
|
|
|
pushd $_CARGO_TARGET_LIBDIR
|
|
|
|
local libgcc="$($CC -print-libgcc-file-name)"
|
2022-04-14 09:05:34 +02:00
|
|
|
echo "INPUT($libgcc -l:libunwind.a)" >libgcc.so
|
2022-02-20 18:59:49 +01:00
|
|
|
popd
|
2021-07-15 13:59:54 +02:00
|
|
|
fi
|
2022-02-19 04:57:35 +01:00
|
|
|
|
2022-04-14 09:05:34 +02:00
|
|
|
: "${CARGO_HOME:=$HOME/.cargo}"
|
|
|
|
export CARGO_HOME
|
|
|
|
|
|
|
|
cargo fetch --target "${CARGO_TARGET_NAME}"
|
|
|
|
|
|
|
|
for d in $CARGO_HOME/registry/src/github.com-*/libgit2-sys-*/libgit2; do
|
|
|
|
patch --silent -p1 -d ${d} \
|
|
|
|
<$TERMUX_SCRIPTDIR/packages/libgit2/src-rand.c.patch || :
|
|
|
|
cp $TERMUX_SCRIPTDIR/packages/libgit2/getloadavg.c ${d}/src/ || :
|
|
|
|
done
|
|
|
|
|
2022-02-19 04:57:35 +01:00
|
|
|
mv $TERMUX_PREFIX/lib/libz.so.1{,.tmp}
|
|
|
|
mv $TERMUX_PREFIX/lib/libz.so{,.tmp}
|
2022-02-20 18:59:49 +01:00
|
|
|
|
|
|
|
ln -sfT $(readlink -f $TERMUX_PREFIX/lib/libz.so.1.tmp) \
|
|
|
|
$_CARGO_TARGET_LIBDIR/libz.so.1
|
|
|
|
ln -sfT $(readlink -f $TERMUX_PREFIX/lib/libz.so.tmp) \
|
|
|
|
$_CARGO_TARGET_LIBDIR/libz.so
|
2022-02-19 04:57:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
|
|
|
mv $TERMUX_PREFIX/lib/libz.so.1{.tmp,}
|
|
|
|
mv $TERMUX_PREFIX/lib/libz.so{.tmp,}
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_massage() {
|
|
|
|
rm -f lib/libz.so.1
|
|
|
|
rm -f lib/libz.so
|
2021-07-15 13:59:54 +02:00
|
|
|
}
|