aboutsummaryrefslogtreecommitdiff
path: root/graphics/appleseed/files
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-03-09 18:58:05 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-03-09 18:58:05 +0000
commite9593a21e277399273232636f3839578b58e8c38 (patch)
treefeaeeae27b37224fb468ca25cf7f443ecebbdc67 /graphics/appleseed/files
parentbeca4dc88dd2844145d5c5925104998ec04c33d2 (diff)
downloadports-e9593a21e277399273232636f3839578b58e8c38.tar.gz
ports-e9593a21e277399273232636f3839578b58e8c38.zip
- 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
Notes
Notes: svn path=/head/; revision=567952
Diffstat (limited to 'graphics/appleseed/files')
-rw-r--r--graphics/appleseed/files/patch-CMakeLists.txt18
-rw-r--r--graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake27
-rw-r--r--graphics/appleseed/files/patch-cmake_utilities.txt19
-rw-r--r--graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt20
4 files changed, 81 insertions, 3 deletions
diff --git a/graphics/appleseed/files/patch-CMakeLists.txt b/graphics/appleseed/files/patch-CMakeLists.txt
index e400f28c1464..8146925d30c8 100644
--- a/graphics/appleseed/files/patch-CMakeLists.txt
+++ b/graphics/appleseed/files/patch-CMakeLists.txt
@@ -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
diff --git a/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake b/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake
new file mode 100644
index 000000000000..bcaa2f44c44c
--- /dev/null
+++ b/graphics/appleseed/files/patch-cmake_modules_FindPython3.cmake
@@ -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)
diff --git a/graphics/appleseed/files/patch-cmake_utilities.txt b/graphics/appleseed/files/patch-cmake_utilities.txt
new file mode 100644
index 000000000000..c98ac2f2d2b0
--- /dev/null
+++ b/graphics/appleseed/files/patch-cmake_utilities.txt
@@ -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 ()
diff --git a/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt b/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt
new file mode 100644
index 000000000000..e9ed81ac8587
--- /dev/null
+++ b/graphics/appleseed/files/patch-src_appleseed.python_CMakeLists.txt
@@ -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})