diff --git a/pkg.info b/pkg.info index 3166da5..71a9bd9 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,11 @@ name: spirv-llvm-translator description: A tool and a library for bi-directional translation between SPIR-V and LLVM IR -version: 21.1.3 +version: 21.1.4 revision: 1 url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator license: LicenseRef-custom +maintainers: + - enumdev@enumerated.dev architecture: any type: source depends: @@ -15,3 +17,8 @@ make_depends: - llvm - ninja - spirv-headers +downloads: + - url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v${BPM_PKG_VERSION}/SPIRV-LLVM-Translator-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: e900c907b62f82cf541a611b33d6685f375fe3bda6f041087fcdba350ffb437d diff --git a/source.sh b/source.sh index d319ff9..8195628 100644 --- a/source.sh +++ b/source.sh @@ -2,36 +2,24 @@ # 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 -DOWNLOAD="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v${BPM_PKG_VERSION}/SPIRV-LLVM-Translator-${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - -# 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() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir build - cd build - - cmake -D CMAKE_INSTALL_PREFIX=/usr \ + cmake -B build \ + -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_BUILD_TYPE=Release \ -D BUILD_SHARED_LIBS=ON \ -D CMAKE_SKIP_INSTALL_RPATH=ON \ -D LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr \ - -G Ninja .. - ninja + -G Ninja + 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() { - cd build - DESTDIR="$BPM_OUTPUT" ninja install + DESTDIR="$BPM_OUTPUT" cmake --install build + # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/spirv-llvm-translator/LICENSE.TXT }