summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Othón Martínez Vera <cfuga@cfuga.mx>2023-04-10 11:23:00 -0600
committerSam James <sam@gentoo.org>2024-03-08 18:34:04 +0000
commit57202035b4521bf73359b43498fd4a735760c88b (patch)
tree49b01289cfb77e5cce8765ca12105d19bc6c9706
parentmedia-libs/openexr: fix x86 musl build for version 3.1.5 (diff)
downloadgentoo-57202035b4521bf73359b43498fd4a735760c88b.tar.gz
gentoo-57202035b4521bf73359b43498fd4a735760c88b.tar.bz2
gentoo-57202035b4521bf73359b43498fd4a735760c88b.zip
media-libs/openexr: fix x86 musl build for version 3.1.7
Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx> Closes: https://github.com/gentoo/gentoo/pull/30542 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-libs/openexr/files/openexr-3.1.7-musl-i386.patch19
-rw-r--r--media-libs/openexr/openexr-3.1.7.ebuild6
2 files changed, 24 insertions, 1 deletions
diff --git a/media-libs/openexr/files/openexr-3.1.7-musl-i386.patch b/media-libs/openexr/files/openexr-3.1.7-musl-i386.patch
new file mode 100644
index 000000000000..e2bedf6e7a12
--- /dev/null
+++ b/media-libs/openexr/files/openexr-3.1.7-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__)) || defined(__ANDROID_API__)
++# if (defined(__linux__) && defined(__i386__)) || defined(__ANDROID_API__)
+ 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.7.ebuild b/media-libs/openexr/openexr-3.1.7.ebuild
index e3960f74c307..cedfef02a75b 100644
--- a/media-libs/openexr/openexr-3.1.7.ebuild
+++ b/media-libs/openexr/openexr-3.1.7.ebuild
@@ -25,7 +25,11 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
-PATCHES=( "${FILESDIR}"/${PN}-3.1.1-0003-disable-failing-test.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.1-0003-disable-failing-test.patch
+ "${FILESDIR}"/${PN}-3.1.7-musl-i386.patch
+)
+
DOCS=( CHANGES.md GOVERNANCE.md PATENTS README.md SECURITY.md )
src_prepare() {