diff options
author | bartus | 2022-02-22 11:33:26 +0100 |
---|---|---|
committer | bartus | 2022-02-22 11:38:12 +0100 |
commit | 762b3eb18b20adc7a6c8ed83b946f1f952838a69 (patch) | |
tree | 01016beacf91661152f4ee8ea0d50119807f1961 | |
parent | 11b57bddf07c335df89bd0f2eed238e7c89ca31e (diff) | |
download | aur-762b3eb18b20adc7a6c8ed83b946f1f952838a69.tar.gz |
Use external openvdb
Fix openvdb:7 incompatible with oneTBB
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | openvdb.patch | 71 |
3 files changed, 86 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgbase = luxcorerender-git pkgdesc = Physically correct, unbiased rendering engine. - pkgver = 2.5.r225.g7ff6d46e4 + pkgver = 2.6.r16.g7ce21392d pkgrel = 1 epoch = 2 url = https://www.luxcorerender.org/ @@ -21,10 +21,11 @@ pkgbase = luxcorerender-git depends = gtk3 depends = openimagedenoise depends = openimageio + depends = openvdb optdepends = opencl-driver: for gpu acceleration optdepends = pyside2: for pyluxcoretools gui provides = luxrays - provides = luxcorerender=2.5 + provides = luxcorerender=2.6 conflicts = luxcorerender options = !buildflags source = luxcorerender::git+https://github.com/LuxCoreRender/LuxCore.git#branch=master @@ -32,15 +33,18 @@ pkgbase = luxcorerender-git source = glfw.patch source = boost107400.patch::https://github.com/LuxCoreRender/LuxCore/pull/483.patch source = openexr3.patch + source = openvdb.patch sha256sums = SKIP sha256sums = 1395fbb98c989c101c66350d228af05c20abf20ada55f179ca563094c1b642ca sha256sums = 4e04c3eb653f00d2389aff8e7fda2d244e258cbca3a22e32c13388a3984e4bb1 sha256sums = f5fc0bbeb09c95750da6ca668ea2f26b84998c57c9abb8ac0a3d96131017f66d sha256sums = 0ab21f055753155b3f46b6c773ef4509c69b86852cc474fcaa336ff8497dcaa9 + sha256sums = bc8d7f2cb0fd562f80ebdc93847d9db57b674ac25ce37d266c0582b7a0bd859d b2sums = SKIP b2sums = 9e6f2eeaa87d3c75dbdcc91adf1a21c5b4edefab7984229e60ba639b34baf4c38b287b67a7be9954f22535375a179dfc9c8afdfab4bdea381d749047b00df781 b2sums = 2903992389c61fc4720cde8a011d0b637de647a7c9e701609968c01a8ab904277dfb27a90179d4cfcf98382973542e59d1384580236c25f6568aaa7b6ba90528 b2sums = 3057084619ac9067883b820d6ca4cb896155b587a09b689aa2a0dd1139478577164cfe90d5165d84cb88850b35fc5721ad76568764f555bd5c05b8e394c95b48 b2sums = e42842f8ac778f617261e10e78aa805d8ab47c53e762f2153e5acb18e0f69f5eda735205cdaa9fe4b2ac93ae3e16ca4a5599ac8b2d4617e12e3b821cb99e5e2b + b2sums = 3c35212e111ff1eab9704bb1bc30fec1b306d5857c59d8c714c156e36583db78e26e861354fbc279f30b90c80150c3b502a8e1f86d775c8d2f9fcdda37d703d4 pkgname = luxcorerender-git @@ -20,14 +20,14 @@ _fragment=${FRAGMENT:-#branch=master} _name="luxcorerender" pkgname=${_name}-git -pkgver=2.5.r225.g7ff6d46e4 +pkgver=2.6.r16.g7ce21392d epoch=2 pkgrel=1 pkgdesc="Physically correct, unbiased rendering engine." arch=('x86_64') url="https://www.luxcorerender.org/" license=('Apache') -depends+=(blosc boost-libs embree glfw gtk3 openimagedenoise openimageio) +depends+=(blosc boost-libs embree glfw gtk3 openimagedenoise openimageio openvdb) optdepends+=("pyside2: for pyluxcoretools gui") makedepends+=(boost cmake doxygen git ninja pyside2-tools) conflicts=(luxcorerender) @@ -38,17 +38,20 @@ source=("${_name}::git+https://github.com/LuxCoreRender/LuxCore.git${_fragment}" "glfw.patch" "boost107400.patch::https://github.com/LuxCoreRender/LuxCore/pull/483.patch" "openexr3.patch" + "openvdb.patch" ) sha256sums=('SKIP' '1395fbb98c989c101c66350d228af05c20abf20ada55f179ca563094c1b642ca' '4e04c3eb653f00d2389aff8e7fda2d244e258cbca3a22e32c13388a3984e4bb1' 'f5fc0bbeb09c95750da6ca668ea2f26b84998c57c9abb8ac0a3d96131017f66d' - '0ab21f055753155b3f46b6c773ef4509c69b86852cc474fcaa336ff8497dcaa9') + '0ab21f055753155b3f46b6c773ef4509c69b86852cc474fcaa336ff8497dcaa9' + 'bc8d7f2cb0fd562f80ebdc93847d9db57b674ac25ce37d266c0582b7a0bd859d') b2sums=('SKIP' '9e6f2eeaa87d3c75dbdcc91adf1a21c5b4edefab7984229e60ba639b34baf4c38b287b67a7be9954f22535375a179dfc9c8afdfab4bdea381d749047b00df781' '2903992389c61fc4720cde8a011d0b637de647a7c9e701609968c01a8ab904277dfb27a90179d4cfcf98382973542e59d1384580236c25f6568aaa7b6ba90528' '3057084619ac9067883b820d6ca4cb896155b587a09b689aa2a0dd1139478577164cfe90d5165d84cb88850b35fc5721ad76568764f555bd5c05b8e394c95b48' - 'e42842f8ac778f617261e10e78aa805d8ab47c53e762f2153e5acb18e0f69f5eda735205cdaa9fe4b2ac93ae3e16ca4a5599ac8b2d4617e12e3b821cb99e5e2b') + 'e42842f8ac778f617261e10e78aa805d8ab47c53e762f2153e5acb18e0f69f5eda735205cdaa9fe4b2ac93ae3e16ca4a5599ac8b2d4617e12e3b821cb99e5e2b' + '3c35212e111ff1eab9704bb1bc30fec1b306d5857c59d8c714c156e36583db78e26e861354fbc279f30b90c80150c3b502a8e1f86d775c8d2f9fcdda37d703d4') pkgver() { # shellcheck disable=SC2164 @@ -59,6 +62,7 @@ pkgver() { prepare() { + git -C "${srcdir}/${_name}" revert --no-commit 5d963d0b32a30d76ac193e8198647b74cd9a2e12 git -C "${srcdir}/${_name}" apply -v "${srcdir}"/*.patch #fix build against fmt 8.0 sed '/format_system_error/s/msg/msg.c_str()/' -i "${srcdir}/${_name}"/deps/spdlog-1.8.0/include/spdlog/common-inl.h @@ -67,6 +71,7 @@ prepare() { build() { _pyver=$(python -c "from sys import version_info; print(\"%d%d\" % (version_info.major,version_info.minor))") CMAKE_FLAGS+=("-DPYTHON_V=${_pyver}") + CMAKE_FLAGS+=(-DCMAKE_CXX_STANDARD=14) cmake "${CMAKE_FLAGS[@]}" -S "${srcdir}"/${_name} -B build -G Ninja # shellcheck disable=SC2046 ninja $(grep -oP -- '-+[A-z]+ ?[0-9]*'<<<"${MAKEFLAGS:--j1}") -C "${srcdir}/build" diff --git a/openvdb.patch b/openvdb.patch new file mode 100644 index 000000000000..c379853d721b --- /dev/null +++ b/openvdb.patch @@ -0,0 +1,71 @@ +From 63816ba1e9715a2c3c5cd22469d0ca2cbba8469b Mon Sep 17 00:00:00 2001 +From: bartus <szczepaniak.bartek+github@gmail.com> +Date: Tue, 14 Dec 2021 12:11:33 +0100 +Subject: [PATCH] Allow external openvdb + +--- + cmake/Dependencies.cmake | 7 +++++++ + src/luxcore/CMakeLists.txt | 1 - + src/slg/CMakeLists.txt | 13 ++++++++++--- + 3 files changed, 17 insertions(+), 4 deletions(-) + +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 5bd992b0d..ec7e74bff 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -160,3 +160,13 @@ ENDIF (NOT BISON_NOT_AVAILABLE) + IF (NOT FLEX_NOT_AVAILABLE) + find_package(FLEX) + ENDIF (NOT FLEX_NOT_AVAILABLE) ++ ++# Find OpenVDB ++if(NOT USE_BUNDLE_OPENVDB) ++ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) ++# preserve Boost_LIBRARIES variable ++ set(save_Boost_LIBRARIES ${Boost_LIBRARIES}) ++ find_package(OpenVDB REQUIRED) ++ set(Boost_LIBRARIES ${save_Boost_LIBRARIES}) ++ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE) ++endif() +diff --git a/src/luxcore/CMakeLists.txt b/src/luxcore/CMakeLists.txt +index f876fa425..d0615b6e1 100644 +--- a/src/luxcore/CMakeLists.txt ++++ b/src/luxcore/CMakeLists.txt +@@ -175,7 +175,6 @@ set(PYLUXCORE_SRCS + + add_library(pyluxcore MODULE ${PYLUXCORE_SRCS} ${LUXCORE_LIB_SRCS} ${LUX_PARSER_SRC}) + +-include_directories(${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0) + include_directories(${LuxRays_SOURCE_DIR}/deps/opencolorio-2.0.0/include) + + add_definitions(-DOPENVDB_STATICLIB ${VISIBILITY_FLAGS}) +diff --git a/src/slg/CMakeLists.txt b/src/slg/CMakeLists.txt +index 2f1bf79cc..c41b87e9f 100644 +--- a/src/slg/CMakeLists.txt ++++ b/src/slg/CMakeLists.txt +@@ -143,12 +143,19 @@ set(OPENVDB_SRCS + + SOURCE_GROUP("Source Files\\OpenVDB Library" FILES ${OPENVDB_SRCS}) + +-include_directories(${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0) +- + # Required by OpenVDB to read ABI 3 + #add_definitions("-D OPENVDB_USE_DEPRECATED_ABI -DOPENVDB_3_ABI_COMPATIBLE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB") + add_definitions("-DOPENVDB_USE_BLOSC -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB") +-add_library(openvdb STATIC ${OPENVDB_SRCS}) ++if(USE_BUNDLE_OPENVDB) ++ add_library(openvdb STATIC ${OPENVDB_SRCS}) ++ set_target_properties(openvdb INCLUDE_DIRECTORIES ${LuxRays_SOURCE_DIR}/deps/openvdb-7.0.0) ++else() ++ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) ++ find_package(OpenVDB REQUIRED) ++ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE) ++ add_library(openvdb INTERFACE) ++ target_link_libraries(openvdb INTERFACE OpenVDB::openvdb) ++endif() + + ########################################################################### + # +-- +2.34.1 + |