[manifest]
name = flex

[rpms]
flex

[debs]
flex

[download.not(os=windows)]
url = https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz
sha256 = e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995

[download.os=windows]
url = https://github.com/lexxmark/winflexbison/releases/download/v2.5.17/winflexbison-2.5.17.zip
sha256 = 3dc27a16c21b717bcc5de8590b564d4392a0b8577170c058729d067d95ded825

[build.not(os=windows)]
builder = autoconf
subdir = flex-2.6.4

[build.os=windows]
builder = nop

[install.files.os=windows]
data = bin/data
win_flex.exe = bin/flex.exe

# Moral equivalent to this PR that fixes a crash when bootstrapping flex
# on linux: https://github.com/easybuilders/easybuild-easyconfigs/pull/5792
[autoconf.args.os=linux]
CFLAGS=-D_GNU_SOURCE
