pantry/projects/pkl-lang.org/package.yml

64 lines
1.8 KiB
YAML
Raw Normal View History

distributable:
url: https://github.com/apple/pkl/archive/refs/tags/{{version.tag}}.tar.gz
strip-components: 1
versions:
github: apple/pkl
companions:
openjdk.org: '*'
build:
dependencies:
openjdk.org: ^17
linux:
zlib.net: 1
llvm.org: '*'
script:
# graalvm fails to understand our compiler environment
- run: LINE_PREFIX=","
if: <0.26.0
- run: |
LINE_PREFIX="add("
LINE_SUFFIX=")"
if: '>=0.26.0'
- run: |
sed -i "/-H:Class=org.pkl.cli.Main/i\
${LINE_PREFIX}\"--static\"${LINE_SUFFIX}\
${LINE_PREFIX}\"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:CCompilerOption=-fPIC\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib\"${LINE_SUFFIX}\
${LINE_PREFIX}\"-H:-CheckToolchain\"${LINE_SUFFIX}" \
pkl-cli.gradle.kts
if: linux
working-directory: pkl-cli
- ./gradlew -DreleaseBuild=true :pkl-cli:javaExecutable :pkl-cli:${SYS_NAME%os}ExecutableA${ARCH_NAME#a}
- run: |
install -D jpkl {{prefix}}/bin/jpkl
install -D pkl-${SYS_NAME}-${ARCH_NAME} {{prefix}}/bin/pkl
working-directory: pkl-cli/build/executable
env:
darwin:
SYS_NAME: macos
linux:
SYS_NAME: linux
x86-64:
ARCH_NAME: amd64
aarch64:
ARCH_NAME: aarch64
provides:
- bin/jpkl
- bin/pkl
test:
- pkl --version
- jpkl --version
- pkl --version | grep {{version}}
- jpkl --version | grep {{version}}
2024-06-18 05:23:52 +03:00
- pkl eval template.pkl
- pkl eval template.pkl | grep 'Writing a Template'
- jpkl eval template.pkl | grep 'Writing a Template'
- pkl eval class.pkl | grep 'bestForConfig'
- jpkl eval class.pkl | grep 'bestForConfig'