aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openimageio/APKBUILD
blob: ebf051ca6fb546ba3eb5cd997cec9b21a5ef03e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Mark Riedesel <mark@klowner.com>
# Maintainer: Mark Riedesel <mark@klowner.com>
pkgname=openimageio
pkgver=1.8.15
pkgrel=0
pkgdesc="Image I/O library supporting a multitude of image formats"
url="https://sites.google.com/site/openimageio/"
arch="all"
license="BSD"
depends=""
# NOTE: OpenColorIO and OpenImageIO are cross dependent. If an ABI incompatible
# update is done in one, the other also needs to be rebuilt.
makedepends="cmake giflib-dev zlib-dev boost-dev libjpeg-turbo-dev libpng-dev tiff-dev
	glew-dev python2-dev>=2.6 openexr-dev ffmpeg-dev
	libraw-dev libwebp-dev freetype-dev qt5-qtbase-dev mesa-dev libressl-dev
	jasper-dev opencolorio-dev"
subpackages="py2-$pkgname:_python $pkgname-dev $pkgname-doc $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz
	boost-python.patch
	"
builddir="$srcdir/oiio-Release-$pkgver"

build() {
	cd "$builddir"

	mkdir build && cd build
	cmake .. \
		-DUSE_OPENSSL=ON \
		-DUSE_PYTHON=ON \
		-DUSE_NUKE=OFF \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DPYLIB_INSTALL_DIR=lib/python2.7/site-packages \
		-DCMAKE_SKIP_RPATH=ON \
		-DSTOP_ON_WARNING=OFF \
		-DOIIO_BUILD_TESTS=OFF \
		-DOIIO_BUILD_TOOLS=ON \
		-DINSTALL_FONTS=OFF
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="Tools for manipulating a multitude of image formats"

	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

_python() {
	local pyver="${subpkgname:2:1}"
	pkgdesc="Python $pyver bindings for OpenImageIO image I/O library"
	depends="python$pyver"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python$pyver* "$subpkgdir"/usr/lib/
}

sha512sums="e022e5c7e300d3dd952bcf3476e1b676a8931f67ba6b3959b26c75b9709907ac1c1b99de651f5876045f9a333e325a161b0d5159cb5bf385eb4f9f90a04707c7  openimageio-1.8.15.tar.gz
6f2fa329a1854be4e0dd358a1d2e0134a53422b63b5bef161a4dddfb4416a66e614afd063b15d2af56ac131c511c28b1b8f50ca6d10f00342ac2f111a23a7f0e  boost-python.patch"