Initial commit

This commit is contained in:
2025-11-02 18:06:26 +02:00
commit 59bdd7ff7c
4 changed files with 83 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# Ignore this package
echo "ignore"
+34
View File
@@ -0,0 +1,34 @@
name: lld20
description: Linker from the LLVM project
version: 20.1.8
revision: 1
url: https://lld.llvm.org/
license: Apache-2.0 WITH LLVM-exception
architecture: any
type: source
depends:
- gcc-libs
- llvm20-libs
- zlib
- zstd
make_depends:
- cmake
- ninja
- llvm20
downloads:
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/lld-${BPM_PKG_VERSION}.src.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 8281462d62cae67dfe5fdbb4da0d82bc62e0a86d4d4f758b0b601d44f09fd987
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/llvm-${BPM_PKG_VERSION}.src.tar.xz
extract_to: llvm
extract_strip_components: 1
checksum: e1363888216b455184dbb8a74a347bf5612f56a3f982369e1cba6c7e0726cde1
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/libunwind-${BPM_PKG_VERSION}.src.tar.xz
extract_to: libunwind
extract_strip_components: 1
checksum: 0bced9d701e300f8fe6599523367e214c1f928ac559afceece58f47018e9c4a7
- url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/cmake-${BPM_PKG_VERSION}.src.tar.xz
extract_to: cmake
extract_strip_components: 1
checksum: 3319203cfd1172bbac50f06fa68e318af84dcb5d65353310c0586354069d6634
+43
View File
@@ -0,0 +1,43 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
prepare() {
cd "$BPM_SOURCE"
# Fix https://github.com/llvmenv/llvmenv/issues/115
ln -s ../../libunwind/include/mach-o MachO/mach-o
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm20 \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_CMAKE_DIR=/usr/lib/llvm20/lib/cmake \
-DLLVM_CONFIG=/usr/lib/llvm20/bin/llvm-config \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_ENABLE_SPHINX=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_MAIN_SRC_DIR="${BPM_WORKDIR}"/llvm
cmake --build build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
DESTDIR="$BPM_OUTPUT" cmake --install build
# Symlink libraries
for lib in COFF Common ELF MachO MinGW Wasm; do
ln -s llvm20/lib/liblld"$lib".so.${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/lib/liblld"$lib".so.${BPM_PKG_VERSION%.*}
done
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/lld/LICENSE.TXT
}