diff --git a/projects/crystal-lang.org/package.yml b/projects/crystal-lang.org/package.yml index 39e664c2..163221d8 100644 --- a/projects/crystal-lang.org/package.yml +++ b/projects/crystal-lang.org/package.yml @@ -32,7 +32,6 @@ dependencies: runtime: env: CRYSTAL_PATH: ${{prefix}}/lib:$CRYSTAL_PATH - CRYSTAL_LIBRARY_PATH: $LD_LIBRARY_PATH build: dependencies: @@ -77,6 +76,5 @@ test: - cp $FIXTURE test.cr - crystal build -o test test.cr - test "$(./test)" = "{{version}}" - # FIXME: this should work, but because it compiles with LLVM, it needs the - # @rpath set somehow. - # - test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}" + - test "$(crystal eval 'puts {{Crystal::VERSION}}')" = "{{version}}" + - test "$(cat $FIXTURE | crystal eval)" = "{{version}}" diff --git a/projects/crystal-lang.org/shim b/projects/crystal-lang.org/shim index 3deba49f..4e7d984c 100755 --- a/projects/crystal-lang.org/shim +++ b/projects/crystal-lang.org/shim @@ -5,5 +5,16 @@ shift case "$cmd" in build) crystal.bin "$cmd" --link-flags "${CRYSTAL_LINK_FLAGS:-}" "$@";; + eval) + TEMP=$(mktemp) + if test $# -gt 0; then + echo "$@" > "$TEMP" + else + # stdin.... hm + cat > "$TEMP" + fi + crystal.bin run --link-flags "${CRYSTAL_LINK_FLAGS:-}" "$TEMP" + rm "$TEMP" + ;; *) crystal.bin "$cmd" "$@";; esac