Date: Tue, 9 Mar 2021 18:58:05 +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: r567952 - in head/graphics/appleseed: . files Message-ID: <202103091858.129Iw5g3094622@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Tue Mar 9 18:58:05 2021 New Revision: 567952 URL: https://svnweb.freebsd.org/changeset/ports/567952 Log: - Fix Python 3.x bindings build and enable them by default - Add one missing LIB_DEPENDS per the stage Q/A report - Make symlinks to external programs instead of copying - Prevent overlinking to libGLU when it is being found Added: head/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake (contents, props changed) head/graphics/appleseed/files/patch-cmake_utilities.txt (contents, props changed) head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt (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 Tue Mar 9 18:47:18 2021 (r567951) +++ head/graphics/appleseed/Makefile Tue Mar 9 18:58:05 2021 (r567952) @@ -3,6 +3,7 @@ PORTNAME= appleseed DISTVERSION= 2.1.0-beta +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= danfe@FreeBSD.org @@ -15,6 +16,7 @@ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ liblz4.so:archivers/liblz4 \ libpng.so:graphics/png \ libIlmImf.so:graphics/openexr \ + libIlmThread.so:graphics/ilmbase \ libOpenImageIO.so:graphics/openimageio \ libxerces-c.so:textproc/xerces-c3 \ liboslexec.so:graphics/openshadinglanguage @@ -25,11 +27,11 @@ GH_ACCOUNT= ${PORTNAME}hq ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= not ported to it yet -USES= cmake compiler:c++11-lang +USES= cmake compiler:c++11-lang shebangfix +SHEBANG_FILES= scripts/*.py CMAKE_ARGS= -DWITH_STUDIO:BOOL=OFF \ -DWITH_PYTHON2_BINDINGS:BOOL=OFF \ - -DWITH_PYTHON3_BINDINGS:BOOL=OFF \ -DWITH_DOXYGEN:BOOL=OFF \ -DINSTALL_HEADERS:BOOL=OFF \ -DINSTALL_TESTS:BOOL=OFF \ @@ -46,6 +48,14 @@ PLIST_SUB= APPHOME=${CMAKE_INSTALL_PREFIX} SUB_FILES= pkg-message SUB_LIST:= ${PLIST_SUB} + +OPTIONS_DEFINE= PYTHON +OPTIONS_DEFAULT= PYTHON +OPTIONS_SUB= yes + +PYTHON_USES= gl python:3.5+,build,run +PYTHON_USE= GL=gl +PYTHON_CMAKE_ON= -DWITH_PYTHON3_BINDINGS:BOOL=ON post-patch: @${RMDIR} ${WRKSRC}/sandbox/docs/api Modified: head/graphics/appleseed/files/patch-CMakeLists.txt ============================================================================== --- head/graphics/appleseed/files/patch-CMakeLists.txt Tue Mar 9 18:47:18 2021 (r567951) +++ head/graphics/appleseed/files/patch-CMakeLists.txt Tue Mar 9 18:58:05 2021 (r567952) @@ -1,6 +1,6 @@ --- CMakeLists.txt.orig 2019-08-31 15:49:01 UTC +++ CMakeLists.txt -@@ -732,9 +732,16 @@ install ( +@@ -732,15 +732,27 @@ install ( sandbox/share sandbox/stylesheets DESTINATION . @@ -8,16 +8,28 @@ ) install ( +- FILES + DIRECTORY + sandbox/share/cmake + DESTINATION ../share +) + +install ( - FILES ++ PROGRAMS scripts/cleanmany.py scripts/convertmany.py -@@ -754,11 +761,6 @@ install ( + scripts/rendermanager.py + scripts/rendermany.py + scripts/rendernode.py ++ DESTINATION bin ++) ++ ++install_relative_symlink ( ++ ${CMAKE_INSTALL_PREFIX} + ${OSL_COMPILER} + ${OSL_QUERY_INFO} + ${OSL_MAKETX} +@@ -754,11 +766,6 @@ install ( sandbox/schemas/settings.xsd sandbox/schemas/project.xsd DESTINATION schemas Added: head/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake Tue Mar 9 18:58:05 2021 (r567952) @@ -0,0 +1,27 @@ +--- cmake/modules/FindPython3.cmake.orig 2019-08-31 15:49:01 UTC ++++ cmake/modules/FindPython3.cmake +@@ -39,19 +39,13 @@ + + include (FindPackageHandleStandardArgs) + +-find_path (PYTHON3_INCLUDE_DIR NAMES Python.h) +-find_library (PYTHON3_LIBRARY NAMES python3) ++find_package(PythonInterp) # provides Python major/minor version vars ++find_package(PythonLibs) + +-# Handle the QUIETLY and REQUIRED arguments and set PYTHON3_FOUND. +-find_package_handle_standard_args (PYTHON3 DEFAULT_MSG +- PYTHON3_INCLUDE_DIR +- PYTHON3_LIBRARY +-) +- + # Set the output variables. +-if (PYTHON3_FOUND) +- set (PYTHON3_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIR}) +- set (PYTHON3_LIBRARIES ${PYTHON3_LIBRARY}) ++if (PYTHONLIBS_FOUND) ++ set (PYTHON3_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR}) ++ set (PYTHON3_LIBRARIES ${PYTHON_LIBRARIES}) + else () + set (PYTHON3_INCLUDE_DIRS) + set (PYTHON3_LIBRARIES) Added: head/graphics/appleseed/files/patch-cmake_utilities.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-cmake_utilities.txt Tue Mar 9 18:58:05 2021 (r567952) @@ -0,0 +1,19 @@ +--- cmake/utilities.txt.orig 2019-08-31 15:49:01 UTC ++++ cmake/utilities.txt +@@ -150,3 +150,16 @@ function (detect_target_arch output_var) + + set (${output_var} "${ARCH}" PARENT_SCOPE) + endfunction () ++ ++function (install_relative_symlink) ++ math (EXPR ac-1 "${ARGC} - 1") ++ math (EXPR ac-3 "${ARGC} - 3") ++ foreach (prog RANGE 1 ${ac-3}) ++ file (RELATIVE_PATH link ${ARGV0}/${ARGV${ac-1}} ${ARGV${prog}}) ++ get_filename_component (basename ${ARGV${prog}} NAME) ++ install (CODE "file (CREATE_LINK ++ ${link} \$ENV{DESTDIR}${ARGV0}/${ARGV${ac-1}}/${basename} ++ SYMBOLIC)" ++ ) ++ endforeach () ++endfunction () Added: head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt Tue Mar 9 18:58:05 2021 (r567952) @@ -0,0 +1,20 @@ +--- src/appleseed.python/CMakeLists.txt.orig 2019-08-31 15:49:01 UTC ++++ src/appleseed.python/CMakeLists.txt +@@ -182,7 +182,7 @@ if (WITH_PYTHON3_BINDINGS) + endif () + + target_link_libraries (appleseed.python3 +- ${OPENGL_LIBRARY} ++ ${OPENGL_gl_LIBRARY} + ) + endif () + +@@ -288,7 +288,7 @@ endif () + # Installation. + #-------------------------------------------------------------------------------------------------- + +-set (py_module_dst "lib/python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}/appleseed") ++set (py_module_dst "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/appleseed") + + install (FILES __init__.py DESTINATION ${py_module_dst}) + install (FILES logtarget.py DESTINATION ${py_module_dst}) Modified: head/graphics/appleseed/pkg-plist ============================================================================== --- head/graphics/appleseed/pkg-plist Tue Mar 9 18:47:18 2021 (r567951) +++ head/graphics/appleseed/pkg-plist Tue Mar 9 18:58:05 2021 (r567952) @@ -106,6 +106,14 @@ icons/rendertab_toggle_pixel_inspector.png icons/rendertab_toggle_pixel_inspector_hover.png lib/libappleseed.shared.so lib/libappleseed.so +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/__init__.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/_appleseedpython3.so +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/logtarget.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/runtests.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testbasis.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testdict2dict.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testentitymap.py +%%PYTHON%%lib/python%%PYTHON_VER%%/appleseed/test/testentityvector.py schemas/project.xsd schemas/settings.xsd settings/appleseed.cli.xml
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103091858.129Iw5g3094622>