0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-19 16:52:16 +00:00
2024-10-14 14:17:36 +03:00

34 lines
887 B
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/dimkr/loksh
TERMUX_PKG_DESCRIPTION="A Linux port of OpenBSD's ksh"
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="7.6"
TERMUX_PKG_SRCURL=git+https://github.com/dimkr/loksh
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="ncurses"
termux_step_post_get_source() {
pushd subprojects/lolibc
mv include _include_lolibc
mkdir include
mv _include_lolibc include/lolibc
pushd include/lolibc
local _LOLIBC_HEADERS=$(find * -name '*.h')
popd
popd
local f
for f in $(find . -name '*.[ch]'); do
local h
for h in ${_LOLIBC_HEADERS}; do
sed -i "s:#include <${h//./\\.}>:#include <lolibc/${h}>:g" ${f}
done
done
cd subprojects/lolibc/include/lolibc
for f in ${_LOLIBC_HEADERS}; do
sed -i "s:#include_next :#include :g" ${f}
done
CFLAGS+=" -D__USE_GNU"
}