lua-language-server: update patch logic

This commit is contained in:
Aditya Alok 2021-10-28 01:35:46 +05:30
parent e1c980b84b
commit e97dd8baff
No known key found for this signature in database
GPG Key ID: 5A52117417798AC7

View File

@ -14,13 +14,19 @@ TERMUX_PKG_BUILD_IN_SRC=true
# https://github.com/actboy168/bee.lua/blob/32f65b92739fa236d87fc1b2e7617470d47f0355/bee/thread/spinlock.h#L14
TERMUX_PKG_BLACKLISTED_ARCHES="arm,i686"
termux_step_pre_configure() {
_patch() {
if [ "${TERMUX_ON_DEVICE_BUILD}" = true ]; then
current_dir=$(pwd)
cd "${TERMUX_PKG_SRCDIR}"
patch --silent -p1 <"${TERMUX_PKG_BUILDER_DIR}"/android.patch.ondevice.beforehostbuild
cd "${current_dir}"
fi
}
termux_step_host_build() {
_patch
termux_setup_ninja
mkdir 3rd
@ -32,8 +38,9 @@ termux_step_host_build() {
termux_step_make() {
sed \
-e "s%\@FLAGS\@%${CFLAGS} ${CPPFLAGS}%g" "${TERMUX_PKG_BUILDER_DIR}"/make.lua.diff \
-e "s%\@LDFLAGS\@%${LDFLAGS}%g" "${TERMUX_PKG_BUILDER_DIR}"/make.lua.diff | patch --silent -p1
-e "s%\@FLAGS\@%${CFLAGS} ${CPPFLAGS}%g" \
-e "s%\@LDFLAGS\@%${LDFLAGS}%g" \
"${TERMUX_PKG_BUILDER_DIR}"/make.lua.diff | patch --silent -p1
"${TERMUX_PKG_HOSTBUILD_DIR}"/3rd/luamake/luamake \
-cc "${CC}" \