From c764ec84d57fe99053623ed965278f69af496670 Mon Sep 17 00:00:00 2001 From: Automatic Build System Date: Sun, 6 Oct 2024 21:12:00 +0200 Subject: [PATCH] rebuilt by autoport with build requirements: libclang-devel>=0:19.1.1-1mamba [release 1.13.11.0-2mamba;Sat Oct 05 2024] --- openshadinglanguage-1.13.11.0-llvm-19.patch | 116 ++++++++++++++++++ ...e-1.13.11.0-upstream_fix_typo_dual_h.patch | 23 ++++ openshadinglanguage.spec | 11 +- 3 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 openshadinglanguage-1.13.11.0-llvm-19.patch create mode 100644 openshadinglanguage-1.13.11.0-upstream_fix_typo_dual_h.patch diff --git a/openshadinglanguage-1.13.11.0-llvm-19.patch b/openshadinglanguage-1.13.11.0-llvm-19.patch new file mode 100644 index 0000000..9f41746 --- /dev/null +++ b/openshadinglanguage-1.13.11.0-llvm-19.patch @@ -0,0 +1,116 @@ +From 35a4ef87f672c747aa477a1f3143a07b9843c0c0 Mon Sep 17 00:00:00 2001 +From: Larry Gritz +Date: Tue, 24 Sep 2024 08:25:49 -0700 +Subject: [PATCH] build: Support for LLVM 19 (#1873) + +Signed-off-by: Larry Gritz +--- + INSTALL.md | 4 ++-- + src/build-scripts/gh-installdeps.bash | 9 +++++---- + src/cmake/externalpackages.cmake | 2 +- + src/liboslexec/llvm_passes.h | 1 + + src/liboslexec/llvm_util.cpp | 14 +++++++++++--- + 5 files changed, 20 insertions(+), 10 deletions(-) + +diff --git a/INSTALL.md b/INSTALL.md +index d95b0db2e..17d608ef2 100644 +--- a/INSTALL.md ++++ b/INSTALL.md +@@ -47,8 +47,8 @@ NEW or CHANGED dependencies since the last major release are **bold**. + $OpenImageIO_ROOT/lib to be in your LD_LIBRARY_PATH (or + DYLD_LIBRARY_PATH on OS X). + +-* [LLVM](http://www.llvm.org) 9, 10, 11, 12, 13, 14, 15, 16, 17, or 18, including +- clang libraries. ++* [LLVM](http://www.llvm.org) 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, or 19, ++ including clang libraries. + + * (optional) For GPU rendering on NVIDIA GPUs: + * [OptiX](https://developer.nvidia.com/rtx/ray-tracing/optix) 7.0 or higher. +diff --git a/src/build-scripts/gh-installdeps.bash b/src/build-scripts/gh-installdeps.bash +index 02f0ad31c..1e5012e25 100755 +--- a/src/build-scripts/gh-installdeps.bash ++++ b/src/build-scripts/gh-installdeps.bash +@@ -94,11 +94,12 @@ else + libopencolorio-dev + + if [[ "${QT_VERSION:-5}" == "5" ]] ; then +- time sudo apt-get -q install -y \ +- qt5-default || /bin/true ++ time sudo apt-get -q install -y qt5-default || /bin/true + elif [[ "${QT_VERSION}" == "6" ]] ; then +- time sudo apt-get -q install -y \ +- qt6-base-dev || /bin/true ++ time sudo apt-get -q install -y qt6-base-dev || /bin/true ++ fi ++ if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then ++ time sudo apt-get -q install -y ${EXTRA_DEP_PACKAGES} + fi + + export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index a652739cb..36aa570bf 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -58,7 +58,7 @@ checked_find_package (pugixml REQUIRED + # LLVM library setup + checked_find_package (LLVM REQUIRED + VERSION_MIN 9.0 +- VERSION_MAX 18.9 ++ VERSION_MAX 19.9 + PRINT LLVM_SYSTEM_LIBRARIES CLANG_LIBRARIES) + # ensure include directory is added (in case of non-standard locations + include_directories (BEFORE SYSTEM "${LLVM_INCLUDES}") +diff --git a/src/liboslexec/llvm_passes.h b/src/liboslexec/llvm_passes.h +index 43c7a7289..d0a1b7502 100644 +--- a/src/liboslexec/llvm_passes.h ++++ b/src/liboslexec/llvm_passes.h +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp +index de41e217f..dd1473b06 100644 +--- a/src/liboslexec/llvm_util.cpp ++++ b/src/liboslexec/llvm_util.cpp +@@ -1173,7 +1173,12 @@ static llvm::StringMap sCpuFeatures; + static bool + populateCpuFeatures() + { ++#if OSL_LLVM_VERSION >= 190 ++ sCpuFeatures = llvm::sys::getHostCPUFeatures(); ++ return true; ++#else + return llvm::sys::getHostCPUFeatures(sCpuFeatures); ++#endif + } + + +@@ -1301,6 +1306,7 @@ static cspan + get_required_cpu_features_for(TargetISA target) + { + switch (target) { ++ case TargetISA::UNKNOWN: + case TargetISA::NONE: return {}; + case TargetISA::x64: return required_cpu_features_by_x64; + case TargetISA::SSE4_2: return required_cpu_features_by_SSE4_2; +@@ -1551,10 +1557,12 @@ LLVM_Util::make_jit_execengine(std::string* err, TargetISA requestedISA, + #if OSL_LLVM_VERSION < 120 + options.StackAlignmentOverride = 0; + #endif +- options.FunctionSections = true; +- options.UseInitArray = false; +- options.FloatABIType = llvm::FloatABI::Default; ++ options.FunctionSections = true; ++ options.UseInitArray = false; ++ options.FloatABIType = llvm::FloatABI::Default; ++#if OSL_LLVM_VERSION < 190 + options.RelaxELFRelocations = false; ++#endif + //options.DebuggerTuning = llvm::DebuggerKind::GDB; + + // TODO: Find equivalent function for PrintMachineCode post LLVM 12 diff --git a/openshadinglanguage-1.13.11.0-upstream_fix_typo_dual_h.patch b/openshadinglanguage-1.13.11.0-upstream_fix_typo_dual_h.patch new file mode 100644 index 0000000..c5756e3 --- /dev/null +++ b/openshadinglanguage-1.13.11.0-upstream_fix_typo_dual_h.patch @@ -0,0 +1,23 @@ +From d8c6f9a004c6fe3ae024ee17903c7ca9f9e8f9e7 Mon Sep 17 00:00:00 2001 +From: Larry Gritz +Date: Mon, 23 Sep 2024 16:34:37 -0700 +Subject: [PATCH] fix: Typo in dual.h made invalid template DualStorage (#1871) + +Signed-off-by: Larry Gritz +--- + src/include/OSL/dual.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/include/OSL/dual.h b/src/include/OSL/dual.h +index a7b5e4063..60ec05ee8 100644 +--- a/src/include/OSL/dual.h ++++ b/src/include/OSL/dual.h +@@ -204,7 +204,7 @@ class DualStorage + : m_val(other.m_val) + , m_dx(other.m_dx) + , m_dy(other.m_dy) +- , m_dz(other.dz) ++ , m_dz(other.m_dz) + {} + + OSL_HOSTDEVICE constexpr const T& elem (ConstIndex<0>) const { return m_val; } diff --git a/openshadinglanguage.spec b/openshadinglanguage.spec index 6c82d9a..b200ebe 100644 --- a/openshadinglanguage.spec +++ b/openshadinglanguage.spec @@ -1,6 +1,6 @@ Name: openshadinglanguage Version: 1.13.11.0 -Release: 1mamba +Release: 2mamba Summary: Advanced shading language for production GI renderers Group: System/Libraries Vendor: openmamba @@ -8,6 +8,8 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage Source: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git/v%{version}/OpenShadingLanguage-%{version}.tar.bz2 +Patch0: openshadinglanguage-1.13.11.0-llvm-19.patch +Patch1: openshadinglanguage-1.13.11.0-upstream_fix_typo_dual_h.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -24,6 +26,7 @@ BuildRequires: libstdc++6-devel BuildRequires: pugixml-devel BuildRequires: qt6-qtbase-devel ## AUTOBUILDREQ-END +BuildRequires: libclang-devel >= 0:19.1.1-1mamba BuildRequires: cmake Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} @@ -46,11 +49,12 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} %description -n lib%{name}-devel This package contains libraries and header files for developing applications that use %{name}. - %debug_package %prep %setup -q -n OpenShadingLanguage-%{version} +%patch 0 -p1 -b .llvm-19 +%patch 1 -p1 -b .upstream_fix_typo_dual_h %build %cmake \ @@ -112,6 +116,9 @@ rm -f %{buildroot}/usr/cmake/llvm_macros.cmake %changelog +* Sat Oct 05 2024 Automatic Build System 1.13.11.0-2mamba +- rebuilt by autoport with build requirements: libclang-devel>=0:19.1.1-1mamba + * Wed Sep 04 2024 Automatic Build System 1.13.11.0-1mamba - automatic version update by autodist