diff --git a/graphics/openshadinglanguage/Makefile b/graphics/openshadinglanguage/Makefile index ec9b0ddf6a9b..e7b9cbed0f71 100644 --- a/graphics/openshadinglanguage/Makefile +++ b/graphics/openshadinglanguage/Makefile @@ -1,78 +1,86 @@ PORTNAME= openshadinglanguage DISTVERSIONPREFIX= v -DISTVERSION= 1.12.14.0 +DISTVERSION= 1.13.10.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?= 1 +PORTREVISION?= 0 CATEGORIES?= graphics devel MAINTAINER= FreeBSD@Shaneware.biz COMMENT?= Advanced shading language for production GI renderers WWW= https://github.com/AcademySoftwareFoundation/OpenShadingLanguage LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.md BROKEN_riscv64= fails to build: /usr/include/c++/v1/__threading_support:135:3: Unsupported architecture +ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le +ONLY_FOR_ARCHS_REASON= fails static_assert(sizeof(ustringhash) == sizeof(size_t) + LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libImath.so:math/Imath \ libOpenEXR.so:graphics/openexr \ libOpenImageIO.so:graphics/openimageio \ libpartio.so:graphics/partio \ libpugixml.so:textproc/pugixml -USES= bison cmake compiler:c++14-lang llvm:max=15,lib localbase ncurses +USES= bison cmake compiler:c++17-lang localbase ncurses USE_GITHUB= yes GH_ACCOUNT= AcademySoftwareFoundation GH_PROJECT= OpenShadingLanguage -CMAKE_ARGS+= -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_DOCDIR:STRING=${DOCSDIR} \ +CMAKE_ARGS+= -DCMAKE_CXX_STANDARD:INTEGER=17 -DCMAKE_INSTALL_DOCDIR:STRING=${DOCSDIR} \ -DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}" CMAKE_ON= ENABLE_RTTI OSL_BUILD_TESTS USE_LIBCPLUSPLUS USE_LLVM_BITCODE # DISTVERSION has an extra digit which isn't in the lib name # for LIBVERS we want the first three digits PLIST_SUB= SHL2=${PORTVERSION:R:R} SHL3=${PORTVERSION:R} OPTIONS_DEFINE= OSLTOY OPTIONS_SUB= yes OSLTOY_DESC= Interactive shader edit and visualize tool OSLTOY_USES= qt:6 gl OSLTOY_USE= GL=gl,opengl QT=base OSLTOY_CMAKE_BOOL= USE_QT .include post-patch: @${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},' \ -e 's,%%PYCMD%%,${PYTHON_CMD},' \ + ${WRKSRC}/CMakeLists.txt \ ${WRKSRC}/src/shaders/CMakeLists.txt \ ${WRKSRC}/src/doc/CMakeLists.txt \ ${WRKSRC}/src/liboslexec/CMakeLists.txt .if ${SLAVE_PORT} == yes BUILD_DEPENDS+= ${PREFIX}/share/cmake/pybind11/pybind11Config.cmake:devel/pybind11 LIB_DEPENDS+= liboslquery.so:graphics/openshadinglanguage RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}openimageio>0:graphics/py-openimageio@${PY_FLAVOR} USES+= python USE_PYTHON= flavors CMAKE_ARGS+= -DPYTHON_VERSION=${PYTHON_VER} CMAKE_ON+= USE_PYTHON PLIST= ${PKGDIR}/pkg-plist-pybind do-install: ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} ${INSTALL_LIB} ${BUILD_WRKSRC}/lib/python/site-packages/oslquery.so ${STAGEDIR}${PYTHON_SITELIBDIR} .else # SLAVE_PORT != yes -USES+= python:build +# using python:env as this port doesn't need to use python +# a python util script is installed for user consumption +# it is not required for using the port, only to assist developers using the libs +USES+= python:build shebangfix USE_LDCONFIG= yes CMAKE_OFF+= USE_PYTHON BINARY_ALIAS+= python=${PYTHON_CMD} +SHEBANG_FILES+= src/build-scripts/serialize-bc.py .endif # SLAVE_PORT .include diff --git a/graphics/openshadinglanguage/distinfo b/graphics/openshadinglanguage/distinfo index 957163e9c9a6..696cad51058a 100644 --- a/graphics/openshadinglanguage/distinfo +++ b/graphics/openshadinglanguage/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1690299022 -SHA256 (AcademySoftwareFoundation-OpenShadingLanguage-v1.12.14.0_GH0.tar.gz) = 6562a3fa10b80b8d328951004258ab6d12a6a23c23143f46a86d2f48f55354d3 -SIZE (AcademySoftwareFoundation-OpenShadingLanguage-v1.12.14.0_GH0.tar.gz) = 20555853 +TIMESTAMP = 1717481007 +SHA256 (AcademySoftwareFoundation-OpenShadingLanguage-v1.13.10.0_GH0.tar.gz) = 302f573d21c700d859fb36497d377656cb51213309d95bebda941bb0993a7f42 +SIZE (AcademySoftwareFoundation-OpenShadingLanguage-v1.13.10.0_GH0.tar.gz) = 21776721 diff --git a/graphics/openshadinglanguage/files/patch-CMakeLists.txt b/graphics/openshadinglanguage/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..d7d0a67c8952 --- /dev/null +++ b/graphics/openshadinglanguage/files/patch-CMakeLists.txt @@ -0,0 +1,18 @@ +--- CMakeLists.txt.orig 2024-02-20 23:53:17 UTC ++++ CMakeLists.txt +@@ -294,13 +294,13 @@ configure_package_config_file ("${PROJECT_SOURCE_DIR}/ + install (FILES "${OSL_PROJECT_CONFIG}" "${OSL_VERSION_CONFIG}" + DESTINATION "${OSL_CONFIG_INSTALL_DIR}") + +-install (FILES src/cmake/llvm_macros.cmake DESTINATION cmake) ++install (FILES src/cmake/llvm_macros.cmake DESTINATION ${OSL_CONFIG_INSTALL_DIR}) + + set (PERMISSION_FLAGS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) + install (FILES src/build-scripts/serialize-bc.py +- DESTINATION build-scripts ++ DESTINATION %%DATADIR%%/build-scripts + PERMISSIONS ${PERMISSION_FLAGS}) + + # install targets files diff --git a/graphics/openshadinglanguage/files/patch-src_liboslexec_CMakeLists.txt b/graphics/openshadinglanguage/files/patch-src_liboslexec_CMakeLists.txt deleted file mode 100644 index e9255bb1cf9f..000000000000 --- a/graphics/openshadinglanguage/files/patch-src_liboslexec_CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- src/liboslexec/CMakeLists.txt.orig 2022-09-30 23:43:53 UTC -+++ src/liboslexec/CMakeLists.txt -@@ -211,7 +211,7 @@ macro ( CUDA_SHADEOPS_COMPILE srclist ) - - # Serialize the linked bitcode into a CPP file and add it to the list of liboslexec sources - add_custom_command ( OUTPUT ${shadeops_bc_cuda_cpp} -- COMMAND ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" -+ COMMAND %%PY_CMD%% "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" - ${linked_shadeops_bc} ${shadeops_bc_cuda_cpp} "osl_llvm_compiled_ops_cuda" - DEPENDS "${CMAKE_SOURCE_DIR}/src/build-scripts/serialize-bc.py" ${linked_shadeops_bc} - ${exec_headers} ${PROJECT_PUBLIC_HEADERS} diff --git a/graphics/openshadinglanguage/pkg-plist b/graphics/openshadinglanguage/pkg-plist index 2571c410db71..7306f2f88155 100644 --- a/graphics/openshadinglanguage/pkg-plist +++ b/graphics/openshadinglanguage/pkg-plist @@ -1,107 +1,114 @@ bin/oslc bin/oslinfo %%OSLTOY%%bin/osltoy bin/testrender bin/testshade bin/testshade_dso include/OSL/accum.h include/OSL/batched_rendererservices.h include/OSL/batched_shaderglobals.h include/OSL/batched_texture.h +include/OSL/device_ptr.h include/OSL/device_string.h include/OSL/dual_vec.h include/OSL/dual.h +include/OSL/encodedtypes.h include/OSL/export.h +include/OSL/fmt_util.h include/OSL/genclosure.h include/OSL/Imathx/ImathColor.h include/OSL/Imathx/ImathFun.h include/OSL/Imathx/ImathLimits.h include/OSL/Imathx/ImathMatrix.h include/OSL/Imathx/ImathVec.h include/OSL/Imathx/Imathx.h +include/OSL/journal.h include/OSL/llvm_util.h include/OSL/mask.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/oslnoise.h include/OSL/oslquery.h include/OSL/oslversion.h include/OSL/platform.h include/OSL/rendererservices.h include/OSL/rs_free_function.h include/OSL/sfm_simplex.h include/OSL/sfmath.h include/OSL/shaderglobals.h include/OSL/strdecls.h +include/OSL/variant.h include/OSL/wide.h include/OSL/sfm_staticmatrix.h +lib/cmake/OSL/llvm_macros.cmake lib/cmake/OSL/OSLConfig.cmake lib/cmake/OSL/OSLConfigVersion.cmake lib/cmake/OSL/OSLTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/OSL/OSLTargets.cmake lib/liboslcomp.so lib/liboslcomp.so.%%SHL2%% lib/liboslcomp.so.%%SHL3%% lib/liboslexec.so lib/liboslexec.so.%%SHL2%% lib/liboslexec.so.%%SHL3%% lib/liboslnoise.so lib/liboslnoise.so.%%SHL2%% lib/liboslnoise.so.%%SHL3%% lib/liboslquery.so lib/liboslquery.so.%%SHL2%% lib/liboslquery.so.%%SHL3%% lib/libtestshade.so lib/libtestshade.so.%%SHL2%% lib/libtestshade.so.%%SHL3%% lib/osl.imageio.so libdata/pkgconfig/oslcomp.pc libdata/pkgconfig/oslexec.pc libdata/pkgconfig/oslquery.pc +%%DATADIR%%/build-scripts/serialize-bc.py %%DATADIR%%/shaders/color2.h %%DATADIR%%/shaders/color4.h %%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/mandelbrot.osl %%DATADIR%%/shaders/mandelbrot.oso %%DATADIR%%/shaders/matrix33.h %%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 %%DATADIR%%/shaders/vector2.h %%DATADIR%%/shaders/vector4.h %%DOCSDIR%%/CHANGES.md %%DOCSDIR%%/Figures/osltoy/osltoy-error.jpg %%DOCSDIR%%/Figures/osltoy/osltoy-fbm.jpg %%DOCSDIR%%/Figures/osltoy/osltoy-start.jpg %%DOCSDIR%%/Figures/testshade/fBm_default.jpg %%DOCSDIR%%/Figures/testshade/fBm_freq.jpg %%DOCSDIR%%/Figures/testshade/fBm_gain.jpg %%DOCSDIR%%/Figures/testshade/fBm_lac.jpg %%DOCSDIR%%/Figures/testshade/fBm_octaves.jpg %%DOCSDIR%%/Figures/testshade/makenoise.jpg %%DOCSDIR%%/Figures/testshade/noisetex.jpg %%DOCSDIR%%/Figures/testshade/show_uv.jpg %%DOCSDIR%%/INSTALL.md %%DOCSDIR%%/LICENSE.md %%DOCSDIR%%/OSLQuery.md.html %%DOCSDIR%%/README.md %%DOCSDIR%%/docdeep.md.html %%DOCSDIR%%/docs.css %%DOCSDIR%%/markdeep.min.js %%DOCSDIR%%/osl-languagespec.pdf %%DOCSDIR%%/osltoy.md.html %%DOCSDIR%%/testshade.md.html diff --git a/graphics/py-openshadinglanguage/Makefile b/graphics/py-openshadinglanguage/Makefile index a1707b8c59e3..1fa4e38214f8 100644 --- a/graphics/py-openshadinglanguage/Makefile +++ b/graphics/py-openshadinglanguage/Makefile @@ -1,12 +1,12 @@ -PORTREVISION= 1 +PORTREVISION= 0 CATEGORIES= graphics multimedia python # Note this port shares its PORTREVISION with graphics/openshadinglanguage! PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} COMMENT= OpenShadingLanguage python bindings MASTERDIR= ${.CURDIR}/../openshadinglanguage OPTIONS_EXCLUDE= MATERIALX OSLTOY .include "${MASTERDIR}/Makefile"