commit:     deb5dcd847321756374cc22a67f4296bdb455183
Author:     Charlie Quinet <w.iron.zombie <AT> gmail <DOT> com>
AuthorDate: Sun Feb  9 19:19:35 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Sun Feb  9 22:39:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=deb5dcd8

media-libs/amdvlk: add a patch to try supporting building with musl

Works on my machine with sys-libs/musl-9999, although I have not checked with 
the stable releases

Signed-off-by: Charlie Quinet <w.iron.zombie <AT> gmail.com>

 media-libs/amdvlk/amdvlk-2025.1.1.ebuild           |  2 ++
 .../files/amdvlk-2025.1.1-support-musl.patch       | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/media-libs/amdvlk/amdvlk-2025.1.1.ebuild 
b/media-libs/amdvlk/amdvlk-2025.1.1.ebuild
index 8df544c94..12c734016 100644
--- a/media-libs/amdvlk/amdvlk-2025.1.1.ebuild
+++ b/media-libs/amdvlk/amdvlk-2025.1.1.ebuild
@@ -99,6 +99,8 @@ pkg_pretend(){
 }
 
 src_prepare() {
+       use elibc_musl && PATCHES+=( 
"${FILESDIR}/amdvlk-2025.1.1-support-musl.patch" )
+
        einfo "moving src to proper directories"
        mkdir third_party || die
        mv xgl-${XGL_COMMIT}/ xgl || die

diff --git a/media-libs/amdvlk/files/amdvlk-2025.1.1-support-musl.patch 
b/media-libs/amdvlk/files/amdvlk-2025.1.1-support-musl.patch
new file mode 100644
index 000000000..dccf1ad5c
--- /dev/null
+++ b/media-libs/amdvlk/files/amdvlk-2025.1.1-support-musl.patch
@@ -0,0 +1,28 @@
+diff --git a/pal/src/util/file.cpp b/pal/src/util/file.cpp
+index db9df291..61c1969f 100644
+--- a/pal/src/util/file.cpp
++++ b/pal/src/util/file.cpp
+@@ -481,7 +481,7 @@ void File::Seek(
+ {
+     if (m_pFileHandle != nullptr)
+     {
+-        const int32 ret = fseeko64(m_pFileHandle, offset, 
static_cast<int>(pos));
++        const int32 ret = fseeko(m_pFileHandle, offset, 
static_cast<int>(pos));
+         PAL_ASSERT(ret == 0);
+     }
+ }
+diff --git a/pal/src/util/lnx/lnxSysUtil.cpp b/pal/src/util/lnx/lnxSysUtil.cpp
+index 0a05f3ae..ec05e28d 100644
+--- a/pal/src/util/lnx/lnxSysUtil.cpp
++++ b/pal/src/util/lnx/lnxSysUtil.cpp
+@@ -51,6 +51,10 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++#if !defined(ACCESSPERMS)
++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++
+ using namespace std::chrono;
+ 
+ namespace Util

Reply via email to