diff options
author | Denis Reva <denis7774@gmail.com> | 2023-03-03 18:07:26 +0500 |
---|---|---|
committer | Denis Reva <denis7774@gmail.com> | 2023-03-03 18:07:36 +0500 |
commit | f86ff8889e34abcaffb6fe26112d61df6ded49a3 (patch) | |
tree | e165ce7dd8eee6df297bc5f478f43bfc16e6be6e /media-libs | |
parent | media-libs/nvidia-vaapi-driver: new package (diff) | |
download | guru-f86ff8889e34abcaffb6fe26112d61df6ded49a3.tar.gz guru-f86ff8889e34abcaffb6fe26112d61df6ded49a3.tar.bz2 guru-f86ff8889e34abcaffb6fe26112d61df6ded49a3.zip |
media-libs/amdvlk: updated to latest
Signed-off-by: Denis Reva <denis7774@gmail.com>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/amdvlk/Manifest | 5 | ||||
-rw-r--r-- | media-libs/amdvlk/amdvlk-2023.1.2.ebuild | 145 |
2 files changed, 150 insertions, 0 deletions
diff --git a/media-libs/amdvlk/Manifest b/media-libs/amdvlk/Manifest index 6576690d9..e2ebc95c1 100644 --- a/media-libs/amdvlk/Manifest +++ b/media-libs/amdvlk/Manifest @@ -1,8 +1,13 @@ DIST amdvlk-CWPack-4f8cf0584442a91d829d269158567d7ed926f026.tar.gz 39633 BLAKE2B d5b2a88f0d563eef5beb42a8304cf6cdd825e75242c22acc360c5bb9cbd1d02a4f891b6b2f3a4803e1e6b48a4d176aad40f8bdeca92847f2fbf53674dedeaff3 SHA512 06d56baaba1f1224a5266f4a63c1abf70edba7cc16cc4e62f2f5b1ec94fc2c1cfc4c6f11a9c6ef42c23b29be8d07921caad5e919357c0bd82cf714783eee0bcc DIST amdvlk-LLVM-dialects-d12df4e895733e0adf8364f22349d92a000ae30d.tar.gz 33556 BLAKE2B c8e005345e965b1ce2d3977886a4939291d00fc4483f7a22b18399c1e0c7e39f766f50d7fb873e5defee58c2f57980b0692e70a11144d0e08e29ac9a57c9fa40 SHA512 77f37150bfcb26f657461c457b4240ba1d339b661521b1633d625439ee5cbcd1765b1eba9dd8239548692058a2e69df6cb359baee5bbb4d3e45d9d664ce04bc7 +DIST amdvlk-LLVM-dialects-f282131c7c331688c31f7c3aabe9b6d3ff09fbc4.tar.gz 33544 BLAKE2B c3c4adcd0413be6a4240820f7efdf3f5e03faf188cb48fd3845b2b84ed9d55d7f334ea91d5b3439b0653cfd0e5e70145092d59b8de9640408b05907f3769396c SHA512 c1d6a2d2528b273645a6a005f8b8c14209104bec9102a5dd344d0f005e6eff6d5478b8ce674f7c6241ecc11aff15a229caf502a10e017cdcadb41b14b28ebead DIST amdvlk-MetroHash-18893fb28601bb9af1154cd1a671a121fff6d8d3.tar.gz 11729 BLAKE2B b0e3de885e50c317141d62c885b421c7fd2e1ac783733704342bbed3109bff36a9209ab276f534a2231531483539221bbb1014bd39528a91124161bafc5646eb SHA512 8f12f95e80d594c8bd87a852c67a2d6777ce89d1a13e1a87ee17bbb876a0702c14ffe7a7fd65a244620f2043ad5d22ae8eb863d69f1dc5494d985733bbfb7bf9 +DIST amdvlk-gpurt-172e852f90365bac5869f83eb9c929d9daae51f0.tar.gz 308347 BLAKE2B b2839366fd35a452bf29502837c9aeeb1badf181dbe5fb57e042d073dccccb73c4069b5c7c6f3cc7938f9fb45f851e94a30f31c0698d2a523a28bb077ca15d6e SHA512 fae3cdc0c070ddd1d0d7b02ed13b527ec3fe8f766063f8e3fc1cd24729843139d5b5e1d68aec7596ce80128498f14c1e47c775928aa9a341df6429c6a2f24a4e DIST amdvlk-gpurt-e19c8ceca056f0b0d24ca4ecd654ef21d40ea063.tar.gz 303085 BLAKE2B 51efb5bfc62496225ff2ef82760b7d6e5b7b484a43f100a6eec870d6f29c353c3d83c66896687d1ff6a0f2a8569cae157b120642ea1185d1157d95606b08cb2c SHA512 998570f5df17ac2ce457acf5732f0e4ce813403362ea7b88e9805eb6180d92f55933494f204d85549a02e804a8204b35ddfc83e8bd166a8d0c212078cac27ec9 +DIST amdvlk-llpc-522365aa657f9cf65c4634261b800a04e214fd38.tar.gz 2595121 BLAKE2B a82bfd688abb18857d0c8db28c946eee5be97e3f5740d0ecbbcb01cd978d4bec3eb221ece192bbb49feec27d76b2e682717a48fb56153e6098742362d8c75d61 SHA512 2d2f8245776b37eba2ef271dc22707b0d81422cc6a1ed1983eea51a22f89ca28a147b8b0f4b6126b92193c0b33cf81d08ea7d6121f20f5270296381ea0e82820 DIST amdvlk-llpc-ffc49b2a07dea2754c1f7f3457a4ab5b4129c422.tar.gz 2599441 BLAKE2B 38c7596947afaf1a40b1e834714d98404aa40a5101a6f989f9cb0a08cae57c8229165241aae1f232511e91b7f1f9bb8c8ba668960dae888e06e2e9f80d6cf386 SHA512 831645a6a107569cec5823a9383de0fb01d7ad469cc14d21e9fd673d3c2efaa4dcb7e7e2453437ced7a2e73c35bcae4b72eb0e9f662b16849ddf310c37dd913d DIST amdvlk-llvm-project-916f05c15939f5c94a3ec95d5b1fd6dbaf6c1ee4.tar.gz 167651090 BLAKE2B 5d5be2f308f7ca4e12b9bb67fcb33f05245719c0388befe28fd327a4d17b15298a5730ef65dbecb260c4d3f436b5c1204c111e31953fe8ce402df6f4430e865f SHA512 13f87d75d11c779c3e791ee619ba847ca36951d3a6db11441bde455e82936dfee29c21f15412bde711ac5f957be908c80d9248e945be3b0aa59777608b91cd9e DIST amdvlk-pal-042362399cdac1019fbc7f0ace8489aee2907883.tar.gz 12426374 BLAKE2B b4cd6f3496e9146e481de339128cb6b4be735aec2982f45af9806ce8647cd5e5cc3470dc4bcf82f354f03c227faff3f63148444ac26fd1a54ecdfd9844cff7e7 SHA512 5845d3bdc312915b07b1b59df387d4611ad280c499a8fdb1fa2ec0eba37a286179461b0eb445ac32646cd2c4842670f5e48f26b15a2a4b76864d7efb3fba3e69 +DIST amdvlk-pal-ac9ff8bd22605bf7fd428fd9cf83248fb4dbe94b.tar.gz 12387976 BLAKE2B bba22f4dab618d6c0a82f1a147d1abc3f098bda78ff654991df9a7b0d8d6b79fc7c2bdf5674587a1694820f1be16dcb9a21e6d6c805fa0e1306f414701e5745c SHA512 c57a521a43e29bfbc730caa267005cfa3b557793310a717967a0e471cfecf44947cdbdab9dd9171f788b98b1653bd7630f43d9fff72bd2193c5eba6c6781c2d0 DIST amdvlk-xgl-67cd9d1d3016c0522ddf83ba0a0b2bda0de27d4c.tar.gz 1243619 BLAKE2B 46f133a057158f293daa0c37bb60ca87d96728f7becffe5c78839b0658f9237ed1c5b11d57e569f0b62e7542a4f48afbada6527eb5e9c2cb62cbda8b4dd2bd2c SHA512 d7b9970a3bd444149e1801ffc268796a02833db39132c32f7745350bc423c40d111e9e338e9f0e35fa8b6b84c527d313669ff9f7b1488fcf2d4c834ab7495bf2 +DIST amdvlk-xgl-b72c7accced07675aeddace4e143152406076932.tar.gz 1245899 BLAKE2B 9de616524eaead6c650bf9c75f6bb2737e25ffd518012771b66878f4ea20a1b29f18f8e9c5b3f7eb16e0676652f13d8e62e2460376d7d6e2fcef54b82c4e5c61 SHA512 d5b975967fbb168717c8dcd2b9a1f786e5fead2276f9aaf3ca1fe68e8fd0ad00999f3af4e507b58674a62973a6f1cc57495280522aeea77f4925e4b7686e7b65 diff --git a/media-libs/amdvlk/amdvlk-2023.1.2.ebuild b/media-libs/amdvlk/amdvlk-2023.1.2.ebuild new file mode 100644 index 000000000..d27ef3e3d --- /dev/null +++ b/media-libs/amdvlk/amdvlk-2023.1.2.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) +PYTHON_COMPAT=( python3_{9..11} ) + +inherit check-reqs python-any-r1 cmake-multilib + +DESCRIPTION="AMD Open Source Driver for Vulkan" +HOMEPAGE="https://github.com/GPUOpen-Drivers/AMDVLK" +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.224 + raytracing? ( dev-util/DirectXShaderCompiler ) + dev-util/glslang[${MULTILIB_USEDEP}]" +BDEPEND="${BUNDLED_LLVM_DEPEND} + ${PYTHON_DEPS} + dev-util/cmake + 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.224[${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" + +### 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="b72c7accced07675aeddace4e143152406076932" +PAL_COMMIT="ac9ff8bd22605bf7fd428fd9cf83248fb4dbe94b" +LLPC_COMMIT="522365aa657f9cf65c4634261b800a04e214fd38" +GPURT_COMMIT="172e852f90365bac5869f83eb9c929d9daae51f0" +LLVM_PROJECT_COMMIT="916f05c15939f5c94a3ec95d5b1fd6dbaf6c1ee4" +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="f282131c7c331688c31f7c3aabe9b6d3ff09fbc4" +### 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" + +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-2022.4.4-r1-disable-Werror.patch" #887777 +) + +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." +} |