commit:     bc421f9b0e4645fec3d49a8fe6754e1877c0d700
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Dec  8 12:17:16 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Dec 11 13:33:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc421f9b

media-gfx/blender: fix VariableScope QA

Changed the test location to T as ED is not allowed outside
src_install(). This mirrors the earlier changes in blender-4.0.x.

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34222
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/blender/blender-3.3.6-r1.ebuild | 12 ++++++------
 media-gfx/blender/blender-3.3.8.ebuild    | 12 ++++++------
 media-gfx/blender/blender-3.4.1-r3.ebuild | 12 ++++++------
 media-gfx/blender/blender-3.5.1-r1.ebuild | 12 ++++++------
 media-gfx/blender/blender-3.6.0.ebuild    | 12 ++++++------
 media-gfx/blender/blender-3.6.5.ebuild    | 12 ++++++------
 6 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/media-gfx/blender/blender-3.3.6-r1.ebuild 
b/media-gfx/blender/blender-3.3.6-r1.ebuild
index d454ab1fd985..178e873c32b8 100644
--- a/media-gfx/blender/blender-3.3.6-r1.ebuild
+++ b/media-gfx/blender/blender-3.3.6-r1.ebuild
@@ -208,8 +208,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -302,13 +302,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -318,7 +318,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

diff --git a/media-gfx/blender/blender-3.3.8.ebuild 
b/media-gfx/blender/blender-3.3.8.ebuild
index fb54fb0bca6b..8847eb3d3172 100644
--- a/media-gfx/blender/blender-3.3.8.ebuild
+++ b/media-gfx/blender/blender-3.3.8.ebuild
@@ -208,8 +208,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -305,13 +305,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -321,7 +321,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

diff --git a/media-gfx/blender/blender-3.4.1-r3.ebuild 
b/media-gfx/blender/blender-3.4.1-r3.ebuild
index 60d40272aa96..9587e6493c56 100644
--- a/media-gfx/blender/blender-3.4.1-r3.ebuild
+++ b/media-gfx/blender/blender-3.4.1-r3.ebuild
@@ -215,8 +215,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${T}/usr)|g" -i tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -319,13 +319,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -335,7 +335,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

diff --git a/media-gfx/blender/blender-3.5.1-r1.ebuild 
b/media-gfx/blender/blender-3.5.1-r1.ebuild
index 18b1f426bbfa..aaa4cf43c895 100644
--- a/media-gfx/blender/blender-3.5.1-r1.ebuild
+++ b/media-gfx/blender/blender-3.5.1-r1.ebuild
@@ -218,8 +218,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${T}/usr)|g" -i tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -322,13 +322,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -338,7 +338,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

diff --git a/media-gfx/blender/blender-3.6.0.ebuild 
b/media-gfx/blender/blender-3.6.0.ebuild
index 18b1f426bbfa..aaa4cf43c895 100644
--- a/media-gfx/blender/blender-3.6.0.ebuild
+++ b/media-gfx/blender/blender-3.6.0.ebuild
@@ -218,8 +218,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${T}/usr)|g" -i tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -322,13 +322,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -338,7 +338,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

diff --git a/media-gfx/blender/blender-3.6.5.ebuild 
b/media-gfx/blender/blender-3.6.5.ebuild
index 08a30c9d3d4a..55bffe73b5f2 100644
--- a/media-gfx/blender/blender-3.6.5.ebuild
+++ b/media-gfx/blender/blender-3.6.5.ebuild
@@ -216,8 +216,8 @@ src_prepare() {
 
        if use test; then
                # Without this the tests will try to use /usr/bin/blender and 
/usr/share/blender/ to run the tests.
-               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" 
-i build_files/cmake/Modules/GTestTesting.cmake || die
+               sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR 
${T}/usr)|g" -i tests/CMakeLists.txt || die
+               sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i 
build_files/cmake/Modules/GTestTesting.cmake || die
        fi
 }
 
@@ -320,13 +320,13 @@ src_configure() {
 src_test() {
        # A lot of tests needs to have access to the installed data files.
        # So install them into the image directory now.
-       cmake_src_install
+       DESTDIR="${T}" cmake_build install
 
        blender_get_version
        # Define custom blender data/script file paths not be able to find them 
otherwise during testing.
        # (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
+       export BLENDER_SYSTEM_SCRIPTS="${T}/usr/share/blender/${BV}/scripts"
+       export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
 
        # Sanity check that the script and datafile path is valid.
        # If they are not vaild, blender will fallback to the default path 
which is not what we want.
@@ -336,7 +336,7 @@ src_test() {
        cmake_src_test
 
        # Clean up the image directory for src_install
-       rm -fr "${ED}"/* || die
+       rm -fr "${T}"/usr || die
 }
 
 src_install() {

Reply via email to