PKGBUILDs/community/openimageio/PKGBUILD

66 lines
2.2 KiB
Bash
Raw Normal View History

2022-03-06 04:12:29 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2020-10-02 17:21:25 +00:00
# Contributor: SpepS <dreamspepser at yahoo dot it>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2022-03-06 04:47:34 +00:00
# - patch out neon on v7, only works on v8
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
2022-09-07 04:48:34 +00:00
pkgver=2.3.19.0
2022-09-19 01:27:42 +00:00
pkgrel=3
2020-10-02 17:21:25 +00:00
pkgdesc="A library for reading and writing images, including classes, utilities, and applications"
2022-08-04 20:32:14 +00:00
arch=('x86_64')
2020-10-02 17:21:25 +00:00
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'
2022-09-19 01:27:42 +00:00
makedepends=('cmake' 'qt5-base' 'python' 'boost' 'mesa' 'fontconfig' 'libxrender' 'ninja' 'robin-map' 'git')
2020-10-02 17:21:25 +00:00
optdepends=('qt5-base: iv image viewer'
'python: bindings support')
2022-08-04 20:32:14 +00:00
source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/refs/tags/v$pkgver.tar.gz"
2022-03-06 04:47:34 +00:00
'0001-disable-neon.patch')
2022-09-07 04:48:34 +00:00
sha512sums=('f59068d9935ea43e07532e24c45752dc206054034ac79a8ae3ce698343695a4faac7b71ea39bc856946eb084b4287413d75fc5700c59c8d6b409722f47f53072'
2022-03-06 04:47:34 +00:00
'ea88d253d9f9a9302ffe113c6d8f86ff990ada1c304c890d6aecdb4ad3370c9fd12887bb421aaaeff658af4840caefa9f243d3f552cbfc533403b81c2a56d156')
prepare() {
cd oiio-$pkgver
if [[ $CARCH == "armv7h" ]]; then
patch -p1 -i ../0001-disable-neon.patch
fi
}
2020-10-02 17:21:25 +00:00
build() {
2022-03-06 04:12:29 +00:00
cd oiio-$pkgver
2020-10-02 17:21:25 +00:00
2022-09-19 01:27:42 +00:00
# FIXME: BUILD_FMT_FORCE=ON is used below to bundle fmt 8 so OSL builds
# TODO: test without this and remove it if OSL (1.12?) works with fmt 9
2020-10-02 17:21:25 +00:00
cmake \
2022-03-06 04:12:29 +00:00
-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 \
2022-09-19 01:27:42 +00:00
-DBUILD_FMT_FORCE=ON \
2022-03-06 04:12:29 +00:00
-DBUILD_MISSING_FMT=OFF \
-DUSE_EXTERNAL_PUGIXML=ON \
-DSTOP_ON_WARNING=OFF \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
2020-10-02 17:21:25 +00:00
ninja -C build
}
package() {
2022-03-06 04:12:29 +00:00
cd oiio-$pkgver
2020-10-02 17:21:25 +00:00
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
}