Skip to content
Permalink
Browse files

osl: new port

  • Loading branch information
jasonliu-- authored and cjones051073 committed May 18, 2020
1 parent 8cc048c commit 3e2fc0e08098b9a2fdf5145d74a65c0d3d9eb70d
Showing with 62 additions and 0 deletions.
  1. +62 −0 graphics/osl/Portfile
@@ -0,0 +1,62 @@
# -*- 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

PortSystem 1.0
PortGroup github 1.0
PortGroup qt5 1.0
PortGroup cmake 1.1

github.setup imageworks OpenShadingLanguage 1.10.9 Release-
name osl
categories graphics
platforms darwin
license BSD
maintainers @jasonliu-- openmaintainer
homepage http://opensource.imageworks.com
description advanced shading language for computer \
graphics rendering
long_description Open Shading Language is a language developed \
by Sony Pictures Imageworks, used for \
programming shader effects in \
computer-generated imagery. It can be used to \
define how surfaces or volumes scatter light, \
and can be used for describing materials, \
lights, displacement, and pattern generation.

checksums rmd160 e03ba154633bdd2860e458e39818be2af00d1ee5 \
sha256 6a62e89797c0dac382cb1816f87ae53deb332a4aedb89c956f05b36cd261a9a4 \
size 13547442

# Keep this value synchronized with the
# newest LLVM that is compatible with OSL
set llvm_version 9.0

depends_build-append port:flex \
port:bison
depends_lib port:llvm-$llvm_version \
port:boost \
port:ilmbase \
port:pugixml \
port:openimageio

post-patch {
reinplace "s|llvm-config|llvm-config-mp|g" \
${worksrcpath}/src/cmake/modules/FindLLVM.cmake
reinplace -E "s|\(/shaders\)|/share/OSL\\1|g" \
${worksrcpath}/src/liboslcomp/oslcomp.cpp
}

configure.args -DLLVM_VERSION=$llvm_version \
-DUSE_PARTIO=OFF

post-destroot {
xinstall -d ${destroot}${prefix}/share/OSL
move ${destroot}${prefix}/shaders \
${destroot}${prefix}/share/OSL/
}

variant partio description {Enable Partio point cloud support} {
depends_lib-append port:partio
configure.args-replace -DUSE_PARTIO=OFF -DUSE_PARTIO=ON
}

default_variants +partio

0 comments on commit 3e2fc0e

Please sign in to comment.
You can’t perform that action at this time.