From 1035940bef7aff1719fa77f076def71bf17dd314 Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Mon, 29 Mar 2021 10:08:43 +0530 Subject: [PATCH] pkg(pony-0.39.0): Use `git submodule` to install llvm and get the source through cloning. --- packages/ponylang/0.39.0/build.sh | 27 +++++++-------------------- packages/ponylang/0.39.0/environment | 3 +-- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/packages/ponylang/0.39.0/build.sh b/packages/ponylang/0.39.0/build.sh index b3b8029..ac2fce6 100755 --- a/packages/ponylang/0.39.0/build.sh +++ b/packages/ponylang/0.39.0/build.sh @@ -2,27 +2,14 @@ PREFIX=$(realpath $(dirname $0)) -# Installing LLVM -mkdir -p llvm -cd llvm -curl -OL "http://llvm.org/releases/3.4/llvm-3.4.src.tar.gz" -tar xfz llvm-3.4.src.tar.gz -rm llvm-3.4.src.tar.gz -cd .. +# get sources - only get the latest copy of the relevant files +git clone --depth 1 https://github.com/ponylang/ponyc.git -# get sources -curl -OL "https://github.com/ponylang/ponyc/archive/refs/tags/0.39.0.tar.gz" -tar xfz 0.39.0.tar.gz -rm 0.39.0.tar.gz +# updates all submodules recursively along their tracking branches +# i.e. https://github.com/ponylang/ponyc/blob/main/.gitmodules +git submodule update --recursive --init -# cd into pony dir that was created from tar extraction. -cd ponyc-0.39.0 - -# Build the vendored LLVM libraries that are included in the `lib/llvm/src`. -make libs build_flags="-j$(nproc)" -# Configure the CMake build directory. -make configure -# Will build pony and put it in `build/release`. -make build +# build +make -j$(nproc) # Install pony into `$PREFIX`. make prefix="$PREFIX" install diff --git a/packages/ponylang/0.39.0/environment b/packages/ponylang/0.39.0/environment index 86a22f2..c6ab089 100644 --- a/packages/ponylang/0.39.0/environment +++ b/packages/ponylang/0.39.0/environment @@ -1,5 +1,4 @@ #!/usr/bin/env bash # Put 'export' statements here for environment variables -export PATH=$PWD/bin:$PATH -export LLVM_DIR=$PWD/llvm \ No newline at end of file +export PATH=$PWD/bin:$PATH \ No newline at end of file