summaryrefslogtreecommitdiff
path: root/dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch')
-rw-r--r--dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch51
1 files changed, 18 insertions, 33 deletions
diff --git a/dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch b/dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch
index 13f719f9333a..c42118bceaa1 100644
--- a/dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch
+++ b/dev-libs/yoga/files/yoga-3.2.1-fix-tests.patch
@@ -1,25 +1,23 @@
-fixes:
+remove -Werror and use system wide GTest
-1. make building tests optional
-2. use system wide GTest
-3. fix -Werror=array-bounds= compile error
+Bug: https://bugs.gentoo.org/973597
+Issue: https://github.com/facebook/yoga/issues/1934
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 55f1a6df..fcfa593a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -10,7 +10,10 @@ set(CMAKE_VERBOSE_MAKEFILE on)
- include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/project-defaults.cmake)
-
- add_subdirectory(yoga)
--add_subdirectory(tests)
-+option(BUILD_TESTS "Build tests" ON)
-+if(BUILD_TESTS)
-+ add_subdirectory(tests)
-+endif()
-
- option(BUILD_FUZZ_TESTS "Build fuzz tests" OFF)
-
+diff --git a/cmake/project-defaults.cmake b/cmake/project-defaults.cmake
+index 987529c5..6051621a 100644
+--- a/cmake/project-defaults.cmake
++++ b/cmake/project-defaults.cmake
+@@ -31,9 +31,8 @@ add_compile_options(
+ -fno-omit-frame-pointer
+ # Enable exception handling
+ -fexceptions
+- # Enable warnings and warnings as errors
++ # Enable warnings
+ -Wall
+- -Werror
+ # Disable RTTI
+ $<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
+ # Use -O2 (prioritize speed)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c48bfb9f..fbf837f6 100644
--- a/tests/CMakeLists.txt
@@ -44,16 +42,3 @@ index c48bfb9f..fbf837f6 100644
add_subdirectory(${YOGA_ROOT}/yoga ${CMAKE_CURRENT_BINARY_DIR}/yoga)
-diff --git a/tests/YGPersistenceTest.cpp b/tests/YGPersistenceTest.cpp
-index 929aee07..f171e5f7 100644
---- a/tests/YGPersistenceTest.cpp
-+++ b/tests/YGPersistenceTest.cpp
-@@ -275,7 +275,7 @@ TEST(YogaTest, mixed_shared_and_owned_children) {
- YGNodeInsertChild(root1, root1_child2, 1);
-
- auto children = static_cast<yoga::Node*>(root1)->getChildren();
-- children.insert(children.begin() + 1, static_cast<yoga::Node*>(root0_child0));
-+ children.emplace(children.begin() + 1, static_cast<yoga::Node*>(root0_child0));
- static_cast<yoga::Node*>(root1)->setChildren(children);
-
- auto secondChild = YGNodeGetChild(root1, 1);