-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,192 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 | ||
# $Id$ | ||
|
||
PortSystem 1.0 | ||
PortGroup github 1.0 | ||
PortGroup cmake 1.0 | ||
PortGroup conflicts_build 1.0 | ||
PortGroup qt4 1.0 | ||
# gcc-4.8 cannot compile universal | ||
# The internal yaml-cpp is not compiled with multiple archs in universal mode | ||
#PortGroup muniversal 1.0 | ||
|
||
epoch 1 | ||
|
||
fetch.type git | ||
github.setup OpenImageIO oiio 1.5.23 tags/Release- | ||
#github.version ${version}-dist | ||
#github.tarball_from downloads | ||
|
||
name openimageio | ||
#version 1.4.5.91 | ||
#revision 2 | ||
categories graphics | ||
platforms darwin | ||
license BSD | ||
maintainers openmaintainer | ||
description OpenImageIO is a library for reading and writing images | ||
long_description ${description} | ||
homepage http://sites.google.com/site/openimageio/ | ||
|
||
|
||
#master_sites debian:o/openimageio/ | ||
#worksrcdir ${name}-${version}~dfsg0.orig | ||
#distfiles ${name}_${version}~dfsg0.orig${extract.suffix} | ||
#checksums rmd160 94c6e2274be01e82cfe8bc4bf11677593d33f299 \ | ||
# sha256 4cf3b373e56694ce9e3896a356b68a2ed92978e76be653a5b5e45b17937faae8 | ||
|
||
depends_lib port:boost port:jpeg port:tiff port:libpng port:openexr port:glew port:ilmbase port:libraw port:giflib | ||
|
||
# can't compile openimageio when another version is installed, because the include path is wrong | ||
conflicts_build ${name} | ||
|
||
depends_build port:txt2man | ||
depends_skip_archcheck txt2man | ||
# port:opencolorio | ||
|
||
# we need gcc atomics (clang >= 3.5 maybe?, gcc >= 4.8 works) | ||
# tested with openimageio 1.4.6rc1: | ||
# macports-clang-3.3 and later work | ||
# gcc-4.2 doesn't work | ||
# llvm-gcc-4.2 works | ||
# macports-clang < 3.3 untested | ||
#compiler.fallback-append macports-gcc-4.8 macports-gcc-4.9 macports-clang-3.3 macports-clang-3.4 macports-clang-3.5 | ||
compiler.blacklist apple-gcc-4.0 apple-gcc-4.2 gcc-3.3 gcc-4.0 gcc-4.2 macports-gcc-4.0 macports-gcc-4.2 | ||
|
||
# The PowerPC build requires GCC >= 4.8, which doesn't recognize the -arch flag, and requires libatomic | ||
if {${configure.build_arch} eq "ppc"} { | ||
compiler.blacklist-append macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6 macports-gcc-4.7 macports-clang-3.3 macports-clang-3.4 macports-clang-3.5 | ||
# the following removes the flag "-arch ppc" put by cmake-1.0 portgroup in the pre-configure phase | ||
pre-configure { | ||
configure.args-delete -DCMAKE_OSX_ARCHITECTURES="${configure.build_arch}" | ||
} | ||
# -latomic is necessary on ppc for __atomic_fetch_add_8 and __atomic_exchange_8 | ||
configure.args-append -DCMAKE_SHARED_LINKER_FLAGS=-latomic -DCMAKE_EXE_LINKER_FLAGS=-latomic | ||
} | ||
|
||
#post-extract { | ||
# system "touch ${worksrcpath}/LICENSE ${workpath}/${worksrcdir}/LICENSE" | ||
#} | ||
|
||
# Those are Debian patches, which require -p1 | ||
#patch.pre_args -p1 | ||
#patchfiles \ | ||
# build_in_sources.patch | ||
# 0001-Fix_docs_generation.patch \ | ||
# 0002-Fix_IlmBase_issue.patch \ | ||
# 0003-Fix_multiarch_paths.patch \ | ||
# 0004-Fix_FTBFS_on_atomic_operations.patch \ | ||
patch.pre_args -p1 | ||
patchfiles \ | ||
oiio-1.5.22-exrthreads.patch | ||
|
||
cmake.out_of_source yes | ||
|
||
configure.args-append \ | ||
-DOIIO_BUILD_TESTS:BOOL=FALSE \ | ||
-DBOOST_ROOT=${prefix} \ | ||
-DUSE_QT:BOOL=FALSE \ | ||
-DUSE_TBB:BOOL=FALSE \ | ||
-DUSE_PYTHON:BOOL=FALSE \ | ||
-DUSE_PYTHON3:BOOL=FALSE \ | ||
-DUSE_FIELD3D:BOOL=FALSE \ | ||
-DUSE_FFMPEG:BOOL=FALSE \ | ||
-DUSE_OPENJPEG:BOOL=FALSE \ | ||
-DUSE_OCIO:BOOL=FALSE \ | ||
-DUSE_OPENCV:BOOL=FALSE \ | ||
-DUSE_OPENSSL:BOOL=FALSE \ | ||
-DUSE_FREETYPE:BOOL=FALSE \ | ||
-DUSE_GIF:BOOL=TRUE \ | ||
-DUSE_PTEX:BOOL=FALSE \ | ||
-DUSE_LIBRAW:BOOL=TRUE \ | ||
-DSTOP_ON_WARNING:BOOL=FALSE | ||
|
||
default_variants +opencolorio +openjpeg +qt4 +freetype | ||
|
||
variant opencolorio description {Add OpenColorIO support.} { | ||
depends_lib-append port:opencolorio | ||
configure.args-delete -DUSE_OCIO:BOOL=FALSE | ||
configure.args-append -DUSE_OCIO:BOOL=TRUE | ||
} | ||
|
||
variant ffmpeg description {Add FFmpeg support.} { | ||
depends_lib-append port:ffmpeg | ||
configure.args-delete -DUSE_FFMPEG:BOOL=FALSE | ||
configure.args-append -DUSE_FFMPEG:BOOL=TRUE | ||
} | ||
|
||
variant openjpeg description {Add OpenJPEG support.} { | ||
depends_lib-append port:openjpeg15 | ||
configure.args-delete -DUSE_OPENJPEG:BOOL=FALSE | ||
configure.args-append -DUSE_OPENJPEG:BOOL=TRUE -DOPENJPEG_INCLUDE_DIR=${prefix}/include/openjpeg-1.5 | ||
} | ||
|
||
variant python26 conflicts python27 description {Add Python 2.6 bindings.} { | ||
depends_lib-append port:python26 | ||
configure.args-delete -DUSE_PYTHON:BOOL=FALSE | ||
configure.args-append -DUSE_PYTHON:BOOL=TRUE \ | ||
-DPYTHON_VERSION=2.6 \ | ||
-DPYTHON_EXECUTABLE=${prefix}/bin/python2.6 \ | ||
-DPYTHON_LIBRARY=${prefix}/lib/libpython2.6.dylib \ | ||
-DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.6/Headers \ | ||
-DPYTHON_PACKAGES_PATH=${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages | ||
} | ||
|
||
variant python27 conflicts python26 description {Add Python 2.7 bindings.} { | ||
depends_lib-append port:python27 | ||
configure.args-delete -DUSE_PYTHON:BOOL=FALSE | ||
configure.args-append -DUSE_PYTHON:BOOL=TRUE \ | ||
-DPYTHON_VERSION=2.7 \ | ||
-DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \ | ||
-DPYTHON_LIBRARY=${prefix}/lib/libpython2.7.dylib \ | ||
-DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \ | ||
-DPYTHON_PACKAGES_PATH=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages | ||
} | ||
|
||
variant qt4 description {Build the Qt-based image viewer.} { | ||
configure.args-delete -DUSE_QT:BOOL=FALSE | ||
configure.args-append -DUSE_QT:BOOL=TRUE | ||
depends_lib-append port:qt4-mac | ||
} | ||
|
||
variant field3d description {Use Field3D.} { | ||
configure.args-delete -DUSE_FIELD3D:BOOL=FALSE | ||
configure.args-append -DUSE_FIELD3D:BOOL=TRUE | ||
depends_lib-append port:field3d | ||
} | ||
|
||
variant freetype description {Use FreeType.} { | ||
configure.args-delete -DUSE_FREETYPE:BOOL=FALSE | ||
configure.args-append -DUSE_FREETYPE:BOOL=TRUE -DFREETYPE_INCLUDE_PATH=${prefix}/include/freetype2 | ||
depends_lib-append port:freetype | ||
} | ||
|
||
variant natron require field3d description {Compile a version to be included in Natron} { | ||
} | ||
#configure.args --enable-bsdtar=shared --enable-bsdcpio=shared \ | ||
# --without-lzmadec --without-lzma | ||
#use_autoreconf yes |
Oops, something went wrong.