mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
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.
30 lines
1.0 KiB
Makefile
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
|
|
}
|