new package: openexr

This commit is contained in:
Tee KOBAYASHI 2022-10-30 05:29:56 +09:00 committed by xtkoba
parent 0c11f0b07f
commit c144b1e8d0
3 changed files with 50 additions and 4 deletions

View File

@ -1,9 +1,13 @@
TERMUX_PKG_HOMEPAGE=https://github.com/AcademySoftwareFoundation/Imath
TERMUX_PKG_DESCRIPTION="Imath is a C++ and python lib of 2D and 3D vector"
TERMUX_PKG_HOMEPAGE=https://imath.readthedocs.io/
TERMUX_PKG_DESCRIPTION="Library for vector/matrix and math operations, plus the half type"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
# Align the version with `openexr` package.
TERMUX_PKG_VERSION=3.1.5
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=1e9c7c94797cf7b7e61908aed1f80a331088cc7d8873318f70376e4aed5f25fb
TERMUX_PKG_DEPENDS="clang"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="libc++, zlib"
TERMUX_PKG_BREAKS="openexr (<< ${TERMUX_PKG_VERSION})"
TERMUX_PKG_CONFLICTS="openexr2"
TERMUX_PKG_REPLACES="openexr2"

23
packages/openexr/build.sh Normal file
View File

@ -0,0 +1,23 @@
TERMUX_PKG_HOMEPAGE=https://www.openexr.com/
TERMUX_PKG_DESCRIPTION="Provides the specification and reference implementation of the EXR file format"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
# Align the version with `imath` package.
TERMUX_PKG_VERSION=3.1.5
TERMUX_PKG_SRCURL=https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec
TERMUX_PKG_DEPENDS="imath (>= ${TERMUX_PKG_VERSION}), libc++, zlib"
TERMUX_PKG_CONFLICTS="openexr2"
TERMUX_PKG_REPLACES="openexr2"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_TESTING=OFF
"
termux_step_post_massage() {
shopt -s nullglob
local f
for f in lib/libImath*; do
termux_error_exit "File ${f} should not be contained in this package."
done
shopt -u nullglob
}

View File

@ -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(__GLIBC__) || defined(__ANDROID__)) && 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(__GLIBC__) || defined(__ANDROID__)) && defined(__i386__)
setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
#else
setMxcsr (kfp->mxcsr, clearExceptions);