git: 0d6fcb660617 - main - graphics/openshadinglanguage: Update to 1.15.7.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 31 Oct 2026 07:12:37 UTC
The branch main has been updated by joneum:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0d6fcb6606178fce087da98c32f90aaeaf2a3118
commit 0d6fcb6606178fce087da98c32f90aaeaf2a3118
Author: Shane <FreeBSD@ShaneWare.Biz>
AuthorDate: 2026-10-31 07:11:10 +0000
Commit: Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-31 07:12:02 +0000
graphics/openshadinglanguage: Update to 1.15.7.0
The Imageworks BSDF library is now part of OSL as a header-only library.
LLVM 14 is the new minimum, up to LLVM 23 is supported. The OSLQuery
Python bindings no longer pull in the OpenImageIO Python types, so they
work next to an OpenImageIO built with nanobind.
Changelog: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/releases/tag/v1.15.7.0
PR: 299659
Sponsored by: Netzkommune GmbH
---
graphics/openshadinglanguage/Makefile | 4 +-
graphics/openshadinglanguage/distinfo | 6 +--
.../files/patch-src_cmake_externalpackages.cmake | 11 -----
.../files/patch-src_cmake_modules_FindLLVM.cmake | 12 ------
.../files/patch-src_libbsdl_include_BSDL_tools.h | 19 +++++++++
.../files/patch-src_liboslcomp_oslcomp.cpp | 18 ---------
.../files/patch-src_liboslexec_llvm__util.cpp | 47 ----------------------
.../files/patch-src_liboslquery_py__osl.h | 10 ++---
graphics/py-openshadinglanguage/Makefile | 1 -
9 files changed, 29 insertions(+), 99 deletions(-)
diff --git a/graphics/openshadinglanguage/Makefile b/graphics/openshadinglanguage/Makefile
index b9cb306b9ed3..608b021d8122 100644
--- a/graphics/openshadinglanguage/Makefile
+++ b/graphics/openshadinglanguage/Makefile
@@ -1,11 +1,11 @@
PORTNAME= openshadinglanguage
DISTVERSIONPREFIX= v
-DISTVERSION= 1.14.8.0
+DISTVERSION= 1.15.7.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?= 2
+PORTREVISION?= 0
CATEGORIES?= graphics devel
MAINTAINER= FreeBSD@Shaneware.biz
diff --git a/graphics/openshadinglanguage/distinfo b/graphics/openshadinglanguage/distinfo
index dc06210dad5b..1829bce9b0a0 100644
--- a/graphics/openshadinglanguage/distinfo
+++ b/graphics/openshadinglanguage/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1766887558
-SHA256 (AcademySoftwareFoundation-OpenShadingLanguage-v1.14.8.0_GH0.tar.gz) = 7916ed97403766b7c853f52506cff0dc2b4a2f5f20386fb0d86817ca8725e18f
-SIZE (AcademySoftwareFoundation-OpenShadingLanguage-v1.14.8.0_GH0.tar.gz) = 43677183
+TIMESTAMP = 1791778633
+SHA256 (AcademySoftwareFoundation-OpenShadingLanguage-v1.15.7.0_GH0.tar.gz) = 06a914d67c8c8a0f62e518b14791b1dd044c2421b6259e2de6b4f89d8f1442e0
+SIZE (AcademySoftwareFoundation-OpenShadingLanguage-v1.15.7.0_GH0.tar.gz) = 44269698
diff --git a/graphics/openshadinglanguage/files/patch-src_cmake_externalpackages.cmake b/graphics/openshadinglanguage/files/patch-src_cmake_externalpackages.cmake
deleted file mode 100644
index 3f331362b151..000000000000
--- a/graphics/openshadinglanguage/files/patch-src_cmake_externalpackages.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/cmake/externalpackages.cmake.orig 2025-12-01 12:53:35 UTC
-+++ src/cmake/externalpackages.cmake
-@@ -58,7 +58,7 @@ checked_find_package (LLVM REQUIRED
- # LLVM library setup
- checked_find_package (LLVM REQUIRED
- VERSION_MIN 11.0
-- VERSION_MAX 21.9
-+ VERSION_MAX 22.9
- PRINT LLVM_SYSTEM_LIBRARIES CLANG_LIBRARIES
- LLVM_SHARED_MODE)
- # ensure include directory is added (in case of non-standard locations
diff --git a/graphics/openshadinglanguage/files/patch-src_cmake_modules_FindLLVM.cmake b/graphics/openshadinglanguage/files/patch-src_cmake_modules_FindLLVM.cmake
deleted file mode 100644
index a54616f72632..000000000000
--- a/graphics/openshadinglanguage/files/patch-src_cmake_modules_FindLLVM.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/cmake/modules/FindLLVM.cmake.orig 2025-12-01 12:53:35 UTC
-+++ src/cmake/modules/FindLLVM.cmake
-@@ -116,7 +116,8 @@ foreach (COMPONENT clangFrontend clangDriver clangSeri
- foreach (COMPONENT clangFrontend clangDriver clangSerialization
- clangParse clangSema clangAnalysis clangAST
- clangASTMatchers clangEdit clangLex
-- clangSupport clangAPINotes clangBasic)
-+ clangSupport clangAPINotes clangBasic
-+ clangOptions clangAnalysisLifetimeSafety)
- find_library ( _CLANG_${COMPONENT}_LIBRARY
- NAMES ${COMPONENT}
- PATHS ${LLVM_LIB_DIR}
diff --git a/graphics/openshadinglanguage/files/patch-src_libbsdl_include_BSDL_tools.h b/graphics/openshadinglanguage/files/patch-src_libbsdl_include_BSDL_tools.h
new file mode 100644
index 000000000000..e889db16114f
--- /dev/null
+++ b/graphics/openshadinglanguage/files/patch-src_libbsdl_include_BSDL_tools.h
@@ -0,0 +1,19 @@
+--- src/libbsdl/include/BSDL/tools.h.orig 2026-09-08 02:29:49 UTC
++++ src/libbsdl/include/BSDL/tools.h
+@@ -10,6 +10,16 @@
+
+ #include <tuple>
+
++/*
++ * FreeBSD's <sys/param.h> defines MAX/MIN macros, which collide with
++ * the BSDL template helpers below.
++ */
++#ifdef MAX
++#undef MAX
++#endif
++#ifdef MIN
++#undef MIN
++#endif
+ BSDL_ENTER_NAMESPACE
+
+ BSDL_INLINE float
diff --git a/graphics/openshadinglanguage/files/patch-src_liboslcomp_oslcomp.cpp b/graphics/openshadinglanguage/files/patch-src_liboslcomp_oslcomp.cpp
deleted file mode 100644
index 7b3db1c9dc6f..000000000000
--- a/graphics/openshadinglanguage/files/patch-src_liboslcomp_oslcomp.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/liboslcomp/oslcomp.cpp.orig 2025-12-01 12:53:35 UTC
-+++ src/liboslcomp/oslcomp.cpp
-@@ -200,8 +200,15 @@ OSLCompilerImpl::preprocess_buffer(const std::string&
-
- inst.setTarget(target);
-
-+#if OSL_LLVM_VERSION >= 220
-+ inst.createVirtualFileSystem();
-+#endif
- inst.createFileManager();
-+#if OSL_LLVM_VERSION >= 220
-+ inst.createSourceManager();
-+#else
- inst.createSourceManager(inst.getFileManager());
-+#endif
- clang::SourceManager& sm = inst.getSourceManager();
- sm.setMainFileID(sm.createFileID(std::move(mbuf), clang::SrcMgr::C_User));
-
diff --git a/graphics/openshadinglanguage/files/patch-src_liboslexec_llvm__util.cpp b/graphics/openshadinglanguage/files/patch-src_liboslexec_llvm__util.cpp
deleted file mode 100644
index 3d811151a6e7..000000000000
--- a/graphics/openshadinglanguage/files/patch-src_liboslexec_llvm__util.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
---- src/liboslexec/llvm_util.cpp.orig 2025-12-01 12:53:35 UTC
-+++ src/liboslexec/llvm_util.cpp
-@@ -718,7 +718,7 @@ LLVM_Util::debug_setup_compilation_unit(const char* co
- osl_identity, // Identify the producer of debugging information and code. Usually this is a compiler version string.
- true, // isOptimized
- "<todo>", // This string lists command line options. This string is directly embedded in debug info output which may be used by a tool analyzing generated debugging information.
-- OSL_VERSION, // This indicates runtime version for languages like Objective-C
-+ 0, // This indicates runtime version for languages like Objective-C
- llvm::StringRef(), // SplitName = he name of the file that we'll split debug info out into.
- llvm::DICompileUnit::DebugEmissionKind::
- LineTablesOnly, // DICompileUnit::DebugEmissionKind
-@@ -1581,7 +1581,11 @@ LLVM_Util::make_jit_execengine(std::string* err, Targe
- // TODO: investigate if reciprocals can be disabled by other means.
- // Perhaps enable UnsafeFPMath, then modify creation of DIV instructions
- // to remove the arcp (allow reciprocal) flag on that instructions
-+#if OSL_LLVM_VERSION < 220
-+ // UnsafeFPMath was removed from TargetOptions in LLVM 22; FP math
-+ // control is now handled via per-instruction fast-math flags in IR.
- options.UnsafeFPMath = false;
-+#endif
- // Since there are OSL language functions isinf and isnan,
- // we cannot assume there will not be infs and NANs
- options.NoInfsFPMath = false;
-@@ -1846,7 +1850,11 @@ LLVM_Util::nvptx_target_machine()
- // N.B. 'Standard' only allow fusion of 'blessed' ops (currently just
- // fmuladd). To truly disable FMA and never fuse FP-ops, we need to
- // instead use llvm::FPOpFusion::Strict.
-+#if OSL_LLVM_VERSION < 220
-+ // UnsafeFPMath was removed from TargetOptions in LLVM 22; FP math
-+ // control is now handled via per-instruction fast-math flags in IR.
- options.UnsafeFPMath = 1;
-+#endif
- options.NoInfsFPMath = 1;
- options.NoNaNsFPMath = 1;
- options.HonorSignDependentRoundingFPMathOption = 0;
-@@ -1862,7 +1870,11 @@ LLVM_Util::nvptx_target_machine()
- // Verify that the NVPTX target has been initialized
- std::string error;
- const llvm::Target* llvm_target
-+#if OSL_LLVM_VERSION >= 220
-+ = llvm::TargetRegistry::lookupTarget(ModuleTriple, error);
-+#else
- = llvm::TargetRegistry::lookupTarget(ModuleTriple.str(), error);
-+#endif
- OSL_ASSERT(llvm_target
- && "PTX compile error: LLVM Target is not initialized");
-
diff --git a/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h b/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h
index b95e41a1af43..ee929b1f0a0d 100644
--- a/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h
+++ b/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h
@@ -4,11 +4,11 @@
#include <Imath/half.h>
-+#if PY_VERSION_HEX >= 0x030b00a6
-+ #ifndef Py_BUILD_CORE
-+ #define Py_BUILD_CORE 1
-+ #endif
-+ #include "internal/pycore_frame.h"
++#if PY_VERSION_HEX >= 0x030b00a6 && PY_VERSION_HEX < 0x030d0000
++# ifndef Py_BUILD_CORE
++# define Py_BUILD_CORE 1
++# endif
++# include "internal/pycore_frame.h"
+#endif
+
#include <pybind11/numpy.h>
diff --git a/graphics/py-openshadinglanguage/Makefile b/graphics/py-openshadinglanguage/Makefile
index 80096949bdbd..adc0d2cfabad 100644
--- a/graphics/py-openshadinglanguage/Makefile
+++ b/graphics/py-openshadinglanguage/Makefile
@@ -1,4 +1,3 @@
-PORTREVISION= 8
CATEGORIES= graphics multimedia python
# Note this port shares its PORTREVISION with graphics/openshadinglanguage!
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}