From 40e6dd041fd3661ff1a61e509d9ab36dce652150 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 8 May 2025 13:42:42 +0300 Subject: [PATCH] Update package version to 18.1.7 --- check-version.sh | 12 ++++++++++++ pkg.info | 10 ++++++++-- pkg.info.clang | 9 --------- source.sh | 13 ++++++++++--- 4 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 check-version.sh delete mode 100644 pkg.info.clang diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..20c0adc --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="llvm/llvm-project" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 8f71309..60a40b4 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,15 @@ name: llvm description: A collection of modular and reusable compiler and toolchain technologies -version: 17.0.6 +version: 18.1.7 url: https://llvm.org license: Apache2-with-llvm-exception architecture: any -depends: ["perl"] make_depends: ["cmake","libffi","ncurses","ninja","python3","zlib","zstd"] type: source +split_packages: + - name: llvm + depends: ["perl"] + - name: clang + description: C language family frontend for LLVM + url: https://clang.llvm.org/ + depends: ["gcc","llvm"] diff --git a/pkg.info.clang b/pkg.info.clang deleted file mode 100644 index 300013c..0000000 --- a/pkg.info.clang +++ /dev/null @@ -1,9 +0,0 @@ -name: clang -description: C language family frontend for LLVM -version: 17.0.6 -url: https://clang.llvm.org/ -license: Apache2-with-llvm-exception -architecture: any -depends: ["gcc","llvm"] -make_depends: ["cmake","libffi","ncurses","ninja","python3","zlib","zstd"] -type: source diff --git a/source.sh b/source.sh index d1784f4..f2b78d5 100644 --- a/source.sh +++ b/source.sh @@ -18,6 +18,7 @@ prepare() { wget "$DOWNLOAD_CLANG" wget "$DOWNLOAD_CMAKE_MODULES" wget "$DOWNLOAD_THIRD_PARTY" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" tar -xvf "$FILENAME_CLANG" -C "$BPM_SOURCE"/tools mv "$BPM_SOURCE"/tools/clang-${BPM_PKG_VERSION}.src "$BPM_SOURCE"/tools/clang @@ -49,12 +50,12 @@ build() { # The package function is executed in the source directory # This function is used to move the compiled files into the output directory -package() { +package_llvm() { cd build DESTDIR="$BPM_OUTPUT" ninja install cp bin/FileCheck "$BPM_OUTPUT"/usr/bin - install -Dm644 ../LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/llvm/LICENSE.TXT + # Move clang files to another temporary directory CLANG="$BPM_WORKDIR"/clang-output mkdir -p "$CLANG"/{usr/bin,usr/lib,usr/lib/cmake/,usr/include,usr/share,usr/share/man/man1} mv "$BPM_OUTPUT"/usr/bin/{amdgpu-arch,analyze-build,c-index-test,diagtool,git-clang-format,hmaptool,intercept-build,nvptx-arch,scan-build,scan-build-py,scan-view} "$CLANG"/usr/bin @@ -68,11 +69,17 @@ package() { mv "$BPM_OUTPUT"/usr/share/man/man1/scan-build.1 -t "$CLANG"/usr/share/man/man1 mv "$BPM_OUTPUT"/usr/share/scan-build -t "$CLANG"/usr/share mv "$BPM_OUTPUT"/usr/share/scan-view -t "$CLANG"/usr/share + + # Install package license + install -Dm644 ../LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/llvm/LICENSE.TXT } -package-clang() { +package_clang() { + # Move clang files to 'output' diorectory CLANG="$BPM_WORKDIR"/clang-output rmdir "$BPM_OUTPUT" mv "$CLANG" "$BPM_OUTPUT" + + # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT }