Date: Sun, 14 Mar 2021 09:02:36 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568372 - in head/graphics/appleseed: . files Message-ID: <202103140902.12E92aUD039497@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Sun Mar 14 09:02:35 2021 New Revision: 568372 URL: https://svnweb.freebsd.org/changeset/ports/568372 Log: - Switch appleseed.studio build to Python 3.x and enable by default - Register missing dependency on the `graphics/opencolorio' port Added: head/graphics/appleseed/files/patch-src_appleseed.studio_CMakeLists.txt (contents, props changed) head/graphics/appleseed/files/patch-src_appleseed.studio_main_main.cpp (contents, props changed) head/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_mainwindow.cpp (contents, props changed) head/graphics/appleseed/files/patch-src_appleseed.studio_python_module.cpp (contents, props changed) head/graphics/appleseed/files/patch-src_appleseed.studio_python_pythoninterpreter.cpp (contents, props changed) Modified: head/graphics/appleseed/Makefile head/graphics/appleseed/files/patch-CMakeLists.txt head/graphics/appleseed/pkg-plist Modified: head/graphics/appleseed/Makefile ============================================================================== --- head/graphics/appleseed/Makefile Sun Mar 14 08:58:36 2021 (r568371) +++ head/graphics/appleseed/Makefile Sun Mar 14 09:02:35 2021 (r568372) @@ -3,7 +3,7 @@ PORTNAME= appleseed DISTVERSION= 2.1.0-beta -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MAINTAINER= danfe@FreeBSD.org @@ -17,6 +17,7 @@ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ libpng.so:graphics/png \ libIlmImf.so:graphics/openexr \ libIlmThread.so:graphics/ilmbase \ + libOpenColorIO.so:graphics/opencolorio \ libOpenImageIO.so:graphics/openimageio \ libxerces-c.so:textproc/xerces-c3 \ liboslexec.so:graphics/openshadinglanguage @@ -30,8 +31,7 @@ ONLY_FOR_ARCHS_REASON= not ported to it yet USES= cmake compiler:c++11-lang shebangfix SHEBANG_FILES= scripts/*.py -CMAKE_ARGS= -DWITH_STUDIO:BOOL=OFF \ - -DWITH_PYTHON2_BINDINGS:BOOL=OFF \ +CMAKE_ARGS= -DWITH_PYTHON2_BINDINGS:BOOL=OFF \ -DWITH_DOXYGEN:BOOL=OFF \ -DINSTALL_HEADERS:BOOL=OFF \ -DINSTALL_TESTS:BOOL=OFF \ @@ -49,16 +49,25 @@ PLIST_SUB= APPHOME=${CMAKE_INSTALL_PREFIX} SUB_FILES= pkg-message SUB_LIST:= ${PLIST_SUB} -OPTIONS_DEFINE= PYTHON -OPTIONS_DEFAULT= PYTHON +OPTIONS_DEFINE= PYTHON STUDIO +OPTIONS_DEFAULT= PYTHON STUDIO OPTIONS_SUB= yes PYTHON_USES= gl python:3.5+,build,run PYTHON_USE= GL=gl PYTHON_CMAKE_ON= -DWITH_PYTHON3_BINDINGS:BOOL=ON +STUDIO_DESC= Build appleseed.studio (Qt-based) +STUDIO_LIB_DEPENDS= ${PY_BOOST} +STUDIO_USES= qt:5 +STUDIO_USE= QT=buildtools_build,qmake_build,concurrent,core,gui,opengl,widgets +STUDIO_CMAKE_OFF= -DWITH_STUDIO:BOOL=OFF +STUDIO_IMPLIES= PYTHON + post-patch: @${RMDIR} ${WRKSRC}/sandbox/docs/api @${RM} ${WRKSRC}/sandbox/share/cmake/Modules/FindOpenImageIO.cmake .include <bsd.port.mk> + +PATCH_ARGS+= -l Modified: head/graphics/appleseed/files/patch-CMakeLists.txt ============================================================================== --- head/graphics/appleseed/files/patch-CMakeLists.txt Sun Mar 14 08:58:36 2021 (r568371) +++ head/graphics/appleseed/files/patch-CMakeLists.txt Sun Mar 14 09:02:35 2021 (r568372) @@ -1,5 +1,16 @@ --- CMakeLists.txt.orig 2019-08-31 15:49:01 UTC +++ CMakeLists.txt +@@ -681,8 +681,8 @@ if (WITH_PYTHON2_BINDINGS OR WITH_PYTHON3_BINDINGS) + endif () + + if (WITH_STUDIO) +- if (NOT WITH_PYTHON2_BINDINGS) +- message (FATAL_ERROR "Option WITH_PYTHON2_BINDINGS should be \"ON\" to build appleseed.studio.") ++ if (NOT WITH_PYTHON3_BINDINGS) ++ message (FATAL_ERROR "Option WITH_PYTHON3_BINDINGS should be \"ON\" to build appleseed.studio.") + endif () + add_subdirectory (src/appleseed.studio) + endif () @@ -732,15 +732,27 @@ install ( sandbox/share sandbox/stylesheets Added: head/graphics/appleseed/files/patch-src_appleseed.studio_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.studio_CMakeLists.txt Sun Mar 14 09:02:35 2021 (r568372) @@ -0,0 +1,62 @@ +--- src/appleseed.studio/CMakeLists.txt.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.studio/CMakeLists.txt +@@ -33,18 +33,13 @@ + #-------------------------------------------------------------------------------------------------- + + # Boost. +-if (NOT PYTHON_MAJOR_VERSION STREQUAL "2") +- message (FATAL_ERROR "Python 2.x needed.") +-else () +- if (Boost_VERSION GREATER_EQUAL 106700) +- find_package (Boost 1.61 REQUIRED COMPONENTS python27) +- else () +- find_package (Boost 1.61 REQUIRED COMPONENTS python) +- endif () +-endif () ++find_package (Boost 1.61 REQUIRED COMPONENTS python) + + # OpenGL. + find_package (OpenGL REQUIRED) ++ ++# Python 3. ++find_package (Python3 REQUIRED) + + # Qt 5. + find_package (Qt5 REQUIRED COMPONENTS Concurrent Core OpenGL Widgets) +@@ -475,7 +470,7 @@ QT5_ADD_RESOURCES (appleseed.studio_resource_files + + add_executable (appleseed.studio + ${appleseed.studio_sources} +- $<TARGET_OBJECTS:appleseed.py2.obj> ++ $<TARGET_OBJECTS:appleseed.py3.obj> + ${appleseed.studio_generated_ui_files} + ${appleseed.studio_generated_moc_h_files} + ${appleseed.studio_resource_files} +@@ -505,7 +500,7 @@ include_directories ( + . + ../appleseed.shared + ${OPENCOLORIO_INCLUDE_DIRS} +- ${PYTHON_INCLUDE_DIRS} ++ ${PYTHON_INCLUDE_DIR} + ) + + +@@ -533,8 +528,8 @@ target_link_libraries (appleseed.studio + Qt5::Concurrent + Qt5::OpenGL + Qt5::Widgets +- ${OPENGL_LIBRARY} +- ${PYTHON_LIBRARIES} ++ ${OPENGL_gl_LIBRARY} ++ glad ${PYTHON_LIBRARY} + ) + + if (WITH_DISNEY_MATERIAL) +@@ -589,5 +584,5 @@ install (DIRECTORY ../../sandbox/studio + DESTINATION . + ) + +-install (DIRECTORY ../../sandbox/lib/python/site-packages DESTINATION "lib/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}") +-install (DIRECTORY python/studio DESTINATION "lib/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}/appleseed") ++install (DIRECTORY ../../sandbox/lib/python/site-packages DESTINATION "../lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") ++install (DIRECTORY python/studio DESTINATION "../lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/appleseed") Added: head/graphics/appleseed/files/patch-src_appleseed.studio_main_main.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.studio_main_main.cpp Sun Mar 14 09:02:35 2021 (r568372) @@ -0,0 +1,44 @@ +--- src/appleseed.studio/main/main.cpp.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.studio/main/main.cpp +@@ -29,8 +29,9 @@ + + // appleseed.studio headers. + #include "commandlinehandler.h" +-#include "mainwindow/mainwindow.h" ++// XXX: must be included before Qt headers because of `slot' redefine + #include "python/pythoninterpreter.h" ++#include "mainwindow/mainwindow.h" + #include "utility/miscellaneous.h" + + // appleseed.shared headers. +@@ -141,7 +142,7 @@ namespace + bf::path python_path = bf::path(Application::get_root_path()) / "python27"; + #else + // On Linux, Python's standard libraries are located in lib/python2.7/. +- bf::path python_path = bf::path(Application::get_root_path()); ++ bf::path python_path = bf::path(Application::get_root_path()) / ".."; + #endif + + if (bf::is_directory(python_path)) +@@ -159,18 +160,18 @@ namespace + "will use Python installation expected to exist in %s.", + python_home); + +- Py_SetPythonHome(python_home); ++ Py_SetPythonHome(Py_DecodeLocale(python_home, nullptr)); + } + else + { + const string python_path_str = python_path.make_preferred().string(); + + QMessageBox msgbox; +- msgbox.setWindowTitle("Python 2.7 Installation Not Found"); ++ msgbox.setWindowTitle("Python Installation Not Found"); + msgbox.setIcon(QMessageBox::Critical); + msgbox.setText( + QString( +- "No Python 2.7 installation could be found in %1 where appleseed.studio expects one " ++ "No Python installation could be found in %1 where appleseed.studio expects one " + "to be, and the PYTHONHOME environment variable is not defined or is empty. " + "appleseed.studio may not work satisfactorily.").arg(QString::fromStdString(python_path_str))); + msgbox.setStandardButtons(QMessageBox::Ok); Added: head/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_mainwindow.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_mainwindow.cpp Sun Mar 14 09:02:35 2021 (r568372) @@ -0,0 +1,29 @@ +--- src/appleseed.studio/mainwindow/mainwindow.cpp.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.studio/mainwindow/mainwindow.cpp +@@ -27,6 +27,9 @@ + // THE SOFTWARE. + // + ++// XXX: must be included before Qt headers because of `slot' redefine ++#include "mainwindow/pythonconsole/pythonconsolewidget.h" ++ + // Interface header. + #include "mainwindow.h" + +@@ -39,7 +42,6 @@ + #include "mainwindow/minimizebutton.h" + #include "mainwindow/project/attributeeditor.h" + #include "mainwindow/project/projectexplorer.h" +-#include "mainwindow/pythonconsole/pythonconsolewidget.h" + #include "mainwindow/rendering/lightpathstab.h" + #include "mainwindow/rendering/materialdrophandler.h" + #include "mainwindow/rendering/renderwidget.h" +@@ -684,7 +686,7 @@ void MainWindow::build_log_panel() + + void MainWindow::build_python_console_panel() + { +- char* python_home = Py_GetPythonHome(); ++ char* python_home = Py_EncodeLocale(Py_GetPythonHome(), nullptr); + if (python_home == nullptr) + RENDERER_LOG_INFO("Python home not set."); + else RENDERER_LOG_INFO("Python home set to %s.", python_home); Added: head/graphics/appleseed/files/patch-src_appleseed.studio_python_module.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.studio_python_module.cpp Sun Mar 14 09:02:35 2021 (r568372) @@ -0,0 +1,16 @@ +--- src/appleseed.studio/python/module.cpp.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.studio/python/module.cpp +@@ -26,10 +26,12 @@ + // THE SOFTWARE. + // + ++// XXX: must be included before Qt headers because of `slot' redefine ++#include "python/pythoninterpreter.h" ++ + // appleseed.studio headers. + #include "mainwindow/mainwindow.h" + #include "mainwindow/minimizebutton.h" +-#include "python/pythoninterpreter.h" + + // appleseed.foundation headers. + #include "foundation/core/exceptions/exception.h" Added: head/graphics/appleseed/files/patch-src_appleseed.studio_python_pythoninterpreter.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.studio_python_pythoninterpreter.cpp Sun Mar 14 09:02:35 2021 (r568372) @@ -0,0 +1,22 @@ +--- src/appleseed.studio/python/pythoninterpreter.cpp.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.studio/python/pythoninterpreter.cpp +@@ -62,7 +62,7 @@ BOOST_PYTHON_MODULE(_appleseedpythonbuiltin) + } + + // Generated by BOOST_PYTHON_MODULE() declarations in module.cpp files. +-extern "C" void init_appleseedstudio(); ++extern "C" PyObject* PyInit__appleseedstudio(); + + namespace appleseed { + namespace studio { +@@ -177,8 +177,8 @@ void PythonInterpreter::initialize(OutputRedirector re + // from e.g. renderer::Project to appleseedpython.Project. + // + +- PyImport_AppendInittab("_appleseedpythonbuiltin", init_appleseedpythonbuiltin); +- PyImport_AppendInittab("_appleseedstudio", init_appleseedstudio); ++ PyImport_AppendInittab("_appleseedpythonbuiltin", PyInit__appleseedpythonbuiltin); ++ PyImport_AppendInittab("_appleseedstudio", PyInit__appleseedstudio); + Py_Initialize(); + + bpy::object main_module = bpy::import("__main__"); Modified: head/graphics/appleseed/pkg-plist ============================================================================== --- head/graphics/appleseed/pkg-plist Sun Mar 14 08:58:36 2021 (r568371) +++ head/graphics/appleseed/pkg-plist Sun Mar 14 09:02:35 2021 (r568372) @@ -9,14 +9,19 @@ share/cmake/Modules/FindXerces.cmake %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/_appleseedpython3.so %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/logtarget.py +%%STUDIO%%%%PYTHON_SITELIBDIR%%/appleseed/studio/__init__.py +%%STUDIO%%%%PYTHON_SITELIBDIR%%/appleseed/studio/plugins.py +%%STUDIO%%%%PYTHON_SITELIBDIR%%/appleseed/studio/ui.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/runtests.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testbasis.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testdict2dict.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testentitymap.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/appleseed/test/testentityvector.py +%%STUDIO%%%%PYTHON_SITELIBDIR%%/Qt.py @cwd %%APPHOME%% bin/animatecamera bin/appleseed.cli +%%STUDIO%%bin/appleseed.studio bin/cleanmany.py bin/convertmany.py bin/convertmeshfile @@ -114,6 +119,25 @@ icons/rendertab_toggle_pixel_inspector.png icons/rendertab_toggle_pixel_inspector_hover.png lib/libappleseed.shared.so lib/libappleseed.so +%%STUDIO%%ocio/config.ocio +%%STUDIO%%ocio/luts/alexalogc.spi1d +%%STUDIO%%ocio/luts/cineon.spi1d +%%STUDIO%%ocio/luts/panalog.spi1d +%%STUDIO%%ocio/luts/ploglin.spi1d +%%STUDIO%%ocio/luts/rec709.spi1d +%%STUDIO%%ocio/luts/redlog.spi1d +%%STUDIO%%ocio/luts/slog.spi1d +%%STUDIO%%ocio/luts/srgb.spi1d +%%STUDIO%%ocio/luts/srgbf.spi1d +%%STUDIO%%ocio/luts/viperlog.spi1d +%%STUDIO%%seexpr/clouds/blue_clouds.se +%%STUDIO%%seexpr/geometric/checkers.se +%%STUDIO%%seexpr/geometric/dots.se +%%STUDIO%%seexpr/gradients/horizontal.se +%%STUDIO%%seexpr/gradients/vertical.se +%%STUDIO%%seexpr/noise/fbm.se +%%STUDIO%%seexpr/noise/noise.se +%%STUDIO%%seexpr/noise/turbulence.se schemas/project.xsd schemas/settings.xsd settings/appleseed.cli.xml @@ -283,4 +307,5 @@ share/mitsuba2appleseed.py share/rfmdisneypresets2appleseed.py share/substancepainter_presets/appleseed UDIM.spexp share/substancepainter_presets/appleseed.spexp +%%STUDIO%%@dir studio/plugins stylesheets/default.qss
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103140902.12E92aUD039497>