Update package version to 21.1.4
This commit is contained in:
@@ -1,9 +1,35 @@
|
|||||||
name: lld
|
name: lld
|
||||||
description: Linker from the LLVM project
|
description: Linker from the LLVM project
|
||||||
version: 20.1.8
|
version: 21.1.4
|
||||||
|
revision: 1
|
||||||
url: https://lld.llvm.org/
|
url: https://lld.llvm.org/
|
||||||
license: Apache-2.0 WITH LLVM-exception
|
license: Apache-2.0 WITH LLVM-exception
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["gcc-libs", "llvm-libs", "zlib", "zstd"]
|
|
||||||
make_depends: ["cmake", "ninja", "llvm"]
|
|
||||||
type: source
|
type: source
|
||||||
|
depends:
|
||||||
|
- gcc-libs
|
||||||
|
- llvm-libs
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
|
make_depends:
|
||||||
|
- cmake
|
||||||
|
- ninja
|
||||||
|
- llvm
|
||||||
|
- python-sphinx
|
||||||
|
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: 5d62eb36eb76ac9cc9179f31a355d28fc3a1c4096880da2a12090cfe1ccd3dcf
|
||||||
|
- 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: f311681255deb37f74bbf950a653e9434e7d8383a7b46a603a323c46cd4bf50e
|
||||||
|
- 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: fc3ca27e1094b5fd4b7c1879e83705d89e9a2632b9a43426eb96c0536ace5345
|
||||||
|
- 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: f4316d84a862ba3023ca1d26bd9c6a995516b4fa028b6fb329d22e24cc6d235e
|
||||||
|
|||||||
@@ -2,60 +2,43 @@
|
|||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
# 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
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
DOWNLOAD="https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/lld-${BPM_PKG_VERSION}.src.tar.xz"
|
|
||||||
DOWNLOAD_LLVM="https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/llvm-${BPM_PKG_VERSION}.src.tar.xz"
|
|
||||||
DOWNLOAD_LIBUNWIND="https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/libunwind-${BPM_PKG_VERSION}.src.tar.xz"
|
|
||||||
DOWNLOAD_CMAKE_MODULES="https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/cmake-${BPM_PKG_VERSION}.src.tar.xz"
|
|
||||||
FILENAME="${DOWNLOAD##*/}"
|
|
||||||
FILENAME_LLVM="${DOWNLOAD_LLVM##*/}"
|
|
||||||
FILENAME_LIBUNWIND="${DOWNLOAD_LIBUNWIND##*/}"
|
|
||||||
FILENAME_CMAKE_MODULES="${DOWNLOAD_CMAKE_MODULES##*/}"
|
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
# 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
|
# This function is used for downloading files and putting them into the correct location
|
||||||
prepare() {
|
prepare() {
|
||||||
wget "$DOWNLOAD"
|
|
||||||
wget "$DOWNLOAD_LLVM"
|
|
||||||
wget "$DOWNLOAD_LIBUNWIND"
|
|
||||||
wget "$DOWNLOAD_CMAKE_MODULES"
|
|
||||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
|
||||||
tar -xvf "$FILENAME_LLVM"
|
|
||||||
tar -xvf "$FILENAME_LIBUNWIND"
|
|
||||||
tar -xvf "$FILENAME_CMAKE_MODULES"
|
|
||||||
|
|
||||||
mv llvm-${BPM_PKG_VERSION}.src llvm
|
|
||||||
mv libunwind-${BPM_PKG_VERSION}.src libunwind
|
|
||||||
mv cmake-${BPM_PKG_VERSION}.src cmake
|
|
||||||
|
|
||||||
cd "$BPM_SOURCE"
|
cd "$BPM_SOURCE"
|
||||||
# Fix to https://github.com/llvmenv/llvmenv/issues/115
|
# Fix https://github.com/llvmenv/llvmenv/issues/115
|
||||||
ln -s ../../libunwind/include/mach-o MachO/mach-o
|
ln -s ../../libunwind/include/mach-o MachO/mach-o
|
||||||
}
|
}
|
||||||
|
|
||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
mkdir build
|
cmake -B build -G Ninja \
|
||||||
cd build
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
||||||
-DCMAKE_INSTALL_DOCDIR=share/doc \
|
-DCMAKE_INSTALL_DOCDIR=share/doc \
|
||||||
-DCMAKE_SKIP_RPATH=ON \
|
-DCMAKE_SKIP_RPATH=ON \
|
||||||
-DBUILD_SHARED_LIBS=ON \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
-DLLVM_BUILD_DOCS=ON \
|
-DLLVM_BUILD_DOCS=ON \
|
||||||
-DLLVM_INCLUDE_TESTS=ON \
|
-DLLVM_ENABLE_SPHINX=ON \
|
||||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
-DLLVM_INCLUDE_TESTS=OFF \
|
||||||
-DLLVM_MAIN_SRC_DIR="${BPM_SOURCE}/llvm" \
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||||
-G Ninja ..
|
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||||
ninja
|
-DLLVM_MAIN_SRC_DIR="${BPM_WORKDIR}"/llvm
|
||||||
|
cmake --build build
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
cd build
|
DESTDIR="$BPM_OUTPUT" cmake --install build
|
||||||
DESTDIR="$BPM_OUTPUT" ninja install
|
|
||||||
|
|
||||||
|
# Fix https://bugs.llvm.org/show_bug.cgi?id=42455
|
||||||
|
install -Dm644 "$BPM_SOURCE"/docs/ld.lld.1 "$BPM_OUTPUT"/usr/share/man/man1/ld.lld.1
|
||||||
|
|
||||||
|
# Remove documentation sources
|
||||||
|
rm -r "$BPM_OUTPUT"/usr/share/doc/lld/html/{_sources,.buildinfo}
|
||||||
|
|
||||||
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/lld/LICENSE.TXT
|
install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/lld/LICENSE.TXT
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user