openexr: update to 2.4.0

Use qemu-user-static to run binaries for the target.

[ci skip]
This commit is contained in:
Jürgen Buchmüller 2019-12-01 08:57:11 +01:00
parent e4dae813f1
commit 79503e11e1
4 changed files with 68 additions and 34 deletions

View File

@ -1660,8 +1660,8 @@ libIex-2_4.so.24 ilmbase-2.4.0_1
libIexMath-2_4.so.24 ilmbase-2.4.0_1
libImath-2_4.so.24 ilmbase-2.4.0_1
libIlmThread-2_4.so.24 ilmbase-2.4.0_1
libIlmImf-2_3.so.24 libopenexr-2.3.0_1
libIlmImfUtil-2_3.so.24 libopenexr-2.3.0_1
libIlmImf-2_4.so.24 libopenexr-2.4.0_1
libIlmImfUtil-2_4.so.24 libopenexr-2.4.0_1
libGraphicsMagick.so.3 libgraphicsmagick-1.3.19_1
libGraphicsMagick++.so.12 libgraphicsmagick-1.3.22_1
libGraphicsMagickWand.so.2 libgraphicsmagick-1.3.19_1

View File

@ -0,0 +1,21 @@
--- IlmBase/IexMath/IexMathFpu.cpp.orig 2019-12-01 15:42:08.143387128 +0100
+++ IlmBase/IexMath/IexMathFpu.cpp 2019-12-01 15:43:02.402389927 +0100
@@ -281,10 +281,18 @@
inline void
restoreControlRegs (const ucontext_t & ucon, bool clearExceptions)
{
+#if defined(__GLIBC__) || 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__)
setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
+#else
+ setMxcsr (kfp->mxcsr, clearExceptions);
+#endif
}
#endif

View File

@ -0,0 +1,15 @@
--- OpenEXR/OpenEXR.pc.in 2019-09-18 03:02:06.000000000 +0200
+++ OpenEXR/OpenEXR.pc.in 2019-12-01 17:30:08.680721453 +0100
@@ -6,8 +6,8 @@
prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-OpenEXR_includedir=@includedir@/OpenEXR
+exec_prefix=${prefix}/@exec_prefix@
+libdir=${prefix}/@libdir@
+includedir=${prefix}/@includedir@
+OpenEXR_includedir=${prefix}/@includedir@/OpenEXR
libsuffix=@LIB_SUFFIX_DASH@
Name: OpenEXR

View File

@ -1,49 +1,47 @@
# Template file for 'openexr'
pkgname=openexr
version=2.3.0
version=2.4.0
revision=1
build_style=gnu-configure
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="http://www.openexr.com/"
license="BSD"
short_desc="High dynamic-range (HDR) image file format"
build_style=cmake
build_helper="qemu"
hostmakedepends="pkg-config"
makedepends="ilmbase-devel zlib-devel"
distfiles="https://github.com/openexr/openexr/releases/download/v${version}/openexr-${version}.tar.gz"
checksum=fd6cb3a87f8c1a233be17b94c74799e6241d50fc5efd4df75c7a4b9cf4e25ea6
short_desc="High dynamic-range (HDR) image file format"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.openexr.com/"
distfiles="https://github.com/openexr/openexr/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1
LDFLAGS="-lrt"
case "$XBPS_TARGET_MACHINE" in
aarch64-musl)
CFLAGS="-Os"
CXXFLAGS=-"Os"
;;
esac
post_configure() {
pre_configure() {
if [ "$CROSS_BUILD" ]; then
# Don't try to rebuild these header files when cross compiling
# in the hope the shipped tables are ok to use as is.
sed -i ${wrksrc}/IlmImf/Makefile \
-e "/BUILT_SOURCES = /s;b44ExpLogTable.h dwaLookups.h;;" \
-e "/CLEANFILES = /s; b44ExpLogTable.h;;" \
-e "/CLEANFILES = /s; dwaLookups.h;;" \
-e "/b44ExpLogTable.h: b44ExpLogTable/d" \
-e "/\.\/b44ExpLogTable > b44ExpLogTable.h/d" \
-e "/dwaLookups.h: dwaLookups/d" \
-e "/\.\/dwaLookups > dwaLookups.h/d"
vsed -i IlmBase/Half/CMakeLists.txt \
IlmBase/ImathTest/CMakeLists.txt \
OpenEXR/IlmImf/CMakeLists.txt \
-e "s; COMMAND ; COMMAND qemu-${XBPS_TARGET_QEMU_MACHINE}-static ;g"
fi
}
post_install() {
vlicense LICENSE
local d f
vlicense LICENSE.md
# Remove files which are already in ilmbase
for d in usr/include/OpenEXR usr/lib/cmake/IlmBase usr/lib/pkgconfig usr/lib; do
for f in ${XBPS_CROSS_BASE}/$d/*; do
f="${f##*/}"
if [ -f "${DESTDIR}/$d/$f" ]; then
rm -v "${DESTDIR}/$d/$f"
fi
done
done
}
libopenexr_package() {
short_desc+=" - runtime libraries"
pkg_install() {
vmove usr/lib/*.so.*
vmove "usr/lib/*.so.*"
}
}
libopenexr-devel_package() {
@ -51,9 +49,9 @@ libopenexr-devel_package() {
depends="${makedepends} libopenexr>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share
}
}