From owner-svn-ports-head@freebsd.org Sun Mar 14 09:02:38 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 115AC578562; Sun, 14 Mar 2021 09:02:38 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DytqL01nxz3FHh; Sun, 14 Mar 2021 09:02:38 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7E291AAEC; Sun, 14 Mar 2021 09:02:37 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 12E92bBp039507; Sun, 14 Mar 2021 09:02:37 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 12E92aUD039497; Sun, 14 Mar 2021 09:02:36 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202103140902.12E92aUD039497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Sun, 14 Mar 2021 09:02:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568372 - in head/graphics/appleseed: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/graphics/appleseed: . files X-SVN-Commit-Revision: 568372 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2021 09:02:38 -0000 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 + +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} +- $ ++ $ + ${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