Kevin Cotugno
6 years ago
committed by
Fredrik Fornwall
2 changed files with 0 additions and 111 deletions
@ -1,73 +0,0 @@ |
|||
TERMUX_PKG_HOMEPAGE=https://www.rust-lang.org |
|||
TERMUX_PKG_DESCRIPTION="Systems programming language that runs fast, prevents segfaults, and guarantees thread safety" |
|||
TERMUX_PKG_VERSION=1.29.0 |
|||
#TERMUX_PKG_SHA256=7689c95c0bab42e32eb82c1892785fe53faa8ae89a5c48bdfafb13a43ac8ec7e |
|||
#TERMUX_PKG_SRCURL=https://github.com/rust-lang/rust/archive/$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_DEPENDS="clang" |
|||
|
|||
termux_step_extract_package() { |
|||
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION |
|||
if [ ! -d $CHECKED_OUT_FOLDER ]; then |
|||
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout |
|||
rm -Rf $TMP_CHECKOUT |
|||
mkdir -p $TMP_CHECKOUT |
|||
|
|||
git clone \ |
|||
--depth 1 \ |
|||
--branch $TERMUX_PKG_VERSION \ |
|||
https://github.com/rust-lang/rust.git \ |
|||
$TMP_CHECKOUT |
|||
cd $TMP_CHECKOUT |
|||
git submodule update --init --recursive --progress |
|||
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER |
|||
fi |
|||
|
|||
mkdir $TERMUX_PKG_SRCDIR |
|||
cd $TERMUX_PKG_SRCDIR |
|||
cp -Rf $CHECKED_OUT_FOLDER/* . |
|||
} |
|||
|
|||
termux_step_configure() { |
|||
termux_setup_cmake |
|||
termux_setup_rust |
|||
|
|||
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \ |
|||
$TERMUX_PKG_BUILDER_DIR/config.toml \ |
|||
| sed "s%\@CARGO_TARGET_NAME\@%${CARGO_TARGET_NAME}%g" - \ |
|||
| sed "s%\@CC\@%${CC}%g" - \ |
|||
| sed "s%\@CXX\@%${CXX}%g" - \ |
|||
| sed "s%\@AR\@%${AR}%g" - \ |
|||
| sed "s%\@CARGO_PATH\@%$HOME/.cargo%g" - \ |
|||
> ./config.toml |
|||
|
|||
if [ $TERMUX_ARCH = "aarch64" ]; then |
|||
CARCH=AARCH64 |
|||
elif [ $TERMUX_ARCH = "i686" ]; then |
|||
CARCH=I686 |
|||
elif [ $TERMUX_ARCH = "x86_64" ]; then |
|||
CARCH=X86_64 |
|||
fi |
|||
|
|||
local ENV_SUFFIX=${CARGO_TARGET_NAME//-/_} |
|||
|
|||
export CFLAGS_$ENV_SUFFIX="$CFLAGS" |
|||
export CXXFLAGS_$ENV_SUFFIX="$CXXFLAGS" |
|||
export LDFLAGS_$ENV_SUFFIX="$LDFLAGS" |
|||
export LD_$ENV_SUFFIX="$LD" |
|||
export ${CARCH}_LINUX_ANDROID_OPENSSL_INCLUDE_DIR=$TERMUX_PREFIX/include |
|||
export ${CARCH}_LINUX_ANDROID_OPENSSL_LIB_DIR=$TERMUX_PREFIX/lib |
|||
|
|||
unset CFLAGS CXXFLAGS LDFLAGS CC CXX LD CPP CPPFLAGS PREFIX |
|||
} |
|||
|
|||
termux_step_make() { |
|||
$TERMUX_PKG_SRCDIR/x.py \ |
|||
--jobs $TERMUX_MAKE_PROCESSES \ |
|||
--target $CARGO_TARGET_NAME \ |
|||
dist |
|||
} |
|||
|
|||
termux_step_make_install() { |
|||
: |
|||
#$TERMUX_PKG_SRCDIR/x.py install |
|||
} |
@ -1,38 +0,0 @@ |
|||
# See documentation at |
|||
# https://github.com/rust-lang/rust/blob/master/config.toml.example |
|||
|
|||
[llvm] |
|||
link-shared = true |
|||
|
|||
[build] |
|||
host = ["@CARGO_TARGET_NAME@"] |
|||
target = ["@CARGO_TARGET_NAME@"] |
|||
cargo = "@CARGO_PATH@/bin/cargo" |
|||
rustc = "@CARGO_PATH@/bin/rustc" |
|||
docs = false |
|||
#extended = true |
|||
|
|||
[install] |
|||
prefix = "@TERMUX_PREFIX@" |
|||
|
|||
[rust] |
|||
use-jemalloc = false |
|||
channel = "stable" |
|||
optimize-tests = false |
|||
debuginfo-tests = false |
|||
codegen-tests = false |
|||
codegen-units = 0 |
|||
deny-warnings = false |
|||
|
|||
[target.x86_64-unknown-linux-gnu] |
|||
llvm-config = "/usr/bin/llvm-config" |
|||
|
|||
[target.@CARGO_TARGET_NAME@] |
|||
cc = "@CC@" |
|||
cxx = "@CXX@" |
|||
ar = "@AR@" |
|||
linker = "@CC@" |
|||
llvm-config = "@TERMUX_PREFIX@/bin/llvm-config" |
|||
|
|||
[dist] |
|||
src-tarball = false |
Loading…
Reference in new issue