commit:     31fffa9cf2491c4353f867ca66adadf8bf1e3e2a
Author:     Cristian Othón Martínez Vera <cfuga <AT> cfuga <DOT> mx>
AuthorDate: Mon Apr 10 17:15:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 18:34:03 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31fffa9c

media-libs/openexr: fix x86 musl build for version 3.1.5

Signed-off-by: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../openexr/files/openexr-3.1.5-musl-i386.patch       | 19 +++++++++++++++++++
 media-libs/openexr/openexr-3.1.5-r1.ebuild            |  1 +
 2 files changed, 20 insertions(+)

diff --git a/media-libs/openexr/files/openexr-3.1.5-musl-i386.patch 
b/media-libs/openexr/files/openexr-3.1.5-musl-i386.patch
new file mode 100644
index 000000000000..2b7a31ac694d
--- /dev/null
+++ b/media-libs/openexr/files/openexr-3.1.5-musl-i386.patch
@@ -0,0 +1,19 @@
+--- a/src/lib/Iex/IexMathFpu.cpp
++++ b/src/lib/Iex/IexMathFpu.cpp
+@@ -251,14 +251,14 @@
+ inline void
+ restoreControlRegs (const ucontext_t & ucon, bool clearExceptions)
+ {
+-#        if defined(__GLIBC__) && defined(__i386__)
++#        if defined(__linux__) && defined(__i386__)
+     setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
+ #else
+     setCw ((ucon.uc_mcontext.fpregs->cwd & cwRestoreMask) | cwRestoreVal);
+ #        endif
+ 
+     _fpstate* kfp = reinterpret_cast<_fpstate*> (ucon.uc_mcontext.fpregs);
+-#        if defined(__GLIBC__) && defined(__i386__)
++#        if defined(__linux__) && defined(__i386__)
+     setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
+ #else
+     setMxcsr (kfp->mxcsr, clearExceptions);

diff --git a/media-libs/openexr/openexr-3.1.5-r1.ebuild 
b/media-libs/openexr/openexr-3.1.5-r1.ebuild
index a5039301aed5..8ec80d3071e3 100644
--- a/media-libs/openexr/openexr-3.1.5-r1.ebuild
+++ b/media-libs/openexr/openexr-3.1.5-r1.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.1.1-0003-disable-failing-test.patch
        
"${FILESDIR}"/${P}-Add-missing-include-cstdint-required-by-gcc-13-1264.patch
        "${FILESDIR}"/${P}-add-missed-include-cstdint-statement.patch
+       "${FILESDIR}"/${P}-musl-i386.patch
 )
 
 DOCS=( CHANGES.md GOVERNANCE.md PATENTS README.md SECURITY.md 
docs/SymbolVisibility.md )

Reply via email to