# Maintainer: Sven-Hendrik Haase # Contributor: SpepS # ALARM: Kevin Mihelich # - patch out neon on v7, only works on v8 # - disable lto via -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF pkgname=openimageio pkgver=2.3.14.0 pkgrel=1 pkgdesc="A library for reading and writing images, including classes, utilities, and applications" arch=(x86_64) url="http://www.openimageio.org/" license=('custom') depends=('openexr' 'boost-libs' 'openjpeg2' 'glew' 'libtiff' 'opencolorio' 'libpng' 'libraw' 'libwebp' 'fmt' 'pugixml' 'pybind11' 'libheif' 'hdf5' 'freetype2') # TODO: Consider adding these deps: 'openvdb' 'ffmpeg' 'ptex' 'opencv' makedepends=('cmake' 'qt5-base' 'python' 'boost' 'mesa' 'fontconfig' 'libxrender' 'ninja' 'robin-map') optdepends=('qt5-base: iv image viewer' 'python: bindings support') source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/refs/tags/v$pkgver.tar.gz" '0001-disable-neon.patch') sha512sums=('42f0925bfe5470d9ed43dfd90e008b940ee6e43be4446be1853ee2cbac66041a9cbf1a469f72dc66bc6bec60d3b0049652b8c928d0d56a893b7e4185ce49dc76' 'ea88d253d9f9a9302ffe113c6d8f86ff990ada1c304c890d6aecdb4ad3370c9fd12887bb421aaaeff658af4840caefa9f243d3f552cbfc533403b81c2a56d156') prepare() { cd oiio-$pkgver if [[ $CARCH == "armv7h" ]]; then patch -p1 -i ../0001-disable-neon.patch fi } build() { cd oiio-$pkgver cmake \ -Bbuild \ -GNinja \ -DUSE_PYTHON=ON \ -DPYTHON_VERSION=3.10 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DOIIO_BUILD_TESTS=ON \ -DOIIO_BUILD_TOOLS=ON \ -DBUILD_MISSING_FMT=OFF \ -DUSE_EXTERNAL_PUGIXML=ON \ -DSTOP_ON_WARNING=OFF \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF ninja -C build } package() { cd oiio-$pkgver DESTDIR="$pkgdir" ninja -C build install # Remove vendored fonts rm -r "$pkgdir"/usr/share/fonts install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE".md }