1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/graphics/openimageio/Makefile
Raphael Kubo da Costa 832e2c892d Update to 1.1.10.
The change to thread.h has been reported upstream in
https://github.com/OpenImageIO/oiio/issues/529.

PR:		ports/178505
Submitted by:	Shane Ambler <FreeBSD@Shaneware.biz> (maintainer)
2013-05-12 08:38:48 +00:00

95 lines
2.2 KiB
Makefile

# Created by: Shane Ambler <FreeBSD@Shaneware.biz>
# $FreeBSD$
PORTNAME?= openimageio
PORTVERSION= 1.1.10
PORTREVISION?= 0
CATEGORIES?= graphics multimedia
MAINTAINER= FreeBSD@Shaneware.biz
COMMENT= OpenImageIO graphics library
LICENSE?= BSD
LIB_DEPENDS?= IlmImf:${PORTSDIR}/graphics/OpenEXR \
boost_thread:${PORTSDIR}/devel/boost-libs \
hdf5:${PORTSDIR}/science/hdf5-18 \
opencv_legacy:${PORTSDIR}/graphics/opencv \
openjpeg:${PORTSDIR}/graphics/openjpeg \
webp:${PORTSDIR}/graphics/webp
USE_GITHUB= yes
GH_ACCOUNT= OpenImageIO
GH_PROJECT= oiio
GH_TAGNAME= Release-${PORTVERSION}
GH_COMMIT= f28f5c4
WRKSRC= ${WRKDIR}/OpenImageIO-oiio-${GH_COMMIT}/src
# fbm also installs bin/idiff
CONFLICTS= fbm-[0-9]*
USES= cmake:outsource
CMAKE_ARGS?= -DBUILDSTATIC:BOOL=OFF \
-DLINKSTATIC:BOOL=OFF \
-DNOTHREADS:BOOL=OFF \
-DUSE_TBB:BOOL=OFF
USE_LDCONFIG= yes
MAKE_JOBS_SAFE= yes
.if defined(OIIO_PYBIND)
EXTRA_PATCHES= ${FILESDIR}/extra-patch-CMakeLists.txt
PLIST= ${PKGDIR}/pkg-plist-pybind
CMAKE_ARGS+= -DUSE_PYTHON:BOOL=ON
.else
PLIST= ${PKGDIR}/pkg-plist
CMAKE_ARGS+= -DUSE_PYTHON:BOOL=OFF
.endif
.if !defined(OIIO_PYBIND)
OPTIONS_DEFINE= DOCS IMAGEVIEWER OCIO
OPTIONS_DEFAULT= DOCS IMAGEVIEWER OCIO
IMAGEVIEWER_DESC= Build image viewer
OCIO_DESC= Colour management support
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
CMAKE_ARGS+= -DINSTALL_DOCS:BOOL=ON
.else
CMAKE_ARGS+= -DINSTALL_DOCS:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MIMAGEVIEWER}
USE_GL= glew
USE_QT4= corelib gui opengl qmake_build moc_build rcc_build uic_build
CMAKE_ARGS+= -DUSE_QT:BOOL=ON -DUSE_OPENGL:BOOL=ON
CMAKE_ENV+= QTDIR=${QT_PREFIX} QT_INCLUDES=${QT_INCDIR}
PLIST_SUB+= IMAGEVIEWER=""
.else
CMAKE_ARGS+= -DUSE_OPENGL:BOOL=OFF -DUSE_QT:BOOL=OFF
PLIST_SUB+= IMAGEVIEWER="@comment "
.endif
.if ${PORT_OPTIONS:MOCIO}
CMAKE_ARGS+= -DUSE_OCIO:BOOL=ON
LIB_DEPENDS+= OpenColorIO:${PORTSDIR}/graphics/opencolorio
.else
CMAKE_ARGS+= -DUSE_OCIO:BOOL=OFF
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800000
IGNORE= requires FreeBSD 8.0 or higher
.endif
post-install:
.if !defined(OIIO_PYBIND)
cd ${PREFIX}/lib && ${LN} -sf libOpenImageIO.so.1.1 libOpenImageIO.so.1
.endif
.include <bsd.port.post.mk>