amdvlk-2021.q2.5 cleanup

This commit is contained in:
lif 2023-10-27 21:55:43 -07:00
parent 5878d04b45
commit e21347658d

View file

@ -3,7 +3,6 @@
EAPI=8
# MULTILIB_COMPAT=( abi_x86_{32,64} )
PYTHON_COMPAT=( python3_{10..11} )
inherit check-reqs python-any-r1 cmake-multilib
@ -13,11 +12,9 @@ HOMEPAGE="https://github.com/GPUOpen-Drivers/AMDVLK"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="wayland" # +raytracing
# REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )"
IUSE="wayland"
BUNDLED_LLVM_DEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]"
# raytracing? ( dev-util/DirectXShaderCompiler )
DEPEND="wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
${BUNDLED_LLVM_DEPEND}
>=dev-util/vulkan-headers-1.3.224
@ -51,13 +48,9 @@ FETCH_URI="https://github.com/GPUOpen-Drivers"
XGL_COMMIT="14397c77fbc0c760397dd3162482407b2721a825"
PAL_COMMIT="02ac99ba650afb3aebff3eb8006862ce93d31968"
LLPC_COMMIT="c89f405e3632f0b639faafe61cd03cb851492f4e"
# GPURT_COMMIT="714a028e920c502520011fc4f4556f58ec897424"
LLVM_PROJECT_COMMIT="a85ea7baf89016f72d7cb7c94db4c996d70d9898"
METROHASH_COMMIT="3c566dd9cda44ca7fd97659e0b53ac953f9037d2"
CWPACK_COMMIT="7387247eb9889ddcabbc1053b9c2052e253b088e"
# 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
@ -66,15 +59,6 @@ ${FETCH_URI}/llvm-project/archive/${LLVM_PROJECT_COMMIT}.tar.gz -> amdvlk-llvm-p
${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"
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"
@ -91,10 +75,7 @@ src_prepare() {
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
@ -102,9 +83,9 @@ src_prepare() {
multilib_src_configure() {
sed -i -e '/target_compile_options.*msse/d' -e '/-mpreferred-stack-boundary=/d' "${WORKDIR}/xgl/cmake/XglCompilerOptions.cmake"
local -x CXXFLAGS="${CXXFLAGS} -include ctime -include cstdint"
local mycmakeargs=(
-DBUILD_WAYLAND_SUPPORT=$(usex wayland)
# -DVKI_RAY_TRACING=$(usex raytracing)
-DLLVM_HOST_TRIPLE="${CHOST}"
-DLLVM_ENABLE_WERROR=OFF
-DENABLE_WERROR=OFF
@ -145,7 +126,6 @@ pkg_postinst() {
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."
elog "VK_ICD_FILENAMES=/etc/vulkan/icd.d/amd_icd64.json - to use amdvlk."
elog "VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.$(uname -m).json - to use radv."
}