kind: autotools

sources:
- kind: git
  url: upstream:gawk
  track: gawk-4.1-stable
  ref: 925f9363c4b0a5bb9375298afcdcf404efb32587

depends:
- filename: build-essential/stage1.bst
  type: build
- build-essential/stage2-linux-api-headers.bst
- build-essential/stage2-glibc.bst

variables:
  prefix: /tools

environment:
  PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin

config:

  configure-commands:
  - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" CPPFLAGS="--sysroot=$STAGE2_SYSROOT" CXX=false
    LDFLAGS="--sysroot=$STAGE2_SYSROOT" ./configure --prefix="%{prefix}" --disable-nls
    --build=$(sh config.guess)  --host=%{target-stage1}
  build-commands:
  - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make
