void-packages/srcpkgs/openimageio/template
Jürgen Buchmüller 6d009f933a
openimageio: fix armv[56]* build
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-06-22 21:26:38 +02:00

57 lines
1.8 KiB
Bash

# Template file for 'openimageio'
pkgname=openimageio
version=1.8.12
revision=2
wrksrc=oiio-Release-${version}
build_style=cmake
configure_args="-DUSE_OPENGL=0 -DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0
-DSTOP_ON_WARNING=0 -DCMAKE_SYSTEM_PROCESSOR=${XBPS_TARGET_MACHINE}
-DUSE_STD_REGEX_EXITCODE=0"
hostmakedepends="pkg-config"
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"
short_desc="Library for reading and writing images"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="BSD"
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=93e807d7c77a5c4c12598cc7932aa08239bc4198e3e31dca0998a3e0ab163386
CXXFLAGS="-faligned-new"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) configure_args+=" -DUSE_SIMD=sse2" ;;
armv[56]*|mips*) makedepends+=" libatomic-devel" ;;
esac
pre_build() {
local f
# Replace -isystem with -I to avoid "#include_next <stdlib.h>" file not found
sed -i src/cmake/compiler.cmake -e "s;-isystem;-I;g"
case "$XBPS_TARGET_MACHINE" in
armv[56]*|mips*)
# Add libatomic to the targets
sed -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
sed -i src/${f}/CMakeLists.txt \
-e "s;^\(target_link_libraries .*\));\1 atomic);"
done
;;
esac
}
post_install() {
vlicense LICENSE
}
openimageio-devel_package() {
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}