diff options
-rw-r--r-- | community/openexr/10-musl-_fpstate.patch | 27 | ||||
-rw-r--r-- | community/openexr/APKBUILD | 55 | ||||
-rw-r--r-- | community/openexr/fix-pkgconfig-prefix.patch | 54 |
3 files changed, 74 insertions, 62 deletions
diff --git a/community/openexr/10-musl-_fpstate.patch b/community/openexr/10-musl-_fpstate.patch new file mode 100644 index 00000000000..67c95f20229 --- /dev/null +++ b/community/openexr/10-musl-_fpstate.patch @@ -0,0 +1,27 @@ +Author: Jürgen Buchmüller <pullmoll@t-online.de> +Summary: adaptations for musl +URL: https://github.com/void-linux/void-packages/blob/master/srcpkgs/ilmbase/patches/musl-_fpstate.patch +Upstream: No +---- + +--- a/IlmBase/IexMath/IexMathFpu.cpp ++++ b/IlmBase/IexMath/IexMathFpu.cpp +@@ -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 diff --git a/community/openexr/APKBUILD b/community/openexr/APKBUILD index 95dc9d1d422..d8809df8d44 100644 --- a/community/openexr/APKBUILD +++ b/community/openexr/APKBUILD @@ -1,16 +1,32 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Contributor: Holger Jaekel <holger.jaekel@gmx.de> # Maintainer: Mark Riedesel <mark+alpine@klowner.com> pkgname=openexr -pkgver=2.4.1 -pkgrel=2 +pkgver=2.5.1 +pkgrel=0 pkgdesc="A high dynamic-range image file format library" url="https://www.openexr.com/" arch="all" license="BSD-3-Clause" -makedepends="zlib-dev cmake" -subpackages="$pkgname-doc $pkgname-dev $pkgname-tools" -source="$pkgname-$pkgver.tar.gz::https://github.com/AcademySoftwareFoundation/openexr/archive/v$pkgver.tar.gz - fix-pkgconfig-prefix.patch" +makedepends=" + boost-dev + boost-python3 + chrpath + cmake + py3-numpy-dev + python3-dev + zlib-dev + " +subpackages=" + $pkgname-doc + $pkgname-dev + py3-$pkgname:py3 + $pkgname-tools + " +source=" + $pkgname-$pkgver.tar.gz::https://github.com/openexr/openexr/archive/v$pkgver.tar.gz + 10-musl-_fpstate.patch + " build() { cmake -B build \ @@ -24,14 +40,37 @@ build() { make -C build } +check() { + cd build + + _exclude_tests="OpenEXR.IlmImf" + case "$CARCH" in + x86) _exclude_tests="($_exclude_tests|IlmBase.Imath)" ;; + esac + + ctest -E $_exclude_tests +} + package() { make DESTDIR="$pkgdir" -C build install } +py3() { + pkgdesc="$pkgdesc (Python3 bindings for the Imath vector/matrix classes)" + + # Install missing python module + _pythonpath=`python3 -c "from sysconfig import get_path; print(get_path('platlib'))"` + install -Dm755 $builddir/build/python3*/imathnumpy.so -t "$subpkgdir"/$_pythonpath + chrpath -d $subpkgdir/$_pythonpath/imathnumpy.so + mv $pkgdir$_pythonpath/* $subpkgdir$_pythonpath + mv $pkgdir/usr/lib/*Python* $subpkgdir/usr/lib/ + rm -rf $pkgdir/usr/lib/python* +} + tools() { mkdir -p "$subpkgdir"/usr/ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="23c0c07fafa42f832e67cbfeeeb12b6b9e373dd0a5b858f463bf5c4d0661c58fad662cef64ef6a3053f0db2f69aee46816568b814872d617284664d1effbbbab openexr-2.4.1.tar.gz -08a7da593186974583390ab6459d317cb3a2b4ca35e25af1530cc55d16d8c06b07c8388b06134d2035898b6091f601c6e0e0a494a4b0423ba4d7408ead8b905a fix-pkgconfig-prefix.patch" +sha512sums="d7ff156481a0b0c26282b5b839e8d88e3f19a9d11c8d16113faa38409145670b379d8c5629efa2c6bd7719e095c07fe2bcd9fc8bedd15f48da77c1ce94705714 openexr-2.5.1.tar.gz +8791366e55684176ab81ae60c31c63da15a924d8fb5e2b648b88da491cada3897d49e4547c00d7767c97ed383480de5d69285549d100ee5d75a96de9ab857e5d 10-musl-_fpstate.patch" diff --git a/community/openexr/fix-pkgconfig-prefix.patch b/community/openexr/fix-pkgconfig-prefix.patch deleted file mode 100644 index 8b13d465273..00000000000 --- a/community/openexr/fix-pkgconfig-prefix.patch +++ /dev/null @@ -1,54 +0,0 @@ -Upstream doesn't prepend ${prefix} to the libdir, incluedir etc., so packages -which try to use OpenEXR fail to include it because it tries to include -"-Iinclude/OpenEXR" and not "-I/usr/include/OpenEXR" -diff --git a/IlmBase/IlmBase.pc.in b/IlmBase/IlmBase.pc.in -index 45fc4de..b1ac8e8 100644 ---- a/IlmBase/IlmBase.pc.in -+++ b/IlmBase/IlmBase.pc.in -@@ -4,9 +4,9 @@ - ## - - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ -+exec_prefix=${prefix}/@exec_prefix@ -+libdir=${prefix}/@libdir@ -+includedir=${prefix}/@includedir@ - libsuffix=@LIB_SUFFIX_DASH@ - Name: IlmBase - Description: Base math and exception libraries -diff --git a/OpenEXR/OpenEXR.pc.in b/OpenEXR/OpenEXR.pc.in -index cf72f88..34fa246 100644 ---- a/OpenEXR/OpenEXR.pc.in -+++ b/OpenEXR/OpenEXR.pc.in -@@ -4,9 +4,9 @@ - ## - - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ -+exec_prefix=${prefix}/@exec_prefix@ -+libdir=${prefix}/@libdir@ -+includedir=${prefix}/@includedir@ - OpenEXR_includedir=@includedir@/OpenEXR - libsuffix=@LIB_SUFFIX_DASH@ - -diff --git a/PyIlmBase/PyIlmBase.pc.in b/PyIlmBase/PyIlmBase.pc.in -index 7caaf7b..c242e36 100644 ---- a/PyIlmBase/PyIlmBase.pc.in -+++ b/PyIlmBase/PyIlmBase.pc.in -@@ -4,9 +4,9 @@ - ## - - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ -+exec_prefix=${prefix}/@exec_prefix@ -+libdir=${prefix}/@libdir@ -+includedir=${prefix}/@includedir@ - PyIlmBase_includedir=@includedir@/OpenEXR - - Name: PyIlmBase |