From e99849d87826f318c38bbec488dbb271a8af8da0 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 20 Nov 2023 12:16:17 -0500 Subject: [PATCH] fix(scons) closes #4136 --- projects/scons.org/package.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/projects/scons.org/package.yml b/projects/scons.org/package.yml index d5a03029..99565851 100644 --- a/projects/scons.org/package.yml +++ b/projects/scons.org/package.yml @@ -7,6 +7,7 @@ versions: dependencies: python.org: ~3.11 + gnu.org/gcc: '>=10' # scons uses `gcc` build: python-venv.sh {{prefix}}/bin/scons @@ -14,20 +15,22 @@ provides: - bin/scons test: - script: | - mv $FIXTURE fixture.c + script: + - run: mv $FIXTURE fixture.c + fixture: | + #include + int main() { + printf("xyz.tea.hello-world"); + return 0; + } # scons doesn’t import the external environment # this means nobody will enjoy using scons with tea so we have to fix that - echo "import os" > SConstruct - echo "env = Environment(ENV = os.environ)" >> SConstruct - echo "env.Program('fixture.c')" >> SConstruct + - run: mv $FIXTURE SConstruct + fixture: | + import os + env = Environment(ENV = os.environ) + env.Program('fixture.c') - scons --debug=explain - test $(./fixture) = "xyz.tea.hello-world" - fixture: | - #include - int main() { - printf("xyz.tea.hello-world"); - return 0; - } + - scons --debug=explain + - test $(./fixture) = "xyz.tea.hello-world"