# Maintainer (Arch): Tobias Powalowski # Maintainer (Hyperbola): André Silva # Maintainer: Omar Vega Ramos # Contributor: grizzlyuser pkgname=openexr pkgver=2.4.1 pkgrel=2 pkgrel+=.parabola2 pkgdesc="An high dynamic-range image file format library" pkgdesc+=", without embedded nonfree fonts in the documentation" url="https://www.openexr.com/" arch=('x86_64') arch+=('i686' 'armv7h') license=('BSD3') depends=('zlib') makedepends=('cmake' 'fltk' 'python' 'boost' 'freeglut' 'python-numpy' 'chrpath') makedepends+=('unoconv' 'libepoxy' 'ttf-croscore' 'ttf-caladea' 'ttf-carlito' 'gsfonts' 'ttf-bitstream-vera') optdepends=('fltk: for exrdisplay' 'boost-libs: python support' 'python: python support') conflicts=('ilmbase') replaces=('ilmbase') source=($pkgname-$pkgver.tar.gz::"https://github.com/AcademySoftwareFoundation/openexr/archive/v$pkgver.tar.gz" openexr-pc-prefix.patch::"https://github.com/AcademySoftwareFoundation/openexr/commit/0b26a9de.patch") sha256sums=('3ebbe9a8e67edb4a25890b98c598e9fe23b10f96d1416d6a3ff0732e99d001c1' 'f20d7588badb679828816e0ada201705b7d1cc5a4d82df3d586707a792b10950') prepare() { cd $pkgname-$pkgver patch -p1 -i ../openexr-pc-prefix.patch # Fix prefix in pc file # remove documentation with embedded nonfree fonts rm -v OpenEXR/doc/{InterpretingDeepPixels,MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction,TheoryDeepPixels}.pdf rm -v OpenEXR_Viewers/doc/OpenEXRViewers.pdf # convert source documentation to pdf format and clean source code pushd OpenEXR/doc unoconv -v -f pdf {InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} popd pushd OpenEXR_Viewers/doc unoconv -v -f pdf OpenEXRViewers.odt popd # remove TheoryDeepPixels.pdf reference sed -i '\|TheoryDeepPixels[.]pdf|d ' "OpenEXR/doc/CMakeLists.txt" } build() { mkdir -p build cd build cmake ../$pkgname-$pkgver \ -DCMAKE_INSTALL_PREFIX=/usr make } package() { cd build make DESTDIR="${pkgdir}" install install -D -m644 "$srcdir"/$pkgname-$pkgver/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}" install -m644 "$srcdir/$pkgname-$pkgver/OpenEXR/doc/"{InterpretingDeepPixels.docx,{MultiViewOpenEXR,OpenEXRFileLayout,ReadingAndWritingImageFiles,TechnicalIntroduction}.odt} "${pkgdir}/usr/share/doc/OpenEXR" # Install missing python module _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"` install -Dm755 python3*/imathnumpy.so -t "$pkgdir"/$_pythonpath }