void-packages/srcpkgs/openexr/template
Jürgen Buchmüller 79503e11e1 openexr: update to 2.4.0
Use qemu-user-static to run binaries for the target.

[ci skip]
2019-12-06 13:49:52 +01:00

57 lines
1.4 KiB
Bash

# Template file for 'openexr'
pkgname=openexr
version=2.4.0
revision=1
build_style=cmake
build_helper="qemu"
hostmakedepends="pkg-config"
makedepends="ilmbase-devel zlib-devel"
short_desc="High dynamic-range (HDR) image file format"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.openexr.com/"
distfiles="https://github.com/openexr/openexr/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1
pre_configure() {
if [ "$CROSS_BUILD" ]; then
vsed -i IlmBase/Half/CMakeLists.txt \
IlmBase/ImathTest/CMakeLists.txt \
OpenEXR/IlmImf/CMakeLists.txt \
-e "s; COMMAND ; COMMAND qemu-${XBPS_TARGET_QEMU_MACHINE}-static ;g"
fi
}
post_install() {
local d f
vlicense LICENSE.md
# Remove files which are already in ilmbase
for d in usr/include/OpenEXR usr/lib/cmake/IlmBase usr/lib/pkgconfig usr/lib; do
for f in ${XBPS_CROSS_BASE}/$d/*; do
f="${f##*/}"
if [ -f "${DESTDIR}/$d/$f" ]; then
rm -v "${DESTDIR}/$d/$f"
fi
done
done
}
libopenexr_package() {
short_desc+=" - runtime libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libopenexr-devel_package() {
short_desc+=" - development files"
depends="${makedepends} libopenexr>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share
}
}