Files
Arch-R/packages/devel/flex/package.mk
Rudi Heitbaum 49cdf3874c flex: use flex:host stage1flex when building scan.c from scan.l
The compile logic whilst building a CROSS compiled flex could be improved.
Given that we have already built flex:host and the necessary stage1flex,
just use it. Using the --disable-bootstrap logic in the make file which
would normally call sed, replace the sed call with the call to be previously
built stage1flex. Both the patch and the update to package.mk are required.
2025-06-02 06:03:44 +00:00

30 lines
1.0 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="flex"
PKG_VERSION="2.6.4"
PKG_SHA256="e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/westes/flex"
PKG_URL="https://github.com/westes/flex/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="ccache:host m4:host autotools:host bison:host"
PKG_DEPENDS_TARGET="toolchain flex:host"
PKG_LONGDESC="A tool for generating programs that perform pattern-matching on text."
PKG_TOOLCHAIN="autotools"
PKG_CONFIGURE_OPTS_HOST="--enable-static --disable-shared --disable-rpath --with-gnu-ld"
PKG_CONFIGURE_OPTS_TARGET="--disable-bootstrap \
ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes"
post_makeinstall_host() {
cat >${TOOLCHAIN}/bin/lex <<"EOF"
#!/bin/sh
exec flex "$@"
EOF
chmod -v 755 ${TOOLCHAIN}/bin/lex
}