dev-util/mesa_clc-25.2.3 media-libs/mesa-25.2.3-r1 on llvm:21
This commit is contained in:
parent
af8546c70c
commit
1fb0e4129f
5 changed files with 515 additions and 100 deletions
|
|
@ -1 +1 @@
|
|||
DIST mesa-25.0.0.tar.xz 46643728 BLAKE2B 9aca2416ea4e304d46fda648cb9b8e04caa053458b91893fb874e9a30d8293722c3bed1098c2720b04b0c7278eba3b0387900b56e13b6133a23c0f6be705025c SHA512 7f5b6674c40b6c8dcab7934512ff754b40a6a8a466422c90236f614d322033d4d465307ddcd983f9f3afb1310e132ec3186a085d261c95493a0c460b2ec59ce8
|
||||
DIST mesa-25.2.3.tar.xz 43670524 BLAKE2B 1810c17e589f95f1e3b18f2562a0c193016a6b9aa260387d06b0750db7c1fb08e7ad1b2476caf79cde18fa919b320de2b12508228047e8ca3af13efb2046b3fe SHA512 e03c09de2a6482a87362c0bf4fab4f9b32ffa48935a8724eb83e75b246f1bfc59524d04ea7e8cbea34e5c6ad2a0793195a076fe2d27da8fb7e05f56c7662eac5
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit llvm-r1 meson python-any-r1
|
||||
|
||||
MY_PV="${PV/_/-}"
|
||||
|
||||
DESCRIPTION="mesa_clc tool used for building OpenCL C to SPIR-V"
|
||||
HOMEPAGE="https://mesa3d.org/"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
S="${WORKDIR}/mesa_clc-${MY_PV}"
|
||||
EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git"
|
||||
inherit git-r3
|
||||
else
|
||||
S="${WORKDIR}/mesa-${MY_PV}"
|
||||
SRC_URI="https://archive.mesa3d.org/mesa-${MY_PV}.tar.xz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/spirv-tools
|
||||
$(llvm_gen_dep '
|
||||
dev-util/spirv-llvm-translator:${LLVM_SLOT}
|
||||
llvm-core/clang:${LLVM_SLOT}=
|
||||
=llvm-core/libclc-${LLVM_SLOT}*
|
||||
llvm-core/llvm:${LLVM_SLOT}=
|
||||
')
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-libs/expat
|
||||
>=sys-libs/zlib-1.2.8:=
|
||||
x11-libs/libdrm
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep "
|
||||
>=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]
|
||||
dev-python/packaging[\${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[\${PYTHON_USEDEP}]
|
||||
")
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/packaging[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" || return 1
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
llvm-r1_pkg_setup
|
||||
python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
|
||||
|
||||
use debug && EMESON_BUILDTYPE=debug
|
||||
|
||||
local emesonargs=(
|
||||
-Dllvm=enabled
|
||||
-Dshared-llvm=enabled
|
||||
-Dmesa-clc=enabled
|
||||
-Dinstall-mesa-clc=true
|
||||
|
||||
-Dgallium-drivers=''
|
||||
-Dvulkan-drivers=''
|
||||
|
||||
# Set platforms empty to avoid the default "auto" setting. If
|
||||
# platforms is empty meson.build will add surfaceless.
|
||||
-Dplatforms=''
|
||||
|
||||
-Dglx=disabled
|
||||
-Dlibunwind=disabled
|
||||
-Dzstd=disabled
|
||||
|
||||
-Db_ndebug=$(usex debug false true)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${BUILD_DIR}"/src/compiler/clc/mesa_clc
|
||||
dobin "${BUILD_DIR}"/src/compiler/spirv/vtn_bindgen
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
LLVM_COMPAT=( {18..21} )
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
|
||||
inherit llvm-r1 meson python-any-r1
|
||||
|
||||
|
|
@ -20,12 +20,17 @@ if [[ ${PV} == 9999 ]]; then
|
|||
else
|
||||
S="${WORKDIR}/mesa-${MY_PV}"
|
||||
SRC_URI="https://archive.mesa3d.org/mesa-${MY_PV}.tar.xz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
VIDEO_CARDS="asahi panfrost"
|
||||
for card in ${VIDEO_CARDS}; do
|
||||
IUSE_VIDEO_CARDS+=" video_cards_${card}"
|
||||
done
|
||||
IUSE="${IUSE_VIDEO_CARDS} debug"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/spirv-tools
|
||||
|
|
@ -63,6 +68,14 @@ pkg_setup() {
|
|||
}
|
||||
|
||||
src_configure() {
|
||||
tools_enable video_cards_asahi asahi
|
||||
tools_enable video_cards_panfrost panfrost
|
||||
|
||||
tools_list() {
|
||||
local tools="$(sort -u <<< "${1// /$'\n'}")"
|
||||
echo "${tools//$'\n'/,}"
|
||||
}
|
||||
|
||||
PKG_CONFIG_PATH="$(get_llvm_prefix)/$(get_libdir)/pkgconfig"
|
||||
|
||||
use debug && EMESON_BUILDTYPE=debug
|
||||
|
|
@ -72,6 +85,9 @@ src_configure() {
|
|||
-Dshared-llvm=enabled
|
||||
-Dmesa-clc=enabled
|
||||
-Dinstall-mesa-clc=true
|
||||
-Dprecomp-compiler=enabled
|
||||
-Dinstall-precomp-compiler=true
|
||||
-Dtools=$(tools_list "${TOOLS[*]}")
|
||||
|
||||
-Dgallium-drivers=''
|
||||
-Dvulkan-drivers=''
|
||||
|
|
@ -86,10 +102,22 @@ src_configure() {
|
|||
|
||||
-Db_ndebug=$(usex debug false true)
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${BUILD_DIR}"/src/compiler/clc/mesa_clc
|
||||
dobin "${BUILD_DIR}"/src/compiler/spirv/vtn_bindgen2
|
||||
use video_cards_asahi && dobin "${BUILD_DIR}"/src/asahi/clc/asahi_clc
|
||||
use video_cards_panfrost && dobin "${BUILD_DIR}"/src/panfrost/clc/panfrost_compile
|
||||
}
|
||||
|
||||
# $1 - VIDEO_CARDS flag (check skipped for "--")
|
||||
# other args - names of tools to enable
|
||||
tools_enable() {
|
||||
if [[ $1 == -- ]] || use $1; then
|
||||
shift
|
||||
TOOLS+=("$@")
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue