diff options
author | Matt Turner <mattst88@gentoo.org> | 2023-11-09 09:56:48 -0800 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-11-09 10:39:57 -0800 |
commit | e647950b1c84adefcd97e2f247740c5bc18b8b3f (patch) | |
tree | 01bb33fc339f8501f2ce18bfcc85ac9f33d0198c /dev-util | |
parent | media-libs/mesa: Depend on external dev-util/intel_clc (diff) | |
download | gentoo-e647950b1c84adefcd97e2f247740c5bc18b8b3f.tar.gz gentoo-e647950b1c84adefcd97e2f247740c5bc18b8b3f.tar.bz2 gentoo-e647950b1c84adefcd97e2f247740c5bc18b8b3f.zip |
dev-util/intel_clc: Version bump to 23.3.0_rc3
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/intel_clc/Manifest | 1 | ||||
-rw-r--r-- | dev-util/intel_clc/intel_clc-23.3.0_rc3.ebuild | 114 |
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-util/intel_clc/Manifest b/dev-util/intel_clc/Manifest new file mode 100644 index 000000000000..f1102425d75a --- /dev/null +++ b/dev-util/intel_clc/Manifest @@ -0,0 +1 @@ +DIST mesa-23.3.0-rc3.tar.xz 19192936 BLAKE2B a54ac02b99bf00e4dae34938fd37d5314ae0fd9dee4b2f8928119bcc5a6b4e00add8ad61da3569b9993b37014433fb38a66d945e77184d86aaf0cd79e8afb42b SHA512 be70ce2ba0051685e9585944dcfc8c66d33f68827781d6d003a98b4409bd9e28d00eef730e0eded5c1c14a600219411753c14c7e5e34190bbe8b65b5bf28fabd diff --git a/dev-util/intel_clc/intel_clc-23.3.0_rc3.ebuild b/dev-util/intel_clc/intel_clc-23.3.0_rc3.ebuild new file mode 100644 index 000000000000..96f6b5b4df3e --- /dev/null +++ b/dev-util/intel_clc/intel_clc-23.3.0_rc3.ebuild @@ -0,0 +1,114 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit llvm meson python-any-r1 + +MY_PV="${PV/_/-}" + +DESCRIPTION="intel_clc tool used for building OpenCL C to SPIR-V" +HOMEPAGE="https://mesa3d.org/" + +if [[ ${PV} == 9999 ]]; then + S="${WORKDIR}/intel_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" +fi + +LICENSE="MIT SGI-B-2.0" +SLOT="0" +IUSE="debug" + +RDEPEND=" + dev-util/spirv-tools + >=sys-libs/zlib-1.2.8:= + x11-libs/libdrm +" +DEPEND="${RDEPEND} + dev-libs/expat +" +BDEPEND=" + ${PYTHON_DEPS} + $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") + virtual/pkgconfig +" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling one than more slot +# simultaneously. +# +# How to use it: +# 1. Specify LLVM_MAX_SLOT (inclusive), e.g. 16. +# 2. Specify LLVM_MIN_SLOT (inclusive), e.g. 15. +LLVM_MAX_SLOT="16" +LLVM_MIN_SLOT="15" +PER_SLOT_DEPSTR=" + ( + dev-util/spirv-llvm-translator:@SLOT@ + sys-devel/clang:@SLOT@ + sys-devel/llvm:@SLOT@ + ) +" +LLVM_DEPSTR=" + || ( + $(for ((slot=LLVM_MAX_SLOT; slot>=LLVM_MIN_SLOT; slot--)); do + echo "${PER_SLOT_DEPSTR//@SLOT@/${slot}}" + done) + ) + <sys-devel/clang-$((LLVM_MAX_SLOT + 1)):= + <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):= +" +RDEPEND="${RDEPEND} + ${LLVM_DEPSTR} +" +unset LLVM_MIN_SLOT {LLVM,PER_SLOT}_DEPSTR + +llvm_check_deps() { + has_version "dev-util/spirv-llvm-translator:${LLVM_SLOT}" && + has_version "sys-devel/clang:${LLVM_SLOT}" && + has_version "sys-devel/llvm:${LLVM_SLOT}" +} + +python_check_deps() { + python_has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" +} + +pkg_setup() { + llvm_pkg_setup + python-any-r1_pkg_setup +} + +src_configure() { + PKG_CONFIG_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/$(get_libdir)/pkgconfig" + + local emesonargs=( + -Dllvm=enabled + -Dshared-llvm=enabled + -Dintel-clc=enabled + + -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 + -Dzstd=disabled + + --buildtype $(usex debug debug plain) + -Db_ndebug=$(usex debug false true) + ) + meson_src_configure +} + +src_install() { + dobin "${BUILD_DIR}"/src/intel/compiler/intel_clc +} |