SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "spirv-llvm-translator"

# SliTaz package receipt.

PACKAGE="spirv-llvm-translator"
VERSION="13.0.1"
CATEGORY="development"
SHORT_DESC="LLVM/SPIR-V Bi-Directional Translator"
MAINTAINER="maintainer@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/"
TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v$VERSION.tar.gz"

DEPENDS="llvm"
BUILD_DEPENDS="cmake llvm spirv-headers"

# What is the latest version available today?
current_version()
{
    wget -O - https://github.com/llvm/llvm-project/releases 2>/dev/null | \
    sed '/-rc/d;/archive.*tar/!d;s|.*/[a-z-]*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
        mkdir build && cd build
        cmake \
            -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_SHARED_LIBS=ON \
        -DLLVM_INCLUDE_TESTS=OFF \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \
        -G 'Unix Makefiles' \
        -Wno-dev \
    ..

    make
    make llvm-spirv
    make install DESTDIR=$install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/bin
    cp -a $src/build/tools/llvm-spirv/llvm-spirv $fs/usr/bin
    cp -a $install/usr/lib $fs/usr
    #cp -a $install/usr/include $fs/usr
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)