public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, profiles/base/
Date: Fri,  3 Dec 2021 22:51:03 +0000 (UTC)	[thread overview]
Message-ID: <1638571232.a4acd154d75e1e0f16f641bf3d882039d5370914.sam@gentoo> (raw)

commit:     a4acd154d75e1e0f16f641bf3d882039d5370914
Author:     Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Fri Dec  3 14:05:35 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  3 22:40:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4acd154

media-gfx/blender: Fix building docs

Closes: https://bugs.gentoo.org/822465
Closes: https://bugs.gentoo.org/734104

Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23161
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-2.93.6.ebuild | 59 ++++++++++++++++-----------------
 media-gfx/blender/blender-3.0.0.ebuild  | 59 ++++++++++++++++-----------------
 media-gfx/blender/blender-9999.ebuild   | 59 ++++++++++++++++-----------------
 profiles/base/package.use.mask          |  5 ---
 4 files changed, 87 insertions(+), 95 deletions(-)

diff --git a/media-gfx/blender/blender-2.93.6.ebuild b/media-gfx/blender/blender-2.93.6.ebuild
index 84199a7c6e54..6d17263b5759 100644
--- a/media-gfx/blender/blender-2.93.6.ebuild
+++ b/media-gfx/blender/blender-2.93.6.ebuild
@@ -266,29 +266,6 @@ src_configure() {
 	cmake_src_configure
 }
 
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
 src_test() {
 	# A lot of tests needs to have access to the installed data files.
 	# So install them into the image directory now.
@@ -316,7 +293,36 @@ src_install() {
 		dobin "${BUILD_DIR}"/bin/cycles
 	fi
 
+	cmake_src_install
+
+	if use man; then
+		# Slot the man page
+		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
+	fi
+
 	if use doc; then
+		# Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
+		# (Because the data is in the image directory and it will default to look in /usr/share)
+		export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts
+		export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles
+
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+
 		docinto "html/API/python"
 		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
 
@@ -324,13 +330,6 @@ src_install() {
 		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
 	fi
 
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
 	# Fix doc installdir
 	docinto html
 	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html

diff --git a/media-gfx/blender/blender-3.0.0.ebuild b/media-gfx/blender/blender-3.0.0.ebuild
index ea92df5eb024..48b72fc65808 100644
--- a/media-gfx/blender/blender-3.0.0.ebuild
+++ b/media-gfx/blender/blender-3.0.0.ebuild
@@ -268,29 +268,6 @@ src_configure() {
 	cmake_src_configure
 }
 
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
 src_test() {
 	# A lot of tests needs to have access to the installed data files.
 	# So install them into the image directory now.
@@ -323,7 +300,36 @@ src_install() {
 		dobin "${BUILD_DIR}"/bin/cycles
 	fi
 
+	cmake_src_install
+
+	if use man; then
+		# Slot the man page
+		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
+	fi
+
 	if use doc; then
+		# Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
+		# (Because the data is in the image directory and it will default to look in /usr/share)
+		export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts
+		export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles
+
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+
 		docinto "html/API/python"
 		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
 
@@ -331,13 +337,6 @@ src_install() {
 		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
 	fi
 
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
 	# Fix doc installdir
 	docinto html
 	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index ea92df5eb024..48b72fc65808 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -268,29 +268,6 @@ src_configure() {
 	cmake_src_configure
 }
 
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
 src_test() {
 	# A lot of tests needs to have access to the installed data files.
 	# So install them into the image directory now.
@@ -323,7 +300,36 @@ src_install() {
 		dobin "${BUILD_DIR}"/bin/cycles
 	fi
 
+	cmake_src_install
+
+	if use man; then
+		# Slot the man page
+		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
+	fi
+
 	if use doc; then
+		# Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
+		# (Because the data is in the image directory and it will default to look in /usr/share)
+		export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts
+		export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles
+
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+
 		docinto "html/API/python"
 		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
 
@@ -331,13 +337,6 @@ src_install() {
 		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
 	fi
 
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
 	# Fix doc installdir
 	docinto html
 	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html

diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 2d812fb127c9..b026e63bec52 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -200,11 +200,6 @@ x11-libs/colord-gtk doc
 <sys-devel/clang-14 llvm_targets_CSKY llvm_targets_M68k
 <sys-devel/llvm-14 llvm_targets_CSKY llvm_targets_M68k
 
-# Joonas Niilola <juippis@gentoo.org> (2020-12-03)
-# Doc building seem to be very random without any predictability,
-# bug #734104
-media-gfx/blender doc
-
 # Marek Szuba <marecki@gentoo.org> (2020-11-30)
 # Vendored therecipe/qt violates network sandbox + uses external binary
 # Qt libraries; see https://github.com/ProtonMail/proton-bridge/issues/16


                 reply	other threads:[~2021-12-03 22:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1638571232.a4acd154d75e1e0f16f641bf3d882039d5370914.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox