aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Reva <denis7774@gmail.com>2023-03-22 09:42:49 +0500
committerDenis Reva <denis7774@gmail.com>2023-03-22 09:42:57 +0500
commitaa7528ef8db102c525f1aa4a69366b50545310b8 (patch)
tree6fa7b00cfbb10435c772c0a4bddab43cacde12e9 /media-libs
parentmedia-libs/nvidia-vaapi-driver: updated to latest 0.0.9 (diff)
downloadguru-aa7528ef8db102c525f1aa4a69366b50545310b8.tar.gz
guru-aa7528ef8db102c525f1aa4a69366b50545310b8.tar.bz2
guru-aa7528ef8db102c525f1aa4a69366b50545310b8.zip
media-libs/amdvlk: added WIP version: it isn't working
Signed-off-by: Denis Reva <denis7774@gmail.com>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/amdvlk/Manifest6
-rw-r--r--media-libs/amdvlk/amdvlk-2023.1.3.ebuild151
2 files changed, 157 insertions, 0 deletions
diff --git a/media-libs/amdvlk/Manifest b/media-libs/amdvlk/Manifest
index e2ebc95c1..4d1ac16e9 100644
--- a/media-libs/amdvlk/Manifest
+++ b/media-libs/amdvlk/Manifest
@@ -1,13 +1,19 @@
DIST amdvlk-CWPack-4f8cf0584442a91d829d269158567d7ed926f026.tar.gz 39633 BLAKE2B d5b2a88f0d563eef5beb42a8304cf6cdd825e75242c22acc360c5bb9cbd1d02a4f891b6b2f3a4803e1e6b48a4d176aad40f8bdeca92847f2fbf53674dedeaff3 SHA512 06d56baaba1f1224a5266f4a63c1abf70edba7cc16cc4e62f2f5b1ec94fc2c1cfc4c6f11a9c6ef42c23b29be8d07921caad5e919357c0bd82cf714783eee0bcc
+DIST amdvlk-LLVM-dialects-17aafecff46b68206a0ed82d58f5e2fc358367a1.tar.gz 44441 BLAKE2B a94eb01ae3a2a868a1613e17573c5326252fa163d8e336b8c3292d0e3e349e3df98b124d300bbe42870bc2d60d18afe2c566e4484b45beb84a7087c0d58291e4 SHA512 4a6b2484f0fbb63f2cf987184a12f8a4a344ebfbfe5c1f37423fbda88c171f2eee0f7af4d0b066a9a87c3b22e0c92b7f7f1f5536b4c5d59fb2ca10b963cb8e62
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-714a028e920c502520011fc4f4556f58ec897424.tar.gz 308297 BLAKE2B aeb699332b76cd6d0ac0dcc47a410e8a6ad0b6b073ca2521b3e6c06b4307ee74b79ae9f7767f43e863b8070f664ffd9ffcbacab5f0b12576069e5469b8f5251e SHA512 8044de6555dd2c73ff75d059bda1bba3ef6960c46bb6a92b4ff77e3ced3a8100380ec3d27e5e8ad49fae2fe6994d548494535aa5023412033a2ed9b9236b52bc
DIST amdvlk-gpurt-e19c8ceca056f0b0d24ca4ecd654ef21d40ea063.tar.gz 303085 BLAKE2B 51efb5bfc62496225ff2ef82760b7d6e5b7b484a43f100a6eec870d6f29c353c3d83c66896687d1ff6a0f2a8569cae157b120642ea1185d1157d95606b08cb2c SHA512 998570f5df17ac2ce457acf5732f0e4ce813403362ea7b88e9805eb6180d92f55933494f204d85549a02e804a8204b35ddfc83e8bd166a8d0c212078cac27ec9
+DIST amdvlk-llpc-1ecd9997579b962be571162931c9e38bd86bafad.tar.gz 2618677 BLAKE2B 5849ce333bc52ea1bba47f253834c10974fdc2089ba41fa41a89d9a9fe0249f6e4286985e092c5aaaa52b2e9aff3704dde01ac09fad82d43556b67786156092e SHA512 11f69a6f31a282acc410d1ddd6a8996842e1076cdd49db8f08378ab1401acac1d4eba48788b7f78fb5d5297dda52fd1ceaeec6e68986168c0a92b49222bda3b5
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-llvm-project-fdc6165b081b7b5e5ba245f4283fcb23d6d9f167.tar.gz 179654477 BLAKE2B 4a09ad5d194525365106b44627693f6eef49b9bd9c38c9eb690ea0288593e7a72467e0f2da757e728b40ee11a26ae3e5305aefe0744965dc7b0166f348539116 SHA512 e8603930e389cbcd0433d48bd72763b0d3ac3acd4f6fadaa3ac68f5148881723863f2816fa6ae34b4cb87538f77a70eb318b31d5ef9c085cc72a5dc9ca83fcb2
DIST amdvlk-pal-042362399cdac1019fbc7f0ace8489aee2907883.tar.gz 12426374 BLAKE2B b4cd6f3496e9146e481de339128cb6b4be735aec2982f45af9806ce8647cd5e5cc3470dc4bcf82f354f03c227faff3f63148444ac26fd1a54ecdfd9844cff7e7 SHA512 5845d3bdc312915b07b1b59df387d4611ad280c499a8fdb1fa2ec0eba37a286179461b0eb445ac32646cd2c4842670f5e48f26b15a2a4b76864d7efb3fba3e69
+DIST amdvlk-pal-4640888b579bc9b0951c586b08a4552f71780d0d.tar.gz 12404946 BLAKE2B a348bce089766ac86539df1f9297df61d94d5db7993f95d86e8967e8641090949d177e9f6d9c1b257404eac8a0a05836c7f0dd6964b8bfc1946a21c47d7f19e0 SHA512 3b43ff0a86f66a238a02a7c71a0fe957deb63968abf2f48b1222ffd048d8fd3e864240a956fb013ab6336eebebb7a76538f748c0c93fbda9ab110e1d33547ef3
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-997225355d7fce7392a9e32fe9f0a515f5736d0f.tar.gz 1247401 BLAKE2B 5381474b3e8eb1783ab5b6a6059204fdd1fc6215a4bdc724bef874908d860f3f306773235325c725bddbc1c7e416a00a865e7b11e5218c3bca9fccd09e6bda95 SHA512 4217567268525f934dbde112e4a3b7703576d63cd49776dc1d991897bce406533d5954196cface6c31663d9ae073ec74ea0b084e55dfa91314aca350b9effa47
DIST amdvlk-xgl-b72c7accced07675aeddace4e143152406076932.tar.gz 1245899 BLAKE2B 9de616524eaead6c650bf9c75f6bb2737e25ffd518012771b66878f4ea20a1b29f18f8e9c5b3f7eb16e0676652f13d8e62e2460376d7d6e2fcef54b82c4e5c61 SHA512 d5b975967fbb168717c8dcd2b9a1f786e5fead2276f9aaf3ca1fe68e8fd0ad00999f3af4e507b58674a62973a6f1cc57495280522aeea77f4925e4b7686e7b65
diff --git a/media-libs/amdvlk/amdvlk-2023.1.3.ebuild b/media-libs/amdvlk/amdvlk-2023.1.3.ebuild
new file mode 100644
index 000000000..d4e0d8798
--- /dev/null
+++ b/media-libs/amdvlk/amdvlk-2023.1.3.ebuild
@@ -0,0 +1,151 @@
+# 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=""
+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"
+CMAKE_MAKEFILE_GENERATOR=ninja
+
+### 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="997225355d7fce7392a9e32fe9f0a515f5736d0f"
+PAL_COMMIT="4640888b579bc9b0951c586b08a4552f71780d0d"
+LLPC_COMMIT="1ecd9997579b962be571162931c9e38bd86bafad"
+GPURT_COMMIT="714a028e920c502520011fc4f4556f58ec897424"
+LLVM_PROJECT_COMMIT="fdc6165b081b7b5e5ba245f4283fcb23d6d9f167"
+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="17aafecff46b68206a0ed82d58f5e2fc358367a1"
+### 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_src_install() {
+ cmake_src_install --component icd
+}
+
+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."
+}