diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | cmake.extra.install.dirs.remove.patch | 16 | ||||
-rw-r--r-- | dir.patch | 14 | ||||
-rw-r--r-- | oiio2.patch | 266 |
5 files changed, 50 insertions, 320 deletions
@@ -1,29 +1,29 @@ pkgbase = appleseed pkgdesc = physically-based global illumination rendering engine primarily designed for animation and visual effects. - pkgver = 2.0.0 - pkgrel = 2 + pkgver = 2.1.0 + pkgrel = 1 url = https://appleseedhq.net arch = x86_64 license = MIT makedepends = cmake depends = python2 - depends = qt4 - depends = seexpr1-2 + depends = python + depends = embree + depends = qt5-base + depends = seexpr-qt5 depends = boost depends = openexr depends = opencolorio depends = openimageio - depends = openshadinglanguage + depends = openshadinglanguage>=1.8.9 depends = xerces-c depends = zlib provides = appleseed conflicts = appleseed-git - source = https://github.com/appleseedhq/appleseed/archive/2.0.0-beta.tar.gz - source = dir.patch - source = oiio2.patch - md5sums = 25030249df1403daf7b38359b2edf593 - md5sums = 3da34be53a016d68ff8abfebaed1dd4e - md5sums = f539c5b703c9a29fbaabaa47fbf3fc63 + source = https://github.com/appleseedhq/appleseed/archive/2.1.0-beta.tar.gz + source = cmake.extra.install.dirs.remove.patch + sha256sums = 5f8599c64a9c1dbdf0d8ee13a4d395b03e9bcba17fec731526109437ab760898 + sha256sums = 87b987f006e45d11cc4dfec2bd37fd2b760fd2bdbf06f48e7d467cbca9b2b301 pkgname = appleseed @@ -1,7 +1,7 @@ # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> pkgname=appleseed -pkgrel=2 -pkgver=2.0.0 +pkgrel=1 +pkgver=2.1.0 _pkgver=${pkgver}-beta pkgdesc="physically-based global illumination rendering engine primarily designed for animation and visual effects. " arch=(x86_64) @@ -9,50 +9,44 @@ url="https://appleseedhq.net" license=('MIT') provides=('appleseed') conflicts=('appleseed-git') -depends=(python2 qt4 'seexpr1=2.11' boost openexr opencolorio openimageio openshadinglanguage xerces-c zlib) +depends=(python2 python embree qt5-base seexpr-qt5 boost openexr opencolorio openimageio 'openshadinglanguage>=1.8.9' xerces-c zlib) makedepends=(cmake) options=() source=("https://github.com/${pkgname}hq/${pkgname}/archive/${_pkgver}.tar.gz" - dir.patch - oiio2.patch + "cmake.extra.install.dirs.remove.patch" ) -md5sums=('25030249df1403daf7b38359b2edf593' - '3da34be53a016d68ff8abfebaed1dd4e' - 'f539c5b703c9a29fbaabaa47fbf3fc63') +sha256sums=('5f8599c64a9c1dbdf0d8ee13a4d395b03e9bcba17fec731526109437ab760898' + '87b987f006e45d11cc4dfec2bd37fd2b760fd2bdbf06f48e7d467cbca9b2b301') -CMAKE_FLAGS="-DUSE_EXTERNAL_EXR=ON \ - -DUSE_EXTERNAL_OCIO=ON \ - -DUSE_EXTERNAL_OIIO=ON \ - -DUSE_EXTERNAL_OSL=ON \ - -DUSE_EXTERNAL_PNG=ON \ - -DUSE_EXTERNAL_XERCES=ON \ - -DUSE_EXTERNAL_ZLIB=ON \ - -DUSE_EXTERNAL_SEEXPR=ON \ - -DUSE_STATIC_BOOST=OFF \ - -DUSE_STATIC_OCIO=OFF \ - -DUSE_STATIC_OIIO=OFF \ - -DUSE_STATIC_OSL=OFF \ - -DWITH_DISNEY_MATERIAL=ON \ - -DWARNINGS_AS_ERRORS=OFF" -#pkgver() { -# cd ${pkgname}-${_pkgver} -# git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' -#} +CMAKE_FLAGS=( -DWITH_EMBREE=ON + -DWITH_DISNEY_MATERIAL=ON + -DWITH_PYTHON3_BINDINGS=ON + -DUSE_STATIC_EMBREE=OFF + -DUSE_STATIC_EXR=OFF + -DUSE_STATIC_BOOST=OFF + -DUSE_STATIC_OCIO=OFF + -DUSE_STATIC_OIIO=OFF + -DUSE_STATIC_OSL=OFF + -DWARNINGS_AS_ERRORS=OFF + ) prepare() { cd ${pkgname}-${_pkgver} + patch -Np1 -i ${srcdir}/cmake.extra.install.dirs.remove.patch grep -q avx /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_AVX=ON" grep -q avx2 /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_AVX2=ON" + grep -q f16c /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_F16C=ON" grep -q sse4_2 /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_SSE42=ON" - patch -Np1 -i ${srcdir}/dir.patch - patch -Np1 -i ${srcdir}/oiio2.patch } + build() { cd ${pkgname}-${_pkgver} mkdir -p build cd build - cmake -DCMAKE_BUILD_TYPE=Ship -DCMAKE_INSTALL_PREFIX=/opt/appleseed ${CMAKE_FLAGS} .. + _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))") + CMAKE_FLAGS+=( -DPYTHON3_INCLUDE_DIR=/usr/include/python${_pyver}m ) + cmake -DCMAKE_BUILD_TYPE=Ship -DCMAKE_INSTALL_PREFIX=/opt/appleseed ${CMAKE_FLAGS[*]} .. make } diff --git a/cmake.extra.install.dirs.remove.patch b/cmake.extra.install.dirs.remove.patch new file mode 100644 index 000000000000..c07767661983 --- /dev/null +++ b/cmake.extra.install.dirs.remove.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb8bfa958..8d8a4e5be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -756,11 +756,6 @@ install ( + DESTINATION schemas + ) + +-install ( +- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images)" +- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images/autosave)" +-) +- + if (INSTALL_HEADERS) + install ( + DIRECTORY src/appleseed/foundation diff --git a/dir.patch b/dir.patch deleted file mode 100644 index 5a94b99d2db0..000000000000 --- a/dir.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- orig/CMakeLists.txt 2018-06-08 19:18:17.020696035 +0200 -+++ new/CMakeLists.txt 2018-06-08 19:18:38.877166302 +0200 -@@ -675,11 +675,6 @@ - DESTINATION . - ) - --install ( -- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images)" -- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images/autosave)" --) -- - if (WITH_SAMPLES) - install ( - DIRECTORY diff --git a/oiio2.patch b/oiio2.patch deleted file mode 100644 index 4bbc7ed6d847..000000000000 --- a/oiio2.patch +++ /dev/null @@ -1,266 +0,0 @@ -From 8873abf4abeb5b0e7f832c862dcc7bd3c4204b78 Mon Sep 17 00:00:00 2001 -From: Luis Barrancos <luisbarrancos@users.noreply.github.com> -Date: Tue, 29 Jan 2019 20:13:59 +0800 -Subject: [PATCH] Initial OIIO 2 support - -`ImageInput`'s and `ImageOutput`'s static `create()` and `open()` methods now return -`std::unique_ptr` rather than raw pointers, and OpenVDB is now read via `texture3d()`. - -It also brings us the gradients needed for bump2roughness. Notes at https://github.com/OpenImageIO/oiio/releases/tag/Release-2.0.3 ---- - .../image/genericimagefilewriter.cpp | 62 +++++++++++-------- - .../foundation/image/genericimagefilewriter.h | 4 +- - .../genericprogressiveimagefilereader.cpp | 15 +++-- - 3 files changed, 48 insertions(+), 33 deletions(-) - -diff --git a/src/appleseed/foundation/image/genericimagefilewriter.cpp b/src/appleseed/foundation/image/genericimagefilewriter.cpp -index b7668c9bb..dcc718b78 100644 ---- a/src/appleseed/foundation/image/genericimagefilewriter.cpp -+++ b/src/appleseed/foundation/image/genericimagefilewriter.cpp -@@ -43,6 +43,9 @@ - // Boost headers. - #include "boost/filesystem/path.hpp" - -+// OIIO headers. -+#include "OpenImageIO/version.h" -+ - // Standard headers. - #include <algorithm> - #include <cstring> -@@ -55,8 +58,14 @@ namespace foundation - - struct GenericImageFileWriter::Impl - { -- std::vector<const ICanvas*> m_canvas; -- std::vector<OIIO::ImageSpec> m_spec; -+ const char* m_filename; -+#if OIIO_VERSION >= 20000 -+ std::unique_ptr<OIIO::ImageOutput> m_writer; -+#else -+ OIIO::ImageOutput* m_writer; -+#endif -+ std::vector<const ICanvas*> m_canvas; -+ std::vector<OIIO::ImageSpec> m_spec; - }; - - GenericImageFileWriter::GenericImageFileWriter(const char* filename) : -@@ -65,10 +74,10 @@ GenericImageFileWriter::GenericImageFileWriter(const char* filename) : - { - assert(filename); - -- m_filename = filename; -+ impl->m_filename = filename; -+ impl->m_writer = OIIO::ImageOutput::create(impl->m_filename); - -- m_writer = OIIO::ImageOutput::create(m_filename); -- if (m_writer == nullptr) -+ if (impl->m_writer == nullptr) - { - const std::string msg = OIIO::geterror(); - throw ExceptionIOError(msg.c_str()); -@@ -77,9 +86,10 @@ GenericImageFileWriter::GenericImageFileWriter(const char* filename) : - - GenericImageFileWriter::~GenericImageFileWriter() - { -- // Destroy the ImageOutput stucture. -- if (m_writer != nullptr) -- OIIO::ImageOutput::destroy(m_writer); -+#if OIIO_VERSION < 20000 -+ if (impl->m_writer != nullptr) -+ OIIO::ImageOutput::destroy(impl->m_writer); -+#endif - - delete impl; - } -@@ -170,7 +180,7 @@ void GenericImageFileWriter::set_image_spec() - spec.full_y = spec.y; - - // Size of a tile. -- if (m_writer->supports("tiles")) -+ if (impl->m_writer->supports("tiles")) - { - spec.tile_width = static_cast<int>(props.m_tile_width); - spec.tile_height = static_cast<int>(props.m_tile_height); -@@ -186,7 +196,7 @@ void GenericImageFileWriter::set_image_spec() - set_image_channels(props.m_channel_count, channel_names); - - // Format of the pixel data. -- const boost::filesystem::path filepath(m_filename); -+ const boost::filesystem::path filepath(impl->m_filename); - const std::string extension = lower_case(filepath.extension().string()); - - set_image_output_format(props.m_pixel_format); -@@ -292,7 +302,7 @@ void GenericImageFileWriter::set_image_attributes(const ImageAttributes& image_a - assert(!impl->m_spec.empty()); - - // Retrieve filename extension. -- const boost::filesystem::path filepath(m_filename); -+ const boost::filesystem::path filepath(impl->m_filename); - const std::string extension = lower_case(filepath.extension().string()); - - // General image attributes. -@@ -340,7 +350,7 @@ void GenericImageFileWriter::write_tiles(const size_t image_index) - const Tile& tile = canvas->tile(tile_x, tile_y); - - // Write the tile into the file. -- if (!m_writer->write_tile( -+ if (!impl->m_writer->write_tile( - static_cast<int>(tile_offset_x), - static_cast<int>(tile_offset_y), - 0, -@@ -349,7 +359,7 @@ void GenericImageFileWriter::write_tiles(const size_t image_index) - xstride, - ystride)) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - close_file(); - throw ExceptionIOError(msg.c_str()); - } -@@ -406,14 +416,14 @@ void GenericImageFileWriter::write_scanlines(const size_t image_index) - const size_t y_end = y_begin + props.m_tile_height; - - // Write scanline into the file. -- if (!m_writer->write_scanlines( -+ if (!impl->m_writer->write_scanlines( - static_cast<int>(y_begin), - static_cast<int>(y_end), - 0, - convert_pixel_format(props.m_pixel_format), - buffer_ptr)) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - close_file(); - throw ExceptionIOError(msg.c_str()); - } -@@ -424,7 +434,7 @@ void GenericImageFileWriter::write(const size_t image_index) - { - assert(image_index < impl->m_canvas.size()); - -- if (m_writer->supports("tiles")) -+ if (impl->m_writer->supports("tiles")) - write_tiles(image_index); - else - write_scanlines(image_index); -@@ -432,9 +442,9 @@ void GenericImageFileWriter::write(const size_t image_index) - - void GenericImageFileWriter::write_single_image() - { -- if (!m_writer->open(m_filename, impl->m_spec.back())) -+ if (!impl->m_writer->open(impl->m_filename, impl->m_spec.back())) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - throw ExceptionIOError(msg.c_str()); - } - -@@ -447,12 +457,12 @@ void GenericImageFileWriter::write_single_image() - - void GenericImageFileWriter::write_multi_images() - { -- if (!m_writer->supports("multiimage")) -+ if (!impl->m_writer->supports("multiimage")) - throw ExceptionIOError("File format is unable to write multiple images"); - -- if (!m_writer->open(m_filename, static_cast<int>(get_image_count()), impl->m_spec.data())) -+ if (!impl->m_writer->open(impl->m_filename, static_cast<int>(get_image_count()), impl->m_spec.data())) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - throw ExceptionIOError(msg.c_str()); - } - -@@ -460,9 +470,9 @@ void GenericImageFileWriter::write_multi_images() - { - if (i > 0) - { -- if (!m_writer->open(m_filename, impl->m_spec[i], OIIO::ImageOutput::AppendSubimage)) -+ if (!impl->m_writer->open(impl->m_filename, impl->m_spec[i], OIIO::ImageOutput::AppendSubimage)) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - close_file(); - throw ExceptionIOError(msg.c_str()); - } -@@ -495,10 +505,12 @@ void GenericImageFileWriter::write() - - void GenericImageFileWriter::close_file() - { -+ assert(impl->m_writer); -+ - // Close the image file. -- if (!m_writer->close()) -+ if (!impl->m_writer->close()) - { -- const std::string msg = m_writer->geterror(); -+ const std::string msg = impl->m_writer->geterror(); - throw ExceptionIOError(msg.c_str()); - } - } -diff --git a/src/appleseed/foundation/image/genericimagefilewriter.h b/src/appleseed/foundation/image/genericimagefilewriter.h -index 2c46ed3ea..02a650e6b 100644 ---- a/src/appleseed/foundation/image/genericimagefilewriter.h -+++ b/src/appleseed/foundation/image/genericimagefilewriter.h -@@ -38,6 +38,7 @@ - // OpenImageIO headers. - #include "foundation/platform/_beginoiioheaders.h" - #include "OpenImageIO/imageio.h" -+#include "OpenImageIO/version.h" - #include "foundation/platform/_endoiioheaders.h" - - // Forward declarations. -@@ -91,9 +92,6 @@ class APPLESEED_DLLSYMBOL GenericImageFileWriter - private: - struct Impl; - Impl* impl; -- -- OIIO::ImageOutput* m_writer; -- const char* m_filename; - }; - - } // namespace foundation -diff --git a/src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp b/src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp -index 1196cabcb..eac17a782 100644 ---- a/src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp -+++ b/src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp -@@ -43,6 +43,7 @@ - #include "OpenImageIO/imageio.h" - #include "OpenImageIO/paramlist.h" - #include "OpenImageIO/typedesc.h" -+#include "OpenImageIO/version.h" - #include "foundation/platform/_endoiioheaders.h" - - // Standard headers. -@@ -65,7 +66,13 @@ struct GenericProgressiveImageFileReader::Impl - { - Logger* m_logger; - string m_filename; -+ -+#if OIIO_VERSION < 20000 - OIIO::ImageInput* m_input; -+#else -+ std::unique_ptr<OIIO::ImageInput> m_input; -+#endif -+ - bool m_supports_random_access; - bool m_is_tiled; - CanvasProperties m_props; -@@ -173,11 +180,9 @@ void GenericProgressiveImageFileReader::close() - - impl->m_input->close(); - -- // todo: we should really be calling OIIO::ImageInput::destroy(impl->m_input) -- // but OpenImageIO 1.5.20 (the version included in appleseed-deps at the time -- // of writing) is too old to have this method. Since on Windows we link to -- // OpenImageIO statically, this should be safe anyway. -- delete impl->m_input; -+#if OIIO_VERSION < 20000 -+ OIIO::ImageInput::destroy(impl->m_input); -+#endif - - impl->m_input = nullptr; - } --- -2.22.0 - |