public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Denis Reva" <denis7774@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-libs/amdvlk/files/, media-libs/amdvlk/
Date: Wed, 12 Oct 2022 08:44:59 +0000 (UTC)	[thread overview]
Message-ID: <1665564296.890b93904f29f7b7b607f41bd7eecfb443d9eac1.RarogCmex@gentoo> (raw)

commit:     890b93904f29f7b7b607f41bd7eecfb443d9eac1
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Wed Oct 12 08:44:45 2022 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Wed Oct 12 08:44:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=890b9390

media-libs/amdvlk: Fixes direct ar calls

Bug: https://bugs.gentoo.org/875821
Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 media-libs/amdvlk/amdvlk-2022.3.5-r1.ebuild        | 114 +++++++++++++++++++++
 .../amdvlk-2022.3.5-no-compiler-presets.patch      |  20 ++++
 2 files changed, 134 insertions(+)

diff --git a/media-libs/amdvlk/amdvlk-2022.3.5-r1.ebuild b/media-libs/amdvlk/amdvlk-2022.3.5-r1.ebuild
new file mode 100644
index 000000000..485a78945
--- /dev/null
+++ b/media-libs/amdvlk/amdvlk-2022.3.5-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+PYTHON_COMPAT=( python3_{8..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"
+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"
+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-util/DirectXShaderCompiler"
+
+CHECKREQS_MEMORY="16G"
+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="4118707939c2f4783d28ce2a383184a3794ca477"
+PAL_COMMIT="ae55b19b7553bf204b4945de9c11c5b05bc0e167"
+LLPC_COMMIT="7857f2e209fc65374f2891be52e3a4a22fbae483"
+GPURT_COMMIT="b89f22aadd0a335be632055434a7f8ba152fcb37"
+LLVM_PROJECT_COMMIT="5c82ef808fd269c95f5bd166d1846149e3afadc2"
+METROHASH_COMMIT="18893fb28601bb9af1154cd1a671a121fff6d8d3"
+CWPACK_COMMIT="4f8cf0584442a91d829d269158567d7ed926f026"
+# 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"
+
+PATCHES=(
+	"${FILESDIR}"/amdvlk-2022.3.5-no-compiler-presets.patch #875821
+)
+
+src_prepare() {
+	einfo "moving src to proper directories"
+	mkdir -p "${S}"
+	mkdir -p "${S}/third_party"
+	mv xgl-${XGL_COMMIT}/ "${S}/xgl"
+	mv pal-${PAL_COMMIT}/ "${S}/pal"
+	mv llpc-${LLPC_COMMIT}/ "${S}/llpc"
+	mv gpurt-${GPURT_COMMIT}/ "${S}/gpurt"
+	mv llvm-project-${LLVM_PROJECT_COMMIT}/ "${S}/llvm-project"
+	mv MetroHash-${METROHASH_COMMIT}/ "${S}/third_party/metrohash"
+	mv CWPack-${CWPACK_COMMIT}/ "${S}/third_party/cwpack"
+	cmake_src_prepare
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		-DBUILD_WAYLAND_SUPPORT=$(usex wayland)
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/amdvlk"
+		-DLLVM_VERSION_SUFFIX="-$(get_libdir)-amdvlk"
+		-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
+		-Wno-dev
+		)
+	cmake_src_configure
+}
+multilib_src_install(){
+	cmake_src_install
+	rm -r "${D}"/var/ || die "can't remove incorrect temporary files of amdvlk"
+	einfo "Correcting permissions of amdvlk $(get_libdir) libraries"
+	fperms -R 775 /usr/lib/llvm/amdvlk/$(get_libdir)
+}
+
+multilib_src_install_all() {
+	cat > "99${PN}" <<-EOF
+		LDPATH="${EPREFIX}/usr/lib/llvm/amdvlk/lib:${EPREFIX}/usr/lib/llvm/amdvlk/lib64"
+	EOF
+	doenvd "99${PN}"
+}
+
+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-2022.3.5-no-compiler-presets.patch b/media-libs/amdvlk/files/amdvlk-2022.3.5-no-compiler-presets.patch
new file mode 100644
index 000000000..095705b6b
--- /dev/null
+++ b/media-libs/amdvlk/files/amdvlk-2022.3.5-no-compiler-presets.patch
@@ -0,0 +1,20 @@
+diff --git a/xgl/CMakeLists.txt b/xgl/CMakeLists.txt
+index 0abdb0f42..dada07d96 100644
+--- a/xgl/CMakeLists.txt
++++ b/xgl/CMakeLists.txt
+@@ -31,7 +31,6 @@ option(XGL_USE_CLANG "Build with clang?" OFF)
+ if(UNIX AND XGL_USE_CLANG)
+     list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+     include(XglCompilerOptions)
+-    xgl_use_clang_compiler()
+ endif()
+ 
+ ### CMake Includes ####################################################################################################
+@@ -114,7 +113,6 @@ if(UNIX)
+ endif()
+ 
+ ### Set Compiler ######################################################################################################
+-xgl_set_compiler()
+ 
+ ### Sanitizers ########################################################################################################
+ # Temporary variables


             reply	other threads:[~2022-10-12  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  8:44 Denis Reva [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-27  9:24 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/amdvlk/files/, media-libs/amdvlk/ Denis Reva
2022-11-16 17:03 Denis Reva
2024-01-16 22:16 YOSHIOKA Takuma
2024-08-13 19:52 David Roman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1665564296.890b93904f29f7b7b607f41bd7eecfb443d9eac1.RarogCmex@gentoo \
    --to=denis7774@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox