void-packages/srcpkgs/openimageio/template

64 lines
2.0 KiB
Bash

# Template file for 'openimageio'
pkgname=openimageio
version=2.2.15.1
revision=4
build_style=cmake
configure_args="-DUSE_OPENGL=0 -DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=1
-DSTOP_ON_WARNING=0 -DUSE_STD_REGEX_EXITCODE=0 -DCMAKE_CXX_STANDARD=14"
hostmakedepends="pkg-config git"
makedepends="boost-devel giflib-devel libraw-devel libopenjpeg-devel libwebp-devel
libjpeg-turbo-devel tiff-devel libpng-devel libopenexr-devel freetype-devel
ffmpeg-devel opencolorio-devel ptex-devel libheif-devel openvdb-devel
Field3D-devel"
short_desc="Library for reading and writing images"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="BSD-3-Clause"
homepage="https://sites.google.com/site/openimageio/home"
changelog="https://raw.githubusercontent.com/OpenImageIO/oiio/release/CHANGES.md"
distfiles="https://github.com/OpenImageIO/oiio/archive/Release-${version}.tar.gz"
checksum=f222c6b51a40aabbc80ddf4055535be9af1ffa907452fa6d1ffa7674854aab17
# Runs checks even for features we disabled.
make_check=no
CXXFLAGS="-faligned-new"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) configure_args+=" -DUSE_SIMD=sse2" ;;
esac
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
if [ "$CROSS_BUILD" ]; then
configure_args+=" -DUSE_STD_REGEX_EXITCODE=0 -DUSE_STD_REGEX_EXITCODE__TRYRUN_OUTPUT=0"
fi
pre_build() {
local f
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
# Add libatomic to the targets
vsed -i src/libOpenImageIO/CMakeLists.txt \
-e "s;^\(target_link_libraries (OpenImageIO ${ZLIB_LIBRARIES}\));\1 atomic);"
for f in idiff igrep iconvert iinfo maketx testtex oiiotool; do
vsed -i src/${f}/CMakeLists.txt \
-e "s;^\(target_link_libraries .*\));\1 atomic);"
done
fi
}
post_install() {
vlicense LICENSE.md LICENSE
}
openimageio-devel_package() {
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove usr/share/cmake
vmove "usr/lib/*.so"
}
}