aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsername404-59 <w.iron.zombie@gmail.com>2024-08-13 20:57:11 +0200
committerDavid Roman <davidroman96@gmail.com>2024-08-13 21:51:16 +0200
commit5ab730bea13f3bc7c0a2b78de047ab2e7931ec8e (patch)
treebe95d9706a760cb2920b0415db9ded7101372f9e /media-libs
parentmedia-libs/amdvlk: drop old ebuilds (diff)
downloadguru-5ab730bea13f3bc7c0a2b78de047ab2e7931ec8e.tar.gz
guru-5ab730bea13f3bc7c0a2b78de047ab2e7931ec8e.tar.bz2
guru-5ab730bea13f3bc7c0a2b78de047ab2e7931ec8e.zip
media-libs/amdvlk: add 2024.3.1
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com> Closes: https://github.com/gentoo/guru/pull/230 Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/amdvlk/Manifest8
-rw-r--r--media-libs/amdvlk/amdvlk-2024.3.1.ebuild148
-rw-r--r--media-libs/amdvlk/files/amdvlk-2024.3.1-disable-Werror.patch13
3 files changed, 169 insertions, 0 deletions
diff --git a/media-libs/amdvlk/Manifest b/media-libs/amdvlk/Manifest
index e69de29bb..031d3acbe 100644
--- a/media-libs/amdvlk/Manifest
+++ b/media-libs/amdvlk/Manifest
@@ -0,0 +1,8 @@
+DIST amdvlk-CWPack-4f8cf0584442a91d829d269158567d7ed926f026.tar.gz 39633 BLAKE2B d5b2a88f0d563eef5beb42a8304cf6cdd825e75242c22acc360c5bb9cbd1d02a4f891b6b2f3a4803e1e6b48a4d176aad40f8bdeca92847f2fbf53674dedeaff3 SHA512 06d56baaba1f1224a5266f4a63c1abf70edba7cc16cc4e62f2f5b1ec94fc2c1cfc4c6f11a9c6ef42c23b29be8d07921caad5e919357c0bd82cf714783eee0bcc
+DIST amdvlk-LLVM-dialects-6ff7d39046e280e446fd69aa08c6c6524c68c728.tar.gz 106772 BLAKE2B f00991a1d984bdca1b15ef803d0cf5b75a299c294a0e6ea9bd656ad669426f055cace518950833b35a17c18faafd0318a80f18f5b8e7b3c7fa27f4bec0d65239 SHA512 64e5dbb60fd0d863a58e39dc214c6393a1393cac7aa89ac95c4c285c4daed5f8d40069462081dbcf84043a6478cc471ee9d6e7b74215ba5199a60a2e338f508a
+DIST amdvlk-MetroHash-18893fb28601bb9af1154cd1a671a121fff6d8d3.tar.gz 11729 BLAKE2B b0e3de885e50c317141d62c885b421c7fd2e1ac783733704342bbed3109bff36a9209ab276f534a2231531483539221bbb1014bd39528a91124161bafc5646eb SHA512 8f12f95e80d594c8bd87a852c67a2d6777ce89d1a13e1a87ee17bbb876a0702c14ffe7a7fd65a244620f2043ad5d22ae8eb863d69f1dc5494d985733bbfb7bf9
+DIST amdvlk-gpurt-c5b10793bd96432609de2d5945a03ed54b7ebbe8.tar.gz 347915 BLAKE2B 16f770105ac58127eb7da4bc19f55d4e4119190f0be9d39e93d225bffb0a66883d3c06e0cda5b32afad2a218ea09941603a0eba2448bd61f7afda11f065ea069 SHA512 35806ebfc30b7e57ff3a6defeb87e6b049329ea02765264bb7e77ea84f53965b20593570b402730390a23c3284543a180c64dac40139dbcc0ceadf0dac7e2cb2
+DIST amdvlk-llpc-5278a3ff4f184ac76060892671c88d539be084c8.tar.gz 2768765 BLAKE2B 376618d3d63aaf5cd7fa8c2c37e667e9f1add40d3019c6c5cf6ef9e997eea665300bff1d7b665c44808bd1b0abc5735adf8f7ed4be902ed675d003718b0644ed SHA512 3165a854b28df064bf98289eb71f2deb5be5b8dafb22691983d4b085916a3349776445db3b39c3fd89bcea2e19a04d515fa372b25b8d5af60a27f81f70a85ef1
+DIST amdvlk-llvm-project-eb619c26c273559f0512aea704a4b0821c80b318.tar.gz 216601046 BLAKE2B 0b328679c71759a653e6ffd91d7ba0813053d6e5e7339256a735195ccef71a78b71342f5ffe75d9545845bfe368dfb35bc4fc72d56db4500edab9b389ffb6284 SHA512 48b46afeba7d1a020ddc72f559c29ffbfedb291df612ecb16bf237a4e3f1ddd055cb2802e9ee0dff727b71c70138c64645d2fe00b6d01db462bd6ea20b2a055e
+DIST amdvlk-pal-d3bfe509cd335b06d1276a5bb3ceb8dce622ca34.tar.gz 9245270 BLAKE2B 9bd315742e8b12e2f88e5046e30a95e31c313a3f2752bcfc76e88153289949994c426a59155eda1ed6342bbd67aeb4f6a24caa1177e5a2c77122ae5a4f97134e SHA512 19daf28a2702681df9470d95106125359382c97c049216f6e7801204638c29b6353ca330e6c76b3f02137da2d4b6f0ff3bb34b8fa3b1e93f1d62f175f58cfe00
+DIST amdvlk-xgl-8bf20dd1ca8b6b773ff0a773c09a845a9be42a96.tar.gz 1350996 BLAKE2B 1521504663a8976371398f91869d14515855a0a1cd1851d4e80ef1d94bd2aa6f4f163ce17e3f6ecc1df727985ca17bc4f2ddc468424c985c640ee3baaedc5c2f SHA512 e91ed1eb5b2d97e99ebebbead7859dd9380c405be3256ce4ed3365c7e4d468fef6749d6cc8221870994f8259955c2d74a6f708458aaf7e819d6da5b8364fd208
diff --git a/media-libs/amdvlk/amdvlk-2024.3.1.ebuild b/media-libs/amdvlk/amdvlk-2024.3.1.ebuild
new file mode 100644
index 000000000..bf94c3878
--- /dev/null
+++ b/media-libs/amdvlk/amdvlk-2024.3.1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit check-reqs python-any-r1 cmake-multilib
+
+DESCRIPTION="AMD Open Source Driver for Vulkan"
+HOMEPAGE="https://github.com/GPUOpen-Drivers/AMDVLK"
+
+### SOURCE CODE PER_VERSION VARIABLES
+FETCH_URI="https://github.com/GPUOpen-Drivers"
+## For those who wants update ebuild: check https://github.com/GPUOpen-Drivers/AMDVLK/blob/${VERSION}/default.xml
+## e.g. https://github.com/GPUOpen-Drivers/AMDVLK/blob/v-2022.Q3.5/default.xml
+## and place commits in the desired variables
+## EXAMPLE: XGL_COMMIT="80e5a4b11ad2058097e77746772ddc9ab2118e07"
+## SRC_URI="... ${FETCH_URI}/$PART/archive/$COMMIT.zip -> $PART-$COMMIT.zip ..."
+XGL_COMMIT="8bf20dd1ca8b6b773ff0a773c09a845a9be42a96"
+PAL_COMMIT="d3bfe509cd335b06d1276a5bb3ceb8dce622ca34"
+LLPC_COMMIT="5278a3ff4f184ac76060892671c88d539be084c8"
+GPURT_COMMIT="c5b10793bd96432609de2d5945a03ed54b7ebbe8"
+LLVM_PROJECT_COMMIT="eb619c26c273559f0512aea704a4b0821c80b318"
+METROHASH_COMMIT="18893fb28601bb9af1154cd1a671a121fff6d8d3"
+CWPACK_COMMIT="4f8cf0584442a91d829d269158567d7ed926f026"
+# Submodule of LLPC, also updates often. Grab commit version from
+# https://github.com/GPUOpen-Drivers/llpc/tree/${LLPC_COMMIT}/imported
+LLVM_DIALECTS_COMMIT="6ff7d39046e280e446fd69aa08c6c6524c68c728"
+### end of variables
+SRC_URI="${FETCH_URI}/xgl/archive/${XGL_COMMIT}.tar.gz -> amdvlk-xgl-${XGL_COMMIT}.tar.gz
+${FETCH_URI}/pal/archive/${PAL_COMMIT}.tar.gz -> amdvlk-pal-${PAL_COMMIT}.tar.gz
+${FETCH_URI}/llpc/archive/${LLPC_COMMIT}.tar.gz -> amdvlk-llpc-${LLPC_COMMIT}.tar.gz
+${FETCH_URI}/gpurt/archive/${GPURT_COMMIT}.tar.gz -> amdvlk-gpurt-${GPURT_COMMIT}.tar.gz
+${FETCH_URI}/llvm-project/archive/${LLVM_PROJECT_COMMIT}.tar.gz -> amdvlk-llvm-project-${LLVM_PROJECT_COMMIT}.tar.gz
+${FETCH_URI}/MetroHash/archive/${METROHASH_COMMIT}.tar.gz -> amdvlk-MetroHash-${METROHASH_COMMIT}.tar.gz
+${FETCH_URI}/CWPack/archive/${CWPACK_COMMIT}.tar.gz -> amdvlk-CWPack-${CWPACK_COMMIT}.tar.gz
+${FETCH_URI}/llvm-dialects/archive/${LLVM_DIALECTS_COMMIT}.tar.gz -> amdvlk-LLVM-dialects-${LLVM_DIALECTS_COMMIT}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="wayland +raytracing"
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )"
+
+BUNDLED_LLVM_DEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]"
+DEPEND="wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+ ${BUNDLED_LLVM_DEPEND}
+ >=dev-util/vulkan-headers-1.3.283
+ raytracing? ( dev-util/DirectXShaderCompiler )
+ dev-util/glslang[${MULTILIB_USEDEP}]"
+BDEPEND="${BUNDLED_LLVM_DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/ruamel-yaml
+ virtual/linux-sources"
+RDEPEND=" ${DEPEND}
+ x11-libs/libdrm[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr[${MULTILIB_USEDEP}]
+ x11-libs/libxcb[${MULTILIB_USEDEP}]
+ x11-libs/libxshmfence[${MULTILIB_USEDEP}]
+ >=media-libs/vulkan-loader-1.3.283[${MULTILIB_USEDEP}]
+ dev-util/glslang[${MULTILIB_USEDEP}]
+ dev-libs/openssl[${MULTILIB_USEDEP}]" #890449
+
+CHECKREQS_MEMORY="7G"
+CHECKREQS_DISK_BUILD="4G"
+S="${WORKDIR}"
+CMAKE_USE_DIR="${S}/xgl"
+CMAKE_MAKEFILE_GENERATOR=ninja
+
+PATCHES=(
+ "${FILESDIR}/amdvlk-2022.3.5-no-compiler-presets.patch" #875821
+ "${FILESDIR}/amdvlk-2022.4.1-proper-libdir.patch"
+ "${FILESDIR}/amdvlk-2022.4.2-license-path.patch" #878803
+ #"${FILESDIR}/amdvlk-2022.4.2-reduced-llvm-installations.patch"
+ #"${FILESDIR}/amdvlk-2022.4.2-reduced-llvm-installations-part2.patch"
+ "${FILESDIR}/amdvlk-2024.3.1-disable-Werror.patch"
+)
+
+pkg_pretend(){
+ ewarn "It's generally recomended to have at least 16GB memory to build"
+ ewarn "However, experiments shows that if you'll use MAKEOPTS=\"-j1\" you can build it with 4GB RAM"
+ ewarn "or you can use MAKEOPTS=\"-j3\" with 7.5GB system memory"
+ ewarn "See https://wiki.gentoo.org/wiki/AMDVLK#Additional_system_requirements_to_build"
+ ewarn "Use CHECKREQS_DONOTHING=1 if you need to bypass memory checking"
+
+ check-reqs_pkg_pretend
+}
+
+src_prepare() {
+ einfo "moving src to proper directories"
+ mkdir third_party || die
+ mv xgl-${XGL_COMMIT}/ xgl || die
+ mv pal-${PAL_COMMIT}/ pal || die
+ mv llpc-${LLPC_COMMIT}/ llpc || die
+ mv gpurt-${GPURT_COMMIT}/ gpurt || die
+ mv llvm-project-${LLVM_PROJECT_COMMIT}/ llvm-project || die
+ rm -d llpc/imported/llvm-dialects/ || die
+ mv llvm-dialects-${LLVM_DIALECTS_COMMIT}/ llpc/imported/llvm-dialects/ || die
+ mv MetroHash-${METROHASH_COMMIT}/ third_party/metrohash || die
+ mv CWPack-${CWPACK_COMMIT}/ third_party/cwpack || die
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_WAYLAND_SUPPORT=$(usex wayland)
+ -DVKI_RAY_TRACING=$(usex raytracing)
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+ -DLLVM_ENABLE_WERROR=OFF
+ -DENABLE_WERROR=OFF
+ -DVAM_ENABLE_WERROR=OFF
+ -DICD_ANALYSIS_WARNINGS_AS_ERRORS=OFF
+ -DMETROHASH_ENABLE_WERROR=OFF
+ -DBUILD_SHARED_LIBS=OFF #LLVM parts don't support shared libs
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DPACKAGE_VERSION="${PV}"
+ -DPACKAGE_NAME="${PN}"
+ -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON #Disable installation of various LLVM parts which we had to clean up.
+ -Wno-dev
+ )
+ cmake_src_configure
+}
+
+multilib_check_headers() {
+ einfo "Checking headers skipped: there is no headers"
+}
+
+multilib_src_install_all() {
+ default
+ einfo "Removing unused LLVM parts…"
+ rm "${ED}"/usr/lib/libLTO* || die "Can't remove unused LLVM lto library"
+ rm "${ED}"/usr/lib/libRemarks* || die "Can't remove unused LLVM libRemarks library"
+ rm -r "${ED}"/usr/lib/cmake || die "Can't remove unused LLVM cmake folder"
+ einfo "Removal done"
+}
+
+pkg_postinst() {
+ ewarn "Make sure the following line is NOT included in the any Xorg configuration section:"
+ ewarn "| Driver \"modesetting\""
+ ewarn "and make sure you use DRI3 mode for Xorg (not revelant for wayland)"
+ elog "More information about the configuration can be found here:"
+ elog "https://github.com/GPUOpen-Drivers/AMDVLK"
+ elog "You can use AMD_VULKAN_ICD variable to switch to the required driver."
+ elog "AMD_VULKAN_ICD=RADV application - for using radv."
+ elog "AMD_VULKAN_ICD=AMDVLK application - for using amdvlk."
+}
diff --git a/media-libs/amdvlk/files/amdvlk-2024.3.1-disable-Werror.patch b/media-libs/amdvlk/files/amdvlk-2024.3.1-disable-Werror.patch
new file mode 100644
index 000000000..8a9894b34
--- /dev/null
+++ b/media-libs/amdvlk/files/amdvlk-2024.3.1-disable-Werror.patch
@@ -0,0 +1,13 @@
+diff --git a/pal/shared/devdriver/cmake/DevDriver.cmake b/pal/shared/devdriver/cmake/DevDriver.cmake
+index 74e966da..64157700 100644
+--- a/pal/shared/devdriver/cmake/DevDriver.cmake
++++ b/pal/shared/devdriver/cmake/DevDriver.cmake
+@@ -93,7 +93,7 @@ function(apply_devdriver_warnings name)
+ target_compile_options(${name} PRIVATE
+ -Wall # Enable all warnings.
+ -Wextra # Enable extra warnings that are not enabled by -Wall.
+- -Werror # Treat warnings as errors
++ #-Werror # Treat warnings as errors
+ )
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ target_compile_options(${name} PRIVATE