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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
PORTNAME= openimageio
DISTVERSIONPREFIX= v
DISTVERSION= 2.4.13.0
# PORTREVISION must be set with ?= so as not to stomp over
# py-openimageio's PORTREVISION.
# Also, just to be on the safe side, when resetting,
# best keep PORTREVISION?= 0.
PORTREVISION?= 7
CATEGORIES?= graphics multimedia
MAINTAINER?= FreeBSD@Shaneware.biz
COMMENT?= OpenImageIO graphics library
WWW= https://www.openimageio.org/
LICENSE= BSD3CLAUSE
BUILD_DEPENDS= ${LOCALBASE}/include/tsl/robin_map.h:devel/robin-map
LIB_DEPENDS= libboost_thread.so:devel/boost-libs \
libfmt.so:devel/libfmt \
libhdf5.so:science/hdf5 \
libImath.so:math/Imath \
libOpenColorIO.so:graphics/opencolorio \
libOpenEXR.so:graphics/openexr \
libheif.so:graphics/libheif \
libturbojpeg.so:graphics/libjpeg-turbo \
libpng.so:graphics/png \
libsquish.so:graphics/squish \
libtiff.so:graphics/tiff \
libwebp.so:graphics/webp
USES= cmake jpeg compiler:c++14-lang iconv:wchar_t qt:5
USE_QT+= buildtools:build qmake:build
USE_GITHUB= yes
GH_ACCOUNT= OpenImageIO
GH_PROJECT= oiio
CMAKE_OFF= BUILDSTATIC INSTALL_FONTS LINKSTATIC NOTHREADS \
STOP_ON_WARNING USE_OPENSSL OIIO_DOWNLOAD_MISSING_TESTDATA \
USE_Package
OPTIONS_DEFINE= DICOM DOCS FFMPEG FREETYPE GIF IMAGEVIEWER \
OPENCV OPENJPEG PTEX RAW TBB TEST TOOLS VDB
OPTIONS_DEFAULT= DICOM FREETYPE GIF OPENJPEG PTEX TOOLS VDB
OPTIONS_SUB= yes
DOCS_CMAKE_BOOL= INSTALL_DOCS
DOCS_CMAKE_ON= -DCMAKE_INSTALL_DOCDIR:STRING=${DOCSDIR}
DICOM_DESC= DICOM/MEDICOM support
DICOM_CMAKE_BOOL= USE_DICOM
DICOM_LIB_DEPENDS= libdcmimage.so:graphics/dcmtk
FFMPEG_DESC= Use FFmpeg to support extra file types
FFMPEG_CMAKE_BOOL= USE_FFMPEG
FFMPEG_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg
FREETYPE_CMAKE_BOOL= USE_FREETYPE
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
FREETYPE_RUN_DEPENDS= ${LOCALBASE}/share/fonts/Droid/DroidSans.ttf:x11-fonts/droid-fonts-ttf
GIF_CMAKE_BOOL= USE_GIF
GIF_LIB_DEPENDS= libgif.so:graphics/giflib
IMAGEVIEWER_DESC= Build image viewer (requires Qt)
IMAGEVIEWER_USES= gl
IMAGEVIEWER_IMPLIES= TOOLS
IMAGEVIEWER_CMAKE_BOOL= USE_QT USE_OPENGL
IMAGEVIEWER_USE= GL=gl,glu,glew \
QT=buildtools,core,gui,opengl,qmake:build,widgets
OPENCV_CMAKE_BOOL= USE_OPENCV
OPENCV_IMPLIES= OPENJPEG
OPENCV_LIB_DEPENDS= libopencv_highgui.so:graphics/opencv \
libopencv_core.so:graphics/opencv
OPENJPEG_CMAKE_BOOL= USE_OPENJPEG
OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
PTEX_DESC= ptex support
PTEX_LIB_DEPENDS= libPtex.so:graphics/ptex
RAW_CMAKE_BOOL= USE_LIBRAW
RAW_LIB_DEPENDS= libraw_r.so:graphics/libraw
TBB_DESC= Intel tbb support
TBB_CMAKE_BOOL= USE_TBB
TBB_LIB_DEPENDS= libtbb.so:devel/onetbb
TEST_CMAKE_BOOL= OIIO_BUILD_TESTS
TOOLS_DESC= Build CLI tools
TOOLS_CMAKE_BOOL= OIIO_BUILD_TOOLS
VDB_DESC= OpenVDB support
VDB_CMAKE_BOOL= USE_OPENVDB
VDB_LIB_DEPENDS= libopenvdb.so:misc/openvdb
PLIST_SUB= SHL3=${PORTVERSION:R} SHL2=${PORTVERSION:R:R} SHL1=${PORTVERSION:R:R:R}
SHL3= ${PORTVERSION:R}
SHL2= ${PORTVERSION:R:R}
SHL1= ${PORTVERSION:R:R:R}
post-patch:
@${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," \
${WRKSRC}/src/cmake/modules/FindPtex.cmake \
${WRKSRC}/src/cmake/modules/FindJPEGTurbo.cmake
.include <bsd.port.options.mk>
.if ${SLAVE_PORT} == yes
BUILD_DEPENDS+= ${PREFIX}/share/cmake/pybind11/pybind11Config.cmake:devel/pybind11
LIB_DEPENDS+= libOpenImageIO.so:graphics/openimageio
PLIST= ${PKGDIR}/pkg-plist-pybind
USES+= python
USE_PYTHON= flavors
CMAKE_ON+= USE_PYTHON
# we don't need the apps built - only libs.
CMAKE_OFF+= USE_QT USE_OPENGL OIIO_BUILD_TOOLS OIIO_BUILD_TESTS \
EMBED_PLUGINS
CMAKE_ARGS+= -DPYTHON_VERSION:STRING=${PYTHON_VER}
do-install:
${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
${INSTALL_LIB} ${BUILD_WRKSRC}/lib/python/site-packages/OpenImageIO*.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
.else # SLAVE_PORT != yes
USE_LDCONFIG= yes
CMAKE_OFF+= USE_PYTHON
post-install:
${LN} -sf libOpenImageIO.so.${SHL3} \
${STAGEDIR}${PREFIX}/lib/libOpenImageIO.so.${SHL2}
${LN} -sf libOpenImageIO.so.${SHL3} \
${STAGEDIR}${PREFIX}/lib/libOpenImageIO.so.${SHL1}
${LN} -sf libOpenImageIO_Util.so.${SHL3} \
${STAGEDIR}${PREFIX}/lib/libOpenImageIO_Util.so.${SHL2}
${LN} -sf libOpenImageIO_Util.so.${SHL3} \
${STAGEDIR}${PREFIX}/lib/libOpenImageIO_Util.so.${SHL1}
do-test-TEST-on:
@cd ${BUILD_WRKSRC} && ${SETENV} ARGS=-V ${MAKE_CMD} test
.endif # SLAVE_PORT
.include <bsd.port.mk>
|