PKGBUILDs/extra/openimageio/PKGBUILD

61 lines
2.1 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-12-06 00:42:18 +00:00
# - patch out neon, FTBFS
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
2024-03-11 01:34:14 +00:00
pkgver=2.5.9.0
2023-12-25 14:46:10 +00:00
pkgrel=1
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'
2022-10-06 12:45:18 +00:00
'pugixml' 'pybind11' 'libheif' 'hdf5' 'freetype2')
2021-06-06 23:10:16 +00:00
# TODO: Consider adding these deps: 'openvdb' 'ffmpeg' 'ptex' 'opencv'
2022-10-06 12:45:18 +00:00
makedepends=('cmake' 'qt5-base' 'python' 'boost' 'mesa' 'fontconfig' 'libxrender' 'ninja' 'robin-map' 'fmt')
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')
2024-03-11 01:34:14 +00:00
sha512sums=('554f61e19e3f81c8495f48386494a1aeee3a2a759b3022b4fb5cf1dba1dbc813cd0956b60d08a2c1feca69d97141e5836651fcbbeadab1e050eb2d103eb1c41f'
2022-11-06 02:05:28 +00:00
'5cc9073dfdc735aab5b5e880b101b5c0e3469c3f290cda3b031f21b65fc28a5af567c09d005cb5008e4cdaeb84ec2c0ef33996471e85af295ff36e08c6638d9b')
2022-03-06 04:47:34 +00:00
prepare() {
2023-11-24 01:13:14 +00:00
cd OpenImageIO-$pkgver
2022-12-06 00:42:18 +00:00
patch -p1 -i ../0001-disable-neon.patch
2022-03-06 04:47:34 +00:00
}
2020-10-02 17:21:25 +00:00
build() {
2023-11-24 01:13:14 +00:00
cd OpenImageIO-$pkgver
2020-10-02 17:21:25 +00:00
2023-05-03 19:17:12 +00:00
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
2020-10-02 17:21:25 +00:00
cmake \
2022-03-06 04:12:29 +00:00
-Bbuild \
-GNinja \
-DUSE_PYTHON=ON \
2023-05-03 19:17:12 +00:00
-DPYTHON_VERSION=$python_version \
2022-03-06 04:12:29 +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 \
-DSTOP_ON_WARNING=OFF \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
2020-10-02 17:21:25 +00:00
ninja -C build
}
package() {
2023-11-24 01:13:14 +00:00
cd OpenImageIO-$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
}