diff --git a/LuxCore-use-cxx-standard-14.patch b/LuxCore-use-cxx-standard-14.patch index b167a07..6777178 100644 --- a/LuxCore-use-cxx-standard-14.patch +++ b/LuxCore-use-cxx-standard-14.patch @@ -26,16 +26,3 @@ Index: LuxCore-luxcorerender_v2.6/CMakeLists.txt if (CMAKE_CONFIGURATION_TYPES) message(STATUS "Multi-config generator detected") -Index: LuxCore-luxcorerender_v2.6/src/slg/engines/bakecpu/bakecputhread.cpp -=================================================================== ---- LuxCore-luxcorerender_v2.6.orig/src/slg/engines/bakecpu/bakecputhread.cpp -+++ LuxCore-luxcorerender_v2.6/src/slg/engines/bakecpu/bakecputhread.cpp -@@ -352,7 +352,7 @@ void BakeCPURenderThread::RenderLightSam - const PathTracer &pathTracer = engine->pathTracer; - - const PathTracer::ConnectToEyeCallBackType connectToEyeCallBack = boost::bind( -- &BakeCPURenderThread::RenderConnectToEyeCallBack, this, mapInfo, _1, _2, _3, _4, _5); -+ &BakeCPURenderThread::RenderConnectToEyeCallBack, this, mapInfo, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5); - - pathTracer.RenderLightSample(state.device, state.scene, state.film, state.lightSampler, - state.lightSampleResults, connectToEyeCallBack); diff --git a/luxcorerender-fmt10.patch b/luxcorerender-fmt10.patch new file mode 100644 index 0000000..112e3db --- /dev/null +++ b/luxcorerender-fmt10.patch @@ -0,0 +1,11 @@ +--- LuxCore-luxcorerender_v2.6/src/luxcore/luxcoreimpl.cpp.fmt10 2021-12-25 20:07:24.000000000 +0900 ++++ LuxCore-luxcorerender_v2.6/src/luxcore/luxcoreimpl.cpp 2023-06-29 22:41:35.193767178 +0900 +@@ -518,7 +518,7 @@ const CameraImpl::CameraType CameraImpl: + + const CameraImpl::CameraType type = (Camera::CameraType)scene.scene->camera->GetType(); + +- API_RETURN("{}", type); ++ API_RETURN("{}", static_cast(type)); + + return type; + } diff --git a/luxcorerender-pr611-boost_181.patch b/luxcorerender-pr611-boost_181.patch new file mode 100644 index 0000000..acd4cbd --- /dev/null +++ b/luxcorerender-pr611-boost_181.patch @@ -0,0 +1,95 @@ +From 2babe4d3c0f52d82b6b6ac13f269b4a4e8c3b403 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Thu, 9 Mar 2023 22:55:50 +0900 +Subject: [PATCH] FIX: support boost 1.81 + +https://www.boost.org/users/history/version_1_79_0.html + +boost 1.79 deprecated boost/filesystem/string_file.hpp and +with boost 1.81 boost::filesystem::ofstream or so is no longer +available. + +Replace these with boost::nowide in boost/nowide/fstream.hpp . + +Fixes #610 . +--- + src/luxrays/utils/cuda.cpp | 13 +++++++------ + src/luxrays/utils/ocl.cpp | 13 +++++++------ + 2 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/src/luxrays/utils/cuda.cpp b/src/luxrays/utils/cuda.cpp +index 6ae9e9f42..de9f11df5 100644 +--- a/src/luxrays/utils/cuda.cpp ++++ b/src/luxrays/utils/cuda.cpp +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + #include "luxrays/luxrays.h" + #include "luxrays/utils/utils.h" +@@ -174,10 +175,10 @@ bool cudaKernelPersistentCache::CompilePTX(const vector &kernelsParamete + + // The use of boost::filesystem::path is required for UNICODE support: fileName + // is supposed to be UTF-8 encoded. +- boost::filesystem::ofstream file(boost::filesystem::path(fileName), +- boost::filesystem::ofstream::out | +- boost::filesystem::ofstream::binary | +- boost::filesystem::ofstream::trunc); ++ boost::nowide::ofstream file(boost::filesystem::path(fileName), ++ boost::nowide::ofstream::out | ++ boost::nowide::ofstream::binary | ++ boost::nowide::ofstream::trunc); + + // Write the binary hash + const u_int hashBin = oclKernelPersistentCache::HashBin(*ptx, *ptxSize); +@@ -206,8 +207,8 @@ bool cudaKernelPersistentCache::CompilePTX(const vector &kernelsParamete + + // The use of boost::filesystem::path is required for UNICODE support: fileName + // is supposed to be UTF-8 encoded. +- boost::filesystem::ifstream file(boost::filesystem::path(fileName), +- boost::filesystem::ifstream::in | boost::filesystem::ifstream::binary); ++ boost::nowide::ifstream file(boost::filesystem::path(fileName), ++ boost::nowide::ifstream::in | boost::nowide::ifstream::binary); + + // Read the binary hash + u_int hashBin; +diff --git a/src/luxrays/utils/ocl.cpp b/src/luxrays/utils/ocl.cpp +index 785836cef..a31af9ed6 100644 +--- a/src/luxrays/utils/ocl.cpp ++++ b/src/luxrays/utils/ocl.cpp +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + #include "luxrays/luxrays.h" + #include "luxrays/utils/utils.h" +@@ -303,10 +304,10 @@ cl_program oclKernelPersistentCache::Compile(cl_context context, cl_device_id de + + // The use of boost::filesystem::path is required for UNICODE support: fileName + // is supposed to be UTF-8 encoded. +- boost::filesystem::ofstream file(boost::filesystem::path(fileName), +- boost::filesystem::ofstream::out | +- boost::filesystem::ofstream::binary | +- boost::filesystem::ofstream::trunc); ++ boost::nowide::ofstream file(boost::filesystem::path(fileName), ++ boost::nowide::ofstream::out | ++ boost::nowide::ofstream::binary | ++ boost::nowide::ofstream::trunc); + + // Write the binary hash + const u_int hashBin = HashBin(bins, binsSizes[0]); +@@ -337,8 +338,8 @@ cl_program oclKernelPersistentCache::Compile(cl_context context, cl_device_id de + + // The use of boost::filesystem::path is required for UNICODE support: fileName + // is supposed to be UTF-8 encoded. +- boost::filesystem::ifstream file(boost::filesystem::path(fileName), +- boost::filesystem::ifstream::in | boost::filesystem::ifstream::binary); ++ boost::nowide::ifstream file(boost::filesystem::path(fileName), ++ boost::nowide::ifstream::in | boost::nowide::ifstream::binary); + + // Read the binary hash + u_int hashBin; diff --git a/luxcorerender.spec b/luxcorerender.spec index 5d0e697..b7f0f4f 100644 --- a/luxcorerender.spec +++ b/luxcorerender.spec @@ -1,11 +1,11 @@ # Force out of source build %undefine __cmake_in_source_build -#global prerelease 0 +%global prerelease beta1 Name: luxcorerender -Version: 2.6 -Release: %autorelease +Version: 2.7 +Release: %autorelease %{?prerelease: -p -e %{prerelease}} Summary: LuxCore Renderer, an unbiased rendering system License: Apache-2.0 @@ -36,6 +36,11 @@ Patch8: luxcorerender-oiio-2.3.patch # Patch for system libs when possible Patch9: luxcorerender-system.patch Patch10: luxcorerender-system2.patch +# https://github.com/LuxCoreRender/LuxCore/pull/611 (Currently under review) +# Replace boost::filesystem::ofstream with boost::nowide +Patch11: luxcorerender-pr611-boost_181.patch +# Patch for fmtlib 10 +Patch12: luxcorerender-fmt10.patch # Upstream only uses 64 bit archtecture ExclusiveArch: x86_64 @@ -76,6 +81,7 @@ BuildRequires: cmake(OpenColorIO) BuildRequires: cmake(OpenImageIO) BuildRequires: pkgconfig(pyside2) BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(shiboken2) BuildRequires: pkgconfig(spdlog) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(yaml-cpp) @@ -138,9 +144,15 @@ Requires: blender-%{name}%{?_isa} = %{version}-%{release} %description -n python3-%{name} The python3-%{name} contains Python 3 API for the library. +%package static +Summary: luxcorerender static libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static libraries for the LuxCore render. + %prep -%autosetup -p1 -n LuxCore-%{name}_v%{version}%{?prerelease} -%setup -q -T -D -a 1 -n LuxCore-%{name}_v%{version}%{?prerelease} +%autosetup -p1 -a1 -n LuxCore-%{name}_v%{version}%{?prerelease} # Fix bundled deps rm -rf pywheel pyunittests @@ -175,7 +187,7 @@ sed -i -e '\@set.*Boost_USE_STATIC_LIBS@s|ON|OFF|' cmake/Dependencies.cmake -DOpenGL_GL_PREFERENCE=GLVND \ -DPYTHON_V=%{python3_version_nodots} \ -DEMBREE_INCLUDE_PATH=%{_includedir}/libembree3 \ - -DEMBREE_LIBRARY=%{_libdir}/embree3.so \ + -DEMBREE_LIBRARY=%{_libdir}/libembree3.so \ -DOIDN_INCLUDE_PATH=%{_includedir}/OpenImageDenoise %cmake_build @@ -187,7 +199,7 @@ mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir} install -Dpm 0755 bin/* %{buildroot}%{_bindir}/ -install -Dpm 0755 lib/*.so* %{buildroot}%{_libdir}/ +install -Dpm 0755 lib/*.{a,so*} %{buildroot}%{_libdir}/ # Remove rpaths chrpath --delete %{buildroot}%{_bindir}/* @@ -201,13 +213,6 @@ cp -pr include/{luxcore,luxrays} %{buildroot}%{_includedir}/ mkdir -p %{buildroot}%{python3_sitearch} mv %{buildroot}%{_libdir}/pyluxcore.so %{buildroot}%{python3_sitearch} -# Install include files -cp -pr include/{luxcore,luxrays} %{buildroot}%{_includedir}/ - -# Relocate pyluxcore -mkdir -p %{buildroot}%{python3_sitearch} -#mv %%{buildroot}%%{_libdir}/pyluxcore.so %%{buildroot}%%{python3_sitearch} - # Import add-ons and preset mkdir -p %{buildroot}%{blender_addons}/%{name} cp -a BlendLuxCore-blendluxcore_v%{version}%{?prerelease}/* \ @@ -224,9 +229,6 @@ rm -fr %{buildroot}%{blender_addons}/%{name}/.gitignore # Upstream rejected the appdata install -p -m 644 -D %{SOURCE3} %{buildroot}%{_metainfodir}/org.%{name}.blendluxcore.metainfo.xml -# We do not want static file .a -rm -fr %{buildroot}%{_libdir}/*.a - %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.%{name}.blendluxcore.metainfo.xml @@ -235,7 +237,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.%{name}.bl %doc AUTHORS.txt %files core -%{_bindir}/* +%{_bindir}/{luxcoreconsole,luxcoredemo,luxcoreimplserializationdemo,luxcorescenedemo,luxcoreui} # GPLv3 %files -n blender-%{name} @@ -250,5 +252,8 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.%{name}.bl %files devel %{_includedir}/{luxcore,luxrays,slg} +%files static +%{_libdir}/lib{luxcore,luxrays,slg-core,slg-film,slg-kernels}.a + %changelog %autochangelog diff --git a/sources b/sources index e740c4a..dc55737 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (blendluxcore_v2.6.tar.gz) = 77afae27da5d58bb634b97f11272e46d87a474f57b13a70cb0d968a5a4fa014bbcbc9641099b943690e4544372eb2fd3976d073991bd062ace8735fd6fbacf44 -SHA512 (luxcorerender_v2.6.tar.gz) = 3726d865df83db32f143912e41a3c8729b7ebc2b5b5ab916aa441866babdaff5e5214037934725560d42c5fb72cc5851e012ccb0161103e4ac9972b1b5e82245 +SHA512 (luxcorerender_v2.7beta1.tar.gz) = 8922f25d420aa407868e59139f62508538d96fc90ce710dd587d4834d5600d2762ec8a3105f0d407f847fb9738c3854c3407f83af74e9463ef49afdf2cd11a7e +SHA512 (blendluxcore_v2.7beta1.tar.gz) = 4b57eb8fc560e9402e7b1953427cc7710aae11ae43ac4d855524f9eb3e2923830430c94c760fb10690a14442949573e60b7ac85ce9a0a9ce3de167167cc41202