summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Cho2021-05-03 21:18:23 +0900
committerXavier Cho2021-05-03 21:24:09 +0900
commit64701cc72a265f909dfe5ca0425ecd46b5cee3ad (patch)
treeb1382d1d027be810b38ac6e3f58f4c2e93dc524e
parentd7917a4b03553380ee55aeb52d83c3cc797aeb3d (diff)
downloadaur-64701cc72a265f909dfe5ca0425ecd46b5cee3ad.tar.gz
Update PKGBUILD based on blender-develop-git package
Fix the problem with openexr 3. (Thanks again bartus!)
-rw-r--r--.SRCINFO46
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD230
-rw-r--r--embree.patch45
-rw-r--r--openexr3.patch42
-rw-r--r--usd_python.patch26
6 files changed, 251 insertions, 140 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c907052c09..ff849d5595c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = upbge-git
pkgdesc = Uchronia Project Blender Game Engine fork of Blender Game Engine
- pkgver = 108238.a287d2f9b7e
+ pkgver = 110046.86bb8657741
pkgrel = 1
url = https://upbge.org/
install = upbge.install
@@ -12,33 +12,29 @@ pkgbase = upbge-git
makedepends = boost
makedepends = mesa
makedepends = llvm
- depends = embree
depends = alembic
+ depends = embree
depends = libgl
depends = python
- depends = desktop-file-utils
- depends = hicolor-icon-theme
- depends = openjpeg
+ depends = python-numpy
+ depends = openjpeg2
+ depends = libharu
+ depends = potrace
+ depends = openxr
depends = ffmpeg
depends = fftw
depends = openal
depends = freetype2
depends = libxi
- depends = openimageio-git
depends = openimageio-qfix
- depends = opencolorio-git
depends = opencolorio-qfix
- depends = potrace
- depends = openshadinglanguage-qfix
depends = openvdb
depends = opencollada
depends = opensubdiv
+ depends = openshadinglanguage-qfix
depends = libtiff
depends = libpng
- depends = python-numpy
- optdepends = cuda: CUDA support in Cycles
- optdepends = optix: OptiX support in Cycles
- optdepends = openimagedenoise: Intel Open Image Denoise support in compositing
+ depends = openimagedenoise
provides = blender
conflicts = blender
source = git://github.com/UPBGE/upbge.git
@@ -46,17 +42,21 @@ pkgbase = upbge-git
source = blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git
source = blender-translations.git::git://git.blender.org/blender-translations.git
source = blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git
- source = embree.patch
- source = SelectCudaComputeArch.patch
source = upbge.desktop
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = 1cd3132ec4e15df823d336529f5d1d6f
- md5sums = 4441d9a6db38b85b7dc5c3c9e6872951
- md5sums = 37ce92c740691f858156511e22b40143
+ source = SelectCudaComputeArch.patch
+ source = usd_python.patch
+ source = embree.patch
+ source = openexr3.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = b5c9bf4fa265389db4b3f23e96d74cc86c51d908b8943eb80967614d8af1ea1a
+ sha256sums = 66b9bf3db441f35119ef0eb5f855142f2e773e8002ac0216e056bcc6f8ac409c
+ sha256sums = 333b6fd864d55da2077bc85c55af1a27d4aee9764a1a839df26873a9f19b8703
+ sha256sums = 6249892f99ffd960e36f43fb893c14e2f8e4dd1d901b9581d25882e865f2603f
+ sha256sums = 5297dc61cc4edcc1d5bad3474ab882264b69d68036cebbd0f2600d9fe21d5a1b
pkgname = upbge-git
diff --git a/.gitignore b/.gitignore
index 0978be0225d..b953b21e269 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,5 +5,7 @@
!upbge.desktop
!embree.patch
!SelectCudaComputeArch.patch
+!usd_python.patch
+!openexr3.patch
!.SRCINFO
!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index 8c58a980f9d..eec63c70203 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,81 +1,72 @@
+#!/bin/hint/bash
# Maintainer: Xavier Cho <mysticfallband@gmail.com>
+# Adapted from blender-develop-git package by bartus.
+
+# Configuration.
+# shellcheck disable=SC2206
+[[ -v CUDA_ARCH ]] && _cuda_capability=(${CUDA_ARCH})
+
+# opencolorio=2 fix (add LD_LIBRAY_PATH or rpath to blender-2.93)
+_CMAKE_FLAGS+=( -DOSL_ROOT_DIR=/opt/osl
+ -DOPENIMAGEIO_ROOT_DIR=/opt/oiio
+ -DOPENCOLORIO_ROOT_DIR=/opt/ocio
+)
+
+#some extra, unofficially supported stuff goes here:
+((TRAVIS)) && _cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75)
+((DISABLE_USD)) && {
+ _CMAKE_FLAGS+=( -DWITH_USD=OFF )
+} || {
+ _CMAKE_FLAGS+=( -DWITH_USD=ON
+ -DUSD_ROOT=/usr )
+ depends+=( "usd=21.02" )
+}
+((DISABLE_NINJA)) || makedepends+=("ninja")
+#shellcheck disable=SC2015
+((DISABLE_CUDA)) && optdepends+=("cuda: CUDA support in Cycles") || { makedepends+=("cuda") ; ((DISABLE_OPTIX)) || makedepends+=("optix>=7.0"); }
pkgname=upbge-git
-pkgver=108238.a287d2f9b7e
+pkgver=110046.86bb8657741
pkgrel=1
pkgdesc="Uchronia Project Blender Game Engine fork of Blender Game Engine"
-arch=('i686' 'x86_64')
+arch=("i686" "x86_64")
url="https://upbge.org/"
-depends=('embree' 'alembic' 'libgl' 'python' 'desktop-file-utils' 'hicolor-icon-theme' 'openjpeg'
- 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio-git' 'openimageio-qfix'
- 'opencolorio-git' 'opencolorio-qfix' 'potrace' 'openshadinglanguage-qfix'
- 'openvdb' 'opencollada' 'opensubdiv' 'libtiff' 'libpng' 'python-numpy')
-optdepends=('cuda: CUDA support in Cycles'
- 'optix: OptiX support in Cycles'
- 'openimagedenoise: Intel Open Image Denoise support in compositing')
-makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm')
-provides=('blender')
-conflicts=('blender')
-license=('GPL')
+depends=("alembic" "embree" "libgl" "python" "python-numpy" "openjpeg2" "libharu" "potrace" "openxr"
+ "ffmpeg" "fftw" "openal" "freetype2" "libxi" "openimageio-qfix" "opencolorio-qfix"
+ "openvdb" "opencollada" "opensubdiv" "openshadinglanguage-qfix" "libtiff" "libpng" "openimagedenoise")
+makedepends=("git" "cmake" "boost" "mesa" "llvm")
+provides=("blender")
+conflicts=("blender")
+license=("GPL")
install=upbge.install
+
# NOTE: the source array has to be kept in sync with .gitmodules
# the submodules has to be stored in path ending with git to match
# the path in .gitmodules.
# More info:
# http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
-source=('git://github.com/UPBGE/upbge.git' \
- 'blender-addons.git::git://github.com/UPBGE/blender-addons.git' \
- 'blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git' \
- 'blender-translations.git::git://git.blender.org/blender-translations.git' \
- 'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git' \
- embree.patch \
- SelectCudaComputeArch.patch \
- upbge.desktop)
-md5sums=(
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- '1cd3132ec4e15df823d336529f5d1d6f'
- '4441d9a6db38b85b7dc5c3c9e6872951'
- '37ce92c740691f858156511e22b40143')
-
-# determine whether we can precompile CUDA kernels
-_CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
-if [ "$_CUDA_PKG" != "" ]; then
- _EXTRAOPTS="$_EXTRAOPTS \
- -DWITH_CYCLES_CUDA_BINARIES=ON \
- -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda"
-
- [ -f "/usr/lib/ccache/bin/nvcc-ccache" ] && export CUDA_NVCC_EXECUTABLE=/usr/lib/ccache/bin/nvcc-ccache
-
- if _cuda_gcc=$(basename "$(readlink /opt/cuda/bin/gcc)") ; then
- [ -L "/usr/lib/ccache/bin/$_cuda_gcc" ] && export CUDAHOSTCXX=/usr/lib/ccache/bin/"$_cuda_gcc"
- fi
-fi
-
-# check for optix
-_OPTIX_PKG=`pacman -Qq optix 2>/dev/null` || true
-if [ "$_OPTIX_PKG" != "" ]; then
- _EXTRAOPTS="$_EXTRAOPTS \
- -DWITH_CYCLES_DEVICE_OPTIX=ON \
- -DOPTIX_ROOT_DIR=/opt/optix"
-fi
-
-# check for open image denoise
-_OIDN_PKG=`pacman -Qq openimagedenoise 2>/dev/null` || true
-if [ "$_OIDN_PKG" != "" ]; then
- _EXTRAOPTS="$_EXTRAOPTS \
- -DWITH_OPENIMAGEDENOISE=ON"
-fi
-
-# check for embree
-_EMBREE_PKG=`pacman -Qq embree 2>/dev/null` || true
-if [ "$_EMBREE_PKG" != "" ]; then
- _EXTRAOPTS="$_EXTRAOPTS \
- -DWITH_CYCLES_EMBREE=ON"
-fi
+source=(
+ "git://github.com/UPBGE/upbge.git"
+ "blender-addons.git::git://github.com/UPBGE/blender-addons.git"
+ "blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git"
+ "blender-translations.git::git://git.blender.org/blender-translations.git"
+ "blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git"
+ upbge.desktop
+ SelectCudaComputeArch.patch
+ usd_python.patch
+ embree.patch
+ openexr3.patch)
+sha256sums=(
+ "SKIP"
+ "SKIP"
+ "SKIP"
+ "SKIP"
+ "SKIP"
+ "b5c9bf4fa265389db4b3f23e96d74cc86c51d908b8943eb80967614d8af1ea1a"
+ "66b9bf3db441f35119ef0eb5f855142f2e773e8002ac0216e056bcc6f8ac409c"
+ "333b6fd864d55da2077bc85c55af1a27d4aee9764a1a839df26873a9f19b8703"
+ "6249892f99ffd960e36f43fb893c14e2f8e4dd1d901b9581d25882e865f2603f"
+ "5297dc61cc4edcc1d5bad3474ab882264b69d68036cebbd0f2600d9fe21d5a1b")
pkgver() {
cd "$srcdir/upbge"
@@ -83,62 +74,73 @@ pkgver() {
}
prepare() {
- cd "$srcdir/upbge"
-
- #update the submodules
- git submodule sync
- git submodule update --init --recursive --remote --depth=1
- git submodule foreach git checkout master
- git submodule foreach git pull --rebase --depth=1
-
- if [ ! -v _cuda_capability ] && grep -q nvidia <(lsmod); then
- git -C "$srcdir/upbge" apply -v "${srcdir}"/SelectCudaComputeArch.patch
- fi
-
- if [ "$_EMBREE_PKG" != "" ]; then
- git apply -v "${srcdir}"/embree.patch
- fi
+ # update the submodules
+ git -C "$srcdir/upbge" submodule update --init --recursive --remote
+ if [ ! -v _cuda_capability ] && grep -q nvidia <(lsmod); then
+ git -C "$srcdir/upbge" apply -v "${srcdir}"/SelectCudaComputeArch.patch
+ fi
+ ((DISABLE_USD)) || git -C "$srcdir/upbge" apply -v "${srcdir}"/usd_python.patch
+ git -C "$srcdir/upbge" apply -v "${srcdir}"/{embree,openexr3}.patch
}
build() {
- mkdir -p "$srcdir/blender-build"
- _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
- echo "python version detected: ${_pyver}"
-
- cd "$srcdir/blender-build"
-
- cmake "$srcdir/upbge" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DWITH_INSTALL_PORTABLE=OFF \
- -DWITH_GAMEENGINE=ON \
- -DWITH_PLAYER=ON \
- -DWITH_OPENCOLORIO=ON \
- -DWITH_FFTW3=ON \
- -DWITH_SYSTEM_GLEW=ON \
- -DWITH_CODEC_FFMPEG=ON \
- -DWITH_PYTHON_INSTALL=OFF \
- -DPYTHON_VERSION="${_pyver}" \
- -DWITH_MOD_OCEANSIM=ON \
- $_EXTRAOPTS
- make
+ _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
+ msg "Python version detected: ${_pyver}"
+
+ # determine whether we can precompile CUDA kernels
+ _CUDA_PKG=$(pacman -Qq cuda 2>/dev/null) || true
+ if [ "$_CUDA_PKG" != "" ] && ! ((DISABLE_CUDA)) ; then
+ _CMAKE_FLAGS+=( -DWITH_CYCLES_CUDA_BINARIES=ON
+ -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda )
+ ((DISABLE_OPTIX)) || _CMAKE_FLAGS+=( -DOPTIX_ROOT_DIR=/opt/optix )
+ if [[ -v _cuda_capability ]]; then
+ _CMAKE_FLAGS+=( -DCYCLES_CUDA_BINARIES_ARCH="$(IFS=';'; echo "${_cuda_capability[*]}";)" )
+ fi
+ [ -f "/usr/lib/ccache/bin/nvcc-ccache" ] && export CUDA_NVCC_EXECUTABLE=/usr/lib/ccache/bin/nvcc-ccache
+ if _cuda_gcc=$(basename "$(readlink /opt/cuda/bin/gcc)") ; then
+ [ -L "/usr/lib/ccache/bin/$_cuda_gcc" ] && export CUDAHOSTCXX=/usr/lib/ccache/bin/"$_cuda_gcc"
+ fi
+ fi
+
+ ((DISABLE_NINJA)) && generator="Unix Makefiles" || generator="Ninja"
+ cmake -G "$generator" -S "$srcdir/upbge" -B "$srcdir/build" \
+ -C "$srcdir/upbge/build_files/cmake/config/blender_release.cmake" \
+ -DWITH_GAMEENGINE=ON \
+ -DWITH_PLAYER=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_INSTALL_PORTABLE=OFF \
+ -DWITH_SYSTEM_GLEW=ON \
+ -DWITH_PYTHON_INSTALL=OFF \
+ -DWITH_FFTW3=ON \
+ -DWITH_CODEC_FFMPEG=ON \
+ -DWITH_MOD_OCEANSIM=ON \
+ -DXR_OPENXR_SDK_ROOT_DIR=/usr \
+ -DPYTHON_VERSION="${_pyver}" \
+ "${_CMAKE_FLAGS[@]}"
+ export NINJA_STATUS="[%p | %f<%r<%u | %cbps ] "
+# shellcheck disable=SC2086 # allow MAKEFLAGS to split when multiple flags provided.
+ if ((DISABLE_NINJA)); then make -C "$srcdir/build" ; else ninja -C "$srcdir/build" ${MAKEFLAGS:--j1}; fi
}
package() {
- cd "$srcdir/blender-build"
+ export DESTDIR="$pkgdir"
+
+ if ((DISABLE_NINJA)); then make -C "$srcdir/build" install; else ninja -C "$srcdir/build" install; fi
- make DESTDIR="$pkgdir" install
+ #undo rpath clean in cmake_install ( faster than patching CMakeLists.txt)
+ cp "$srcdir/build/bin/blender" "$pkgdir/usr/bin/blender"
- mv "$pkgdir/usr/share/blender" "$pkgdir/usr/share/upbge"
+ mv "$pkgdir/usr/share/blender" "$pkgdir/usr/share/upbge"
- install -D -m755 "$srcdir"/blender-build/bin/blenderplayer \
- "$pkgdir"/usr/bin/blenderplayer
- install -D -m644 "$srcdir"/upbge.desktop \
- "$pkgdir"/usr/share/applications/upbge.desktop
- install -D -m644 "$srcdir"/upbge/release/freedesktop/icons/scalable/apps/upbge.svg \
- "$pkgdir"/usr/share/icons/hicolor/scalable/apps/upbge.svg
+ install -D -m755 "$srcdir"/build/bin/blenderplayer "$pkgdir"/usr/bin/blenderplayer
+ install -D -m644 "$srcdir"/upbge.desktop "$pkgdir"/usr/share/applications/upbge.desktop
+ install -D -m644 "$srcdir"/upbge/release/freedesktop/icons/scalable/apps/upbge.svg \
+ "$pkgdir"/usr/share/icons/hicolor/scalable/apps/upbge.svg
- if [ -e "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/ ] ; then
- # make sure the cuda kernels are not stripped
- chmod 444 "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/*
- fi
+ if [ -e "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/ ] ; then
+ # make sure the cuda kernels are not stripped
+ chmod 444 "$pkgdir"/usr/share/upbge/*/scripts/addons/cycles/lib/*
+ fi
}
+# vim:set sw=2 ts=2 et:
diff --git a/embree.patch b/embree.patch
index 76ffe4f9b32..e638b434d75 100644
--- a/embree.patch
+++ b/embree.patch
@@ -1,8 +1,48 @@
+diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake
+index 90cf23d3e13..f625efaa542 100644
+--- a/build_files/cmake/Modules/FindEmbree.cmake
++++ b/build_files/cmake/Modules/FindEmbree.cmake
+@@ -7,6 +7,9 @@
+ # EMBREE_ROOT_DIR, The base directory to search for Embree.
+ # This can also be an environment variable.
+ # EMBREEFOUND, If false, do not try to use Embree.
++#
++# also defined, but not for general use are
++# EMBREE_LIBRARY, where to find the Embree library.
+
+ #=============================================================================
+ # Copyright 2018 Blender Foundation.
+@@ -67,14 +70,23 @@ FOREACH(COMPONENT ${_embree_FIND_COMPONENTS})
+ ENDFOREACH()
+
+
++FIND_LIBRARY(EMBREE_LIBRARY
++ NAMES
++ embree3
++ HINTS
++ ${_embree_SEARCH_DIRS}
++ PATH_SUFFIXES
++ lib64 lib
++)
++
+ # handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if
+ # all listed variables are TRUE
+ INCLUDE(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Embree DEFAULT_MSG
+- _embree_LIBRARIES EMBREE_INCLUDE_DIR)
++ EMBREE_LIBRARY EMBREE_INCLUDE_DIR)
+
+ IF(EMBREE_FOUND)
+- SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
++ SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
+ SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
+ ENDIF()
+
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
-index d9a2ebf8571..f3b7d156024 100644
+index 2316800e21e..591841152e2 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
-@@ -66,6 +66,12 @@ if(WITH_CYCLES_LOGGING)
+@@ -67,6 +67,12 @@ if(WITH_CYCLES_LOGGING)
)
endif()
@@ -15,4 +55,3 @@ index d9a2ebf8571..f3b7d156024 100644
set(ADDON_FILES
addon/__init__.py
addon/engine.py
-
diff --git a/openexr3.patch b/openexr3.patch
new file mode 100644
index 00000000000..73a727a3dbc
--- /dev/null
+++ b/openexr3.patch
@@ -0,0 +1,42 @@
+diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
+index 090f80b8df7..a2f7b4c622b 100644
+--- a/build_files/cmake/Modules/FindOpenEXR.cmake
++++ b/build_files/cmake/Modules/FindOpenEXR.cmake
+@@ -34,11 +34,10 @@ ENDIF()
+ SET(_openexr_libs_ver_init "2.0")
+
+ SET(_openexr_FIND_COMPONENTS
+- Half
+ Iex
+- IlmImf
+- IlmThread
+ Imath
++ OpenEXR
++ IlmThread
+ )
+
+ SET(_openexr_SEARCH_DIRS
+@@ -120,7 +119,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
+ IF(OPENEXR_FOUND)
+ SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
+ # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
+- SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
++ SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR ${OPENEXR_INCLUDE_DIR}/Imath)
+ ENDIF()
+
+ MARK_AS_ADVANCED(
+diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
+index 382d86f2645..eff50b19c31 100644
+--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
++++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
+@@ -38,8 +38,10 @@
+ #include <ImfChannelList.h>
+ #include <ImfCompression.h>
+ #include <ImfCompressionAttribute.h>
++#include <ImfFrameBuffer.h>
+ #include <ImfIO.h>
+ #include <ImfInputFile.h>
++#include <ImfInt64.h>
+ #include <ImfOutputFile.h>
+ #include <ImfPixelType.h>
+ #include <ImfStandardAttributes.h>
diff --git a/usd_python.patch b/usd_python.patch
new file mode 100644
index 00000000000..8cf7e8fcbbd
--- /dev/null
+++ b/usd_python.patch
@@ -0,0 +1,26 @@
+diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
+index ac570f17e47..505aa97934c 100644
+--- a/build_files/cmake/platform/platform_unix.cmake
++++ b/build_files/cmake/platform/platform_unix.cmake
+@@ -320,6 +320,9 @@ if(WITH_BOOST)
+ if(WITH_OPENVDB)
+ list(APPEND __boost_packages iostreams)
+ endif()
++ if(WITH_USD)
++ list(APPEND __boost_packages python)
++ endif()
+ list(APPEND __boost_packages system)
+ find_package(Boost 1.48 COMPONENTS ${__boost_packages})
+ if(NOT Boost_FOUND)
+diff --git a/source/blender/usd/CMakeLists.txt b/source/blender/usd/CMakeLists.txt
+index 6ea02f44d76..0ec18e17689 100644
+--- a/source/blender/io/usd/CMakeLists.txt
++++ b/source/blender/io/usd/CMakeLists.txt
+@@ -48,6 +48,7 @@ set(INC
+ set(INC_SYS
+ ${USD_INCLUDE_DIRS}
+ ${BOOST_INCLUDE_DIR}
++ ${PYTHON_INCLUDE_DIRS}
+ ${TBB_INCLUDE_DIR}
+ )
+