aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openimageio/APKBUILD
blob: b33129629ad1ba8d570ff8560e68cc2f05149f6b (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
65
66
67
68
69
70
71
72
73
# Contributor: Mark Riedesel <mark@klowner.com>
# Maintainer: Mark Riedesel <mark@klowner.com>
pkgname=openimageio
pkgver=1.6.14
pkgrel=1
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 jpeg-dev libpng-dev tiff-dev
	glew-dev python2-dev>=2.6 python3-dev openexr-dev ffmpeg2.8-dev
	libraw-dev libwebp-dev freetype-dev qt-dev mesa-dev libressl-dev
	jasper-dev opencolorio-dev"
subpackages="py2-$pkgname:_python py3-$pkgname:_python $pkgname-dev $pkgname-doc $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz
	nocpp-error.patch"
builddir="$srcdir/oiio-Release-$pkgver"

build() {
	cd "$builddir"

	mkdir build && cd build
	cmake .. \
		-DUSE_OPENSSL=ON \
		-DUSE_PYTHON=ON \
		-DUSE_PYTHON3=ON \
		-DUSE_NUKE=OFF \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_RPATH=ON \
		-DPYLIB_INSTALL_DIR="$(_pysitepackages python2)" \
		-DPYLIB3_INSTALL_DIR="$(_pysitepackages python3)" \
		-DOIIO_BUILD_TESTS=OFF \
		-DOIIO_BUILD_TOOLS=ON \
		-DINSTALL_FONTS=OFF \
		|| return 1
	make
}

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

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}"
	local pypath="$(_pysitepackages python$pyver)"
	pkgdesc="Python $pyver bindings for OpenImageIO image I/O library"
	depends="python$pyver"

	mkdir -p "$subpkgdir"$pypath
	mv "$pkgdir"$pypath/* "$subpkgdir"$pypath/
}

_pysitepackages() {
	$1 -c "import site; print(site.getsitepackages()[0])"
}

md5sums="cd8af592f3c4223b3ac0d67d116beda9  openimageio-1.6.14.tar.gz
6b8a08ac4de51207b43cf64d40ffff0f  nocpp-error.patch"
sha256sums="40a477a88426838d8ac8a2303b92861e39665ca4b00d4f4e40a31143c7ba2097  openimageio-1.6.14.tar.gz
3278c66a99bc5aa8ef2d9811fc5f0f6803568b9554f6af057d322469ca60d10d  nocpp-error.patch"
sha512sums="2f4f219e7fa372fe6e41dfb4d4938ee990f99c1788856adfdd4e752393bd6f0d6928f72162d6147bcbe02df705fe96078ec790c7886f8513c82257e6264309e5  openimageio-1.6.14.tar.gz
fc27840bc37d01badc81d6a1c49216f44370805f3f43184646a5d12879706a6358a41868d7938c13611f43a4bfc695fd1ef4d1baee3e9a926dc4629e4675fe68  nocpp-error.patch"