PKGBUILDs/community/openimageio/PKGBUILD
2020-12-13 18:56:13 +00:00

58 lines
1.9 KiB
Bash

# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to disable neon
pkgname=openimageio
pkgver=2.2.9.0
pkgrel=3
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' 'intel-tbb' 'libpng' 'libraw' 'libwebp'
'fmt' 'pugixml' 'pybind11')
# TODO: Consider adding these deps: 'openvdb' 'ffmpeg' 'ptex' 'libheif' 'hdf5' 'opencv'
makedepends=('cmake' 'qt5-base' 'python' 'boost' 'mesa' 'freetype2' '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/Release-$pkgver.tar.gz"
'0001-disable-neon.patch')
sha512sums=('d03500c5a9f4f1417c5629098254d1bbf032a17228898e5f087e4a5d0988f806537d3ab538366e64c51172568c3688389ab29b641fdaaf7208bf939cb859e06d'
'ea88d253d9f9a9302ffe113c6d8f86ff990ada1c304c890d6aecdb4ad3370c9fd12887bb421aaaeff658af4840caefa9f243d3f552cbfc533403b81c2a56d156')
prepare() {
cd oiio-Release-$pkgver
patch -p1 -i ../0001-disable-neon.patch
}
build() {
cd oiio-Release-$pkgver
cmake \
-Bbuild \
-GNinja \
-DUSE_PYTHON=ON \
-DPYTHON_VERSION=3.9 \
-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
ninja -C build
}
package() {
cd oiio-Release-$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
}