PKGBUILDs/community/openimageio/PKGBUILD

63 lines
2.3 KiB
Bash
Raw Normal View History

2020-10-02 17:21:25 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to disable neon
2021-02-02 13:42:44 +00:00
# - disable lto via -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
2020-10-02 17:21:25 +00:00
pkgname=openimageio
2021-06-05 22:09:39 +00:00
pkgver=2.2.15.1
2021-07-16 13:13:26 +00:00
pkgrel=5
2020-10-02 17:21:25 +00:00
pkgdesc="A library for reading and writing images, including classes, utilities, and applications"
arch=(x86_64)
url="http://www.openimageio.org/"
license=('custom')
2021-06-06 23:10:16 +00:00
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')
2020-10-02 17:21:25 +00:00
optdepends=('qt5-base: iv image viewer'
'python: bindings support')
source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-$pkgver.tar.gz"
2021-07-16 13:13:26 +00:00
openimageio-imath-3.1.patch::https://github.com/OpenImageIO/oiio/commit/05a5448c.patch
2020-10-02 17:21:25 +00:00
'0001-disable-neon.patch')
2021-06-05 22:09:39 +00:00
sha512sums=('c06df310f91938b25f1f66cd98d995dcaba51c6a0041b47882c52f5ad4a098a9016fc99f41de250dd1b1b7af3ad22f6ed63d5e76f95f1f1cf0f45c80eee9c8e0'
2021-07-16 13:13:26 +00:00
'b79a073667051923caf738c054fee09ac24d251e6834a31e147e0c45753413d07bd795709048709b71a86076c1ea4ba47417513ffcf46454e3fac45fd0a96d65'
2020-10-02 17:21:25 +00:00
'ea88d253d9f9a9302ffe113c6d8f86ff990ada1c304c890d6aecdb4ad3370c9fd12887bb421aaaeff658af4840caefa9f243d3f552cbfc533403b81c2a56d156')
prepare() {
2021-07-16 13:13:26 +00:00
patch -d oiio-Release-$pkgver -p1 < openimageio-imath-3.1.patch # Fix build with imath 3.1
2020-10-02 17:21:25 +00:00
cd oiio-Release-$pkgver
patch -p1 -i ../0001-disable-neon.patch
}
build() {
cd oiio-Release-$pkgver
cmake \
-Bbuild \
-GNinja \
-DUSE_PYTHON=ON \
2020-12-02 19:29:26 +00:00
-DPYTHON_VERSION=3.9 \
2020-10-02 17:21:25 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DOIIO_BUILD_TESTS=ON \
-DOIIO_BUILD_TOOLS=ON \
-DBUILD_MISSING_FMT=OFF \
-DUSE_EXTERNAL_PUGIXML=ON \
2021-02-02 13:42:44 +00:00
-DSTOP_ON_WARNING=OFF \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
2020-10-02 17:21:25 +00:00
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
}