Index: head/graphics/openshadinglanguage/Makefile =================================================================== --- head/graphics/openshadinglanguage/Makefile (revision 391572) +++ head/graphics/openshadinglanguage/Makefile (revision 391573) @@ -1,49 +1,43 @@ # Created by: Shane Ambler # $FreeBSD$ PORTNAME= openshadinglanguage -PORTVERSION= 1.5.12 +PORTVERSION= 1.6.6 DISTVERSIONPREFIX= Release- CATEGORIES= graphics devel MAINTAINER= FreeBSD@Shaneware.biz COMMENT= Advanced shading language for production GI renderers LICENSE= BSD3CLAUSE BUILD_DEPENDS= llvm-config34:${PORTSDIR}/devel/llvm34 \ clang34>=3.4_1:${PORTSDIR}/lang/clang34 LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \ libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \ libOpenImageIO.so:${PORTSDIR}/graphics/openimageio RUN_DEPENDS= llvm-config34:${PORTSDIR}/devel/llvm34 BROKEN_FreeBSD_9= does not build USE_GITHUB= yes GH_ACCOUNT= imageworks GH_PROJECT= OpenShadingLanguage CMAKE_ARGS= -DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config34" USE_LDCONFIG= yes USES= bison cmake:outsource .include .if ${OSVERSION} < 1000033 BUILD_DEPENDS+= flex>=2.5.37:${PORTSDIR}/textproc/flex CMAKE_ARGS+= -DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex CXXFLAGS+= -I${LOCALBASE}/include/flex .endif post-patch: @${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/liboslexec/serialize-bc.bash - -post-install: -.for LNAME in oslcomp oslexec oslquery testshade - ${MV} ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so.1 - ${LN} -s lib${LNAME}.so.1 ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so -.endfor .include Index: head/graphics/openshadinglanguage/distinfo =================================================================== --- head/graphics/openshadinglanguage/distinfo (revision 391572) +++ head/graphics/openshadinglanguage/distinfo (revision 391573) @@ -1,2 +1,2 @@ -SHA256 (imageworks-OpenShadingLanguage-Release-1.5.12_GH0.tar.gz) = c871942c5cfade3cad2f1dc68ddf47f96aeae285c162394305c46db6c6930873 -SIZE (imageworks-OpenShadingLanguage-Release-1.5.12_GH0.tar.gz) = 11560575 +SHA256 (imageworks-OpenShadingLanguage-Release-1.6.6_GH0.tar.gz) = be73f656e65997b5c3ce9576c8ee4695b14dbd100319862596f2f77585ee2a88 +SIZE (imageworks-OpenShadingLanguage-Release-1.6.6_GH0.tar.gz) = 12351422 Index: head/graphics/openshadinglanguage/files/patch-CMakeLists.txt =================================================================== --- head/graphics/openshadinglanguage/files/patch-CMakeLists.txt (revision 391572) +++ head/graphics/openshadinglanguage/files/patch-CMakeLists.txt (nonexistent) @@ -1,75 +0,0 @@ ---- ./CMakeLists.txt.orig 2013-11-26 05:11:29.000000000 +1030 -+++ ./CMakeLists.txt 2013-11-28 23:52:39.202491493 +1030 -@@ -10,10 +10,8 @@ - set (OSO_FILE_VERSION_MAJOR 1) - set (OSO_FILE_VERSION_MINOR 0) - --cmake_minimum_required (VERSION 2.6) --if (NOT CMAKE_VERSION VERSION_LESS 2.8.4) -- cmake_policy (SET CMP0017 NEW) --endif () -+cmake_minimum_required (VERSION 2.8.7) -+cmake_policy (SET CMP0017 NEW) - set (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) - message (STATUS "Project source dir = ${PROJECT_SOURCE_DIR}") - message (STATUS "Project build dir = ${CMAKE_BINARY_DIR}") -@@ -22,6 +20,8 @@ - message (FATAL_ERROR "Not allowed to run in-source build!") - endif () - -+include (CheckCXXSymbolExists) -+ - if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Release") - endif () -@@ -124,12 +124,11 @@ - endif () - endif () - --# Try to detect if this is an OSX distro new enough that the system library --# is libc++, in which case we should force use of Boost Wave (because that --# avoids a nonstandard g++ extension in the other code path). --if (EXISTS "/usr/lib/libc++.dylib" OR OSL_USE_LIBCPP) -- set (OSL_SYSTEM_HAS_LIBCPP ON) --endif () -+# Try to detect libc++, in which case we should force use of Boost -+# Wave (because that avoids a nonstandard g++ extension in the other -+# code path). -+check_cxx_symbol_exists(_LIBCPP_VERSION string OSL_SYSTEM_HAS_LIBCPP) -+ - - set (VERBOSE OFF CACHE BOOL "Print lots of messages while compiling") - set (BUILDSTATIC OFF CACHE BOOL "Build static library instead of shared") -@@ -167,7 +166,6 @@ - - if (CMAKE_COMPILER_IS_CLANG AND OSL_USE_LIBCPP) - message (STATUS "Using libc++") -- add_definitions ("-stdlib=libc++") - endif () - - set (CMAKE_MODULE_PATH -@@ -202,6 +200,10 @@ - - message (STATUS "CMAKE_INSTALL_RPATH = ${CMAKE_INSTALL_RPATH}") - -+# Try to detect libc++, in which case we should force use of Boost -+# Wave (because that avoids a nonstandard g++ extension in the other -+# code path). -+check_cxx_symbol_exists(_LIBCPP_VERSION string OSL_SYSTEM_HAS_LIBCPP) - - ########################################################################### - if (MSVC) -@@ -232,6 +234,13 @@ - add_subdirectory (src/include) - add_subdirectory (src/doc) - -+if (USE_BOOST_WAVE) -+ add_definitions ("-DUSE_BOOST_WAVE") -+endif () -+ -+if (CMAKE_COMPILER_IS_CLANG AND OSL_SYSTEM_HAS_LIBCPP) -+ message (STATUS "Using libc++") -+endif () - - - ######################################################################### Property changes on: head/graphics/openshadinglanguage/files/patch-CMakeLists.txt ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/files/patch-alignment.patch =================================================================== --- head/graphics/openshadinglanguage/files/patch-alignment.patch (revision 391572) +++ head/graphics/openshadinglanguage/files/patch-alignment.patch (nonexistent) @@ -1,181 +0,0 @@ ---- ./src/include/OSL/oslexec.h.orig -+++ ./src/include/OSL/oslexec.h -@@ -428,7 +428,8 @@ class OSLEXECPUBLIC ShadingSystem - std::string getstats (int level=1) const; - - void register_closure (string_view name, int id, const ClosureParam *params, -- PrepareClosureFunc prepare, SetupClosureFunc setup); -+ PrepareClosureFunc prepare, SetupClosureFunc setup, -+ int alignment = 1); - /// Query either by name or id an existing closure. If name is non - /// NULL it will use it for the search, otherwise id would be used - /// and the name will be placed in name if successful. Also return ---- ./src/liboslexec/oslexec_pvt.h -+++ ./src/liboslexec/oslexec_pvt.h -@@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #include - #include - -+#include "OSL/genclosure.h" - #include "OSL/oslexec.h" - #include "OSL/oslclosure.h" - #include "osl_pvt.h" -@@ -693,13 +694,16 @@ class ClosureRegistry { - std::vector params; - // the needed size for the structure - int struct_size; -+ // the needed alignment of the structure -+ int alignment; - // Creation callbacks - PrepareClosureFunc prepare; - SetupClosureFunc setup; - }; - - void register_closure (string_view name, int id, const ClosureParam *params, -- PrepareClosureFunc prepare, SetupClosureFunc setup); -+ PrepareClosureFunc prepare, SetupClosureFunc setup, -+ int alignmen = 1); - - const ClosureEntry *get_entry (ustring name) const; - const ClosureEntry *get_entry (int id) const { -@@ -855,7 +859,8 @@ class ShadingSystemImpl - ustring *alloc_string_constants (size_t n) { return m_string_pool.alloc (n); } - - void register_closure (string_view name, int id, const ClosureParam *params, -- PrepareClosureFunc prepare, SetupClosureFunc setup); -+ PrepareClosureFunc prepare, SetupClosureFunc setup, -+ int alignment = 1); - bool query_closure (const char **name, int *id, - const ClosureParam **params); - const ClosureRegistry::ClosureEntry *find_closure(ustring name) const { -@@ -1120,19 +1125,24 @@ class SimplePool { - char * alloc(size_t size, size_t alignment=1) { - // Alignment must be power of two - DASSERT ((alignment & (alignment - 1)) == 0); -- // Fail if beyond allocation limits or senseless alignment -- if (size > BlockSize || (size & (alignment - 1)) != 0) -+ // Fail if beyond allocation limits (we make sure there's enough space -+ // for alignment padding here as well). -+ if (size + alignment - 1 > BlockSize) - return NULL; -- m_block_offset -= (m_block_offset & (alignment - 1)); // Fix up alignment -- if (size <= m_block_offset) { -+ // Fix up alignment -+ size_t alignment_offset = alignment_offset_calc(alignment); -+ if (size + alignment_offset <= m_block_offset) { - // Enough space in current block -- m_block_offset -= size; -+ m_block_offset -= size + alignment_offset; - } else { - // Need to allocate a new block - m_current_block++; - m_block_offset = BlockSize - size; - if (m_blocks.size() == m_current_block) - m_blocks.push_back(new char[BlockSize]); -+ alignment_offset = alignment_offset_calc(alignment); -+ DASSERT (m_block_offset >= alignment_offset); -+ m_block_offset -= alignment_offset; - } - return m_blocks[m_current_block] + m_block_offset; - } -@@ -1140,6 +1150,10 @@ class SimplePool { - void clear () { m_current_block = 0; m_block_offset = BlockSize; } - - private: -+ inline size_t alignment_offset_calc(size_t alignment) { -+ return (((uintptr_t)m_blocks[m_current_block] + m_block_offset) & (alignment - 1)); -+ } -+ - std::vector m_blocks; - size_t m_current_block; - size_t m_block_offset; -@@ -1320,7 +1334,9 @@ class OSLEXECPUBLIC ShadingContext { - ClosureComponent * closure_component_allot(int id, size_t prim_size, int nattrs) { - size_t needed = sizeof(ClosureComponent) + (prim_size >= 4 ? prim_size - 4 : 0) - + sizeof(ClosureComponent::Attr) * nattrs; -- ClosureComponent *comp = (ClosureComponent *) m_closure_pool.alloc(needed); -+ int alignment = m_shadingsys.find_closure(id)->alignment; -+ size_t alignment_offset = closure_alignment_offset_calc(alignment); -+ ClosureComponent *comp = (ClosureComponent *) (m_closure_pool.alloc(needed + alignment_offset, alignment) + alignment_offset); - comp->type = ClosureColor::COMPONENT; - comp->id = id; - comp->size = prim_size; -@@ -1335,7 +1351,9 @@ class OSLEXECPUBLIC ShadingContext { - // Allocate the component and the mul back to back - size_t needed = sizeof(ClosureComponent) + (prim_size >= 4 ? prim_size - 4 : 0) - + sizeof(ClosureComponent::Attr) * nattrs; -- ClosureComponent *comp = (ClosureComponent *) m_closure_pool.alloc(needed); -+ int alignment = m_shadingsys.find_closure(id)->alignment; -+ size_t alignment_offset = closure_alignment_offset_calc(alignment); -+ ClosureComponent *comp = (ClosureComponent *) (m_closure_pool.alloc(needed + alignment_offset, alignment) + alignment_offset); - comp->type = ClosureColor::COMPONENT; - comp->id = id; - comp->size = prim_size; -@@ -1486,6 +1504,14 @@ class OSLEXECPUBLIC ShadingContext { - // Buffering of error messages and printfs - typedef std::pair ErrorItem; - mutable std::vector m_buffered_errors; -+ -+ // Calculate offset needed to align ClosureComponent's mem to a given alignment. -+ inline size_t closure_alignment_offset_calc(size_t alignment) { -+ return alignment == 1 -+ ? 0 -+ : alignment - (reckless_offsetof(ClosureComponent, mem) & (alignment - 1)); -+ } -+ - }; - - ---- ./src/liboslexec/shadingsys.cpp -+++ ./src/liboslexec/shadingsys.cpp -@@ -284,9 +284,10 @@ void - ShadingSystem::register_closure (string_view name, int id, - const ClosureParam *params, - PrepareClosureFunc prepare, -- SetupClosureFunc setup) -+ SetupClosureFunc setup, -+ int alignment) - { -- return m_impl->register_closure (name, id, params, prepare, setup); -+ return m_impl->register_closure (name, id, params, prepare, setup, alignment); - } - - -@@ -798,7 +799,8 @@ void - ShadingSystemImpl::register_closure (string_view name, int id, - const ClosureParam *params, - PrepareClosureFunc prepare, -- SetupClosureFunc setup) -+ SetupClosureFunc setup, -+ int alignment) - { - for (int i = 0; params && params[i].type != TypeDesc(); ++i) { - if (params[i].key == NULL && params[i].type.size() != (size_t)params[i].field_size) { -@@ -806,7 +808,7 @@ ShadingSystemImpl::register_closure (string_view name, int id, - return; - } - } -- m_closure_registry.register_closure(name, id, params, prepare, setup); -+ m_closure_registry.register_closure(name, id, params, prepare, setup, alignment); - } - - -@@ -2554,7 +2556,8 @@ void - ClosureRegistry::register_closure (string_view name, int id, - const ClosureParam *params, - PrepareClosureFunc prepare, -- SetupClosureFunc setup) -+ SetupClosureFunc setup, -+ int alignment) - { - if (m_closure_table.size() <= (size_t)id) - m_closure_table.resize(id + 1); -@@ -2578,6 +2581,7 @@ ClosureRegistry::register_closure (string_view name, int id, - } - entry.prepare = prepare; - entry.setup = setup; -+ entry.alignment = alignment; - m_closure_name_to_id[ustring(name)] = id; - } - - Property changes on: head/graphics/openshadinglanguage/files/patch-alignment.patch ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/files/patch-shaders__CMakeLists.txt =================================================================== --- head/graphics/openshadinglanguage/files/patch-shaders__CMakeLists.txt (revision 391572) +++ head/graphics/openshadinglanguage/files/patch-shaders__CMakeLists.txt (nonexistent) @@ -1,9 +0,0 @@ ---- ./src/shaders/CMakeLists.txt.orig 2013-02-15 11:22:42.000000000 +1030 -+++ ./src/shaders/CMakeLists.txt 2013-02-17 07:11:28.389609929 +1030 -@@ -42,5 +42,5 @@ - SOURCES ${shader_source} ${shader_headers}) - - install (FILES ${shader_headers} ${shader_source} ${shader_objs} -- DESTINATION shaders) -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage/shaders) - Property changes on: head/graphics/openshadinglanguage/files/patch-shaders__CMakeLists.txt ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/files/patch-doc__CMakeLists.txt =================================================================== --- head/graphics/openshadinglanguage/files/patch-doc__CMakeLists.txt (revision 391572) +++ head/graphics/openshadinglanguage/files/patch-doc__CMakeLists.txt (nonexistent) @@ -1,16 +0,0 @@ ---- ./src/doc/CMakeLists.txt.orig 2013-11-26 05:11:29.000000000 +1030 -+++ ./src/doc/CMakeLists.txt 2013-11-28 23:57:11.961491397 +1030 -@@ -1,11 +1,11 @@ - set (public_docs osl-languagespec.pdf) - # Some day: CLA-INDIVIDUAL CLA-CORPORATE - --install (FILES ${public_docs} DESTINATION doc COMPONENT documentation) -+install (FILES ${public_docs} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage COMPONENT documentation) - - install ( FILES "${PROJECT_SOURCE_DIR}/LICENSE" - "${PROJECT_SOURCE_DIR}/INSTALL" - "${PROJECT_SOURCE_DIR}/CHANGES" - "${PROJECT_SOURCE_DIR}/README.md" -- DESTINATION . ) -+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage ) - Property changes on: head/graphics/openshadinglanguage/files/patch-doc__CMakeLists.txt ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/files/patch-src_doc_CMakeLists.txt =================================================================== --- head/graphics/openshadinglanguage/files/patch-src_doc_CMakeLists.txt (nonexistent) +++ head/graphics/openshadinglanguage/files/patch-src_doc_CMakeLists.txt (revision 391573) @@ -0,0 +1,16 @@ +--- src/doc/CMakeLists.txt.orig 2015-03-10 21:57:05 UTC ++++ src/doc/CMakeLists.txt +@@ -1,11 +1,11 @@ + set (public_docs osl-languagespec.pdf) + # Some day: CLA-INDIVIDUAL CLA-CORPORATE + +-install (FILES ${public_docs} DESTINATION doc COMPONENT documentation) ++install (FILES ${public_docs} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage COMPONENT documentation) + + install ( FILES "${PROJECT_SOURCE_DIR}/LICENSE" + "${PROJECT_SOURCE_DIR}/INSTALL" + "${PROJECT_SOURCE_DIR}/CHANGES" + "${PROJECT_SOURCE_DIR}/README.md" +- DESTINATION . ) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage ) + Property changes on: head/graphics/openshadinglanguage/files/patch-src_doc_CMakeLists.txt ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/files/patch-src_shaders_CMakeLists.txt =================================================================== --- head/graphics/openshadinglanguage/files/patch-src_shaders_CMakeLists.txt (nonexistent) +++ head/graphics/openshadinglanguage/files/patch-src_shaders_CMakeLists.txt (revision 391573) @@ -0,0 +1,9 @@ +--- src/shaders/CMakeLists.txt.orig 2015-03-10 21:57:05 UTC ++++ src/shaders/CMakeLists.txt +@@ -49,5 +49,5 @@ add_custom_target (shaders ALL + SOURCES ${shader_source} ${shader_headers}) + + install (FILES ${shader_headers} ${shader_source} ${shader_objs} +- DESTINATION shaders) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/openshadinglanguage/shaders) + Property changes on: head/graphics/openshadinglanguage/files/patch-src_shaders_CMakeLists.txt ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/openshadinglanguage/pkg-plist =================================================================== --- head/graphics/openshadinglanguage/pkg-plist (revision 391572) +++ head/graphics/openshadinglanguage/pkg-plist (revision 391573) @@ -1,49 +1,45 @@ bin/oslc bin/oslinfo bin/testrender bin/testshade bin/testshade_dso include/OSL/accum.h include/OSL/dual_vec.h include/OSL/dual.h include/OSL/export.h include/OSL/genclosure.h include/OSL/Imathx.h include/OSL/llvm_util.h include/OSL/matrix22.h include/OSL/optautomata.h include/OSL/oslclosure.h include/OSL/oslcomp.h include/OSL/oslconfig.h include/OSL/oslexec.h include/OSL/oslquery.h include/OSL/oslversion.h include/OSL/rendererservices.h include/OSL/shaderglobals.h lib/liboslcomp.so -lib/liboslcomp.so.1 lib/liboslexec.so -lib/liboslexec.so.1 lib/liboslquery.so -lib/liboslquery.so.1 lib/libtestshade.so -lib/libtestshade.so.1 %%DATADIR%%/CHANGES %%DATADIR%%/INSTALL %%DATADIR%%/LICENSE %%DATADIR%%/README.md %%DATADIR%%/osl-languagespec.pdf %%DATADIR%%/shaders/emitter.osl %%DATADIR%%/shaders/emitter.oso %%DATADIR%%/shaders/glass.osl %%DATADIR%%/shaders/glass.oso %%DATADIR%%/shaders/image.osl %%DATADIR%%/shaders/image.oso %%DATADIR%%/shaders/matte.osl %%DATADIR%%/shaders/matte.oso %%DATADIR%%/shaders/metal.osl %%DATADIR%%/shaders/metal.oso %%DATADIR%%/shaders/oslutil.h %%DATADIR%%/shaders/stdosl.h %%DATADIR%%/shaders/ubersurface.osl %%DATADIR%%/shaders/ubersurface.oso