diff --git a/packages/devel/flex/package.mk b/packages/devel/flex/package.mk index 1473535c41..0d992066c2 100644 --- a/packages/devel/flex/package.mk +++ b/packages/devel/flex/package.mk @@ -9,13 +9,14 @@ 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" +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="ac_cv_func_realloc_0_nonnull=yes \ +PKG_CONFIGURE_OPTS_TARGET="--disable-bootstrap \ + ac_cv_func_realloc_0_nonnull=yes \ ac_cv_func_malloc_0_nonnull=yes" post_makeinstall_host() { diff --git a/packages/devel/flex/patches/flex-0001-use-flex-host-for-target-cross-compile.patch b/packages/devel/flex/patches/flex-0001-use-flex-host-for-target-cross-compile.patch new file mode 100644 index 0000000000..6d9ef2fd6c --- /dev/null +++ b/packages/devel/flex/patches/flex-0001-use-flex-host-for-target-cross-compile.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.am 2025-05-25 13:43:29.363027456 +0000 ++++ b/src/Makefile.am 2025-05-25 13:44:38.701129436 +0000 +@@ -100,7 +100,7 @@ + ./stage1flex$(EXEEXT) $(AM_LFLAGS) $(LFLAGS) -o $@ $(srcdir)/scan.l + else + stage1scan.c: scan.c +- sed 's|^\(#line .*\)"'`printf %s $< | sed 's|[][\\\\.*]|\\\\&|g'`'"|\1"$@"|g' $< > $@ ++ ../../.$(HOST_NAME)/src/stage1flex$(EXEEXT) $(AM_LFLAGS) $(LFLAGS) -o $@ $(srcdir)/scan.l + endif + + dist-hook: scan.l flex$(EXEEXT)