nim: use CFLAGS/LDFLAGS for nimble & koch

This commit is contained in:
Leonid Pliushch 2019-08-04 23:17:35 +03:00
parent 04e32bec03
commit 815e5459fc
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://nim-lang.org/
TERMUX_PKG_DESCRIPTION="Nim programming language compiler"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=0.20.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://nim-lang.org/download/nim-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=e1fa5c7e762a45535d82a961f88a6fc82e343985b780c3674081810e028d2b5e
TERMUX_PKG_DEPENDS="clang, git, libandroid-glob"
@ -39,9 +40,9 @@ termux_step_make() {
make LD=$CC uos=linux mycpu=$NIM_ARCH myos=android -j $TERMUX_MAKE_PROCESSES useShPath=$TERMUX_PREFIX/bin/sh
cp config/nim.cfg ../host-build/config
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --opt:size --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c koch.nim
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --opt:size --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:"$CPPFLAGS $CFLAGS" -l:"$LDFLAGS -landroid-glob" c koch.nim
cd dist/nimble/src
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c nimble.nim
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:"$CPPFLAGS $CFLAGS" -l:"$LDFLAGS -landroid-glob" c nimble.nim
}
termux_step_make_install() {