[source]
tar = "https://ftp.gnu.org/gnu/readline/readline-8.3.tar.gz"
blake3 = "7109f094062bda387a0c16b4875375b96e36437bebbbd8d8f91bb27ba01d687f"

[build]
template = "custom"
dependencies = [
    "ncursesw",
]
script = """
DYNAMIC_INIT
cookbook_configure
OS=$(echo "${TARGET}" | cut -d - -f3)
if [ "${OS}" = "redox" ]; then
    ln -s "libhistory.so.8" "${COOKBOOK_STAGE}"/usr/lib/libhistory.so
    ln -s "libreadline.so.8" "${COOKBOOK_STAGE}"/usr/lib/libreadline.so
    patchelf --add-needed libncursesw.so "${COOKBOOK_STAGE}/usr/lib/libreadline.so.8"
fi
"""
