From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B500138359 for ; Sun, 12 Jul 2020 22:56:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25174E0858; Sun, 12 Jul 2020 22:56:00 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00B2EE0858 for ; Sun, 12 Jul 2020 22:55:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF4E234F518 for ; Sun, 12 Jul 2020 22:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E6B22D8 for ; Sun, 12 Jul 2020 22:55:54 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1594594407.07cda4a3a1bd5fd356ea8a4961d6e12a2c870b98.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: media-gfx/krita/, media-gfx/krita/files/ X-VCS-Repository: proj/kde X-VCS-Files: media-gfx/krita/files/krita-4.3.1-tests-optional.patch media-gfx/krita/krita-9999.ebuild X-VCS-Directories: media-gfx/krita/ media-gfx/krita/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 07cda4a3a1bd5fd356ea8a4961d6e12a2c870b98 X-VCS-Branch: master Date: Sun, 12 Jul 2020 22:55:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 90cffb3b-2d8c-4318-b296-0fa166b1c9e2 X-Archives-Hash: caa21ee24a6066e6c03749ce7cbb0a10 commit: 07cda4a3a1bd5fd356ea8a4961d6e12a2c870b98 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Jul 12 18:48:47 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Jul 12 22:53:27 2020 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=07cda4a3 media-gfx/krita: Update tests-optional patch Now we rely on patched ECMAddTests.cmake to skip them. The remaining patch is much smaller. Bug: https://bugs.gentoo.org/651978 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner gentoo.org> .../krita/files/krita-4.3.1-tests-optional.patch | 80 ++++++++++++++++++++++ media-gfx/krita/krita-9999.ebuild | 2 + 2 files changed, 82 insertions(+) diff --git a/media-gfx/krita/files/krita-4.3.1-tests-optional.patch b/media-gfx/krita/files/krita-4.3.1-tests-optional.patch new file mode 100644 index 0000000000..37f2ac50ff --- /dev/null +++ b/media-gfx/krita/files/krita-4.3.1-tests-optional.patch @@ -0,0 +1,80 @@ +From 2e9369281d44a2701ac7364568d381cca0d92ec5 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Sun, 12 Jul 2020 18:55:31 +0200 +Subject: [PATCH] KritaAddBrokenUnitTest.cmake, MacroKritaAddBenchmark.cmake: + Skip ecm_add_test early if Qt5::Test is not available + +Signed-off-by: Andreas Sturmlechner +--- + cmake/modules/KritaAddBrokenUnitTest.cmake | 4 ++++ + cmake/modules/MacroKritaAddBenchmark.cmake | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/cmake/modules/KritaAddBrokenUnitTest.cmake b/cmake/modules/KritaAddBrokenUnitTest.cmake +index b7d0e8d852..901a0a1f99 100644 +--- a/cmake/modules/KritaAddBrokenUnitTest.cmake ++++ b/cmake/modules/KritaAddBrokenUnitTest.cmake +@@ -23,6 +23,10 @@ function(KRITA_ADD_BROKEN_UNIT_TEST) + message(FATAL_ERROR "ecm_add_test() called with multiple source files but without setting \"TEST_NAME\"") + endif() + ++ if(NOT TARGET Qt5::Test) ++ return() ++ endif() ++ + set(_testname ${ARG_NAME_PREFIX}${_targetname}) + + # add test to the global list of disabled tests +diff --git a/cmake/modules/MacroKritaAddBenchmark.cmake b/cmake/modules/MacroKritaAddBenchmark.cmake +index c748d8e319..f804d9b8f4 100644 +--- a/cmake/modules/MacroKritaAddBenchmark.cmake ++++ b/cmake/modules/MacroKritaAddBenchmark.cmake +@@ -23,6 +23,10 @@ macro (KRITA_ADD_BENCHMARK _test_NAME) + set(_nogui "NOGUI") + endif() + ++ if(NOT TARGET Qt5::Test) ++ return() ++ endif() ++ + add_executable( ${_test_NAME} ${_srcList} ) + ecm_mark_as_test(${_test_NAME}) + +-- +2.27.0 + +From 3c9fe10e25e94bdb1eb5e7b07ac2696635fdc5a3 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Wed, 17 Jun 2020 20:18:28 +0200 +Subject: [PATCH] Don't build tests when testing not requested + +Signed-off-by: Andreas Sturmlechner + +diff --git a/libs/flake/CMakeLists.txt b/libs/flake/CMakeLists.txt +index cbdac265d2..1a50c1620a 100644 +--- a/libs/flake/CMakeLists.txt ++++ b/libs/flake/CMakeLists.txt +@@ -9,8 +9,10 @@ include_directories( + ) + + add_subdirectory(styles) +-add_subdirectory(tests) +-add_subdirectory(resources/tests) ++if(BUILD_TESTING) ++ add_subdirectory(tests) ++ add_subdirectory(resources/tests) ++endif() + + set(kritaflake_SRCS + KoGradientHelper.cpp +diff --git a/libs/image/tiles3/CMakeLists.txt b/libs/image/tiles3/CMakeLists.txt +index 88c0516360..01f2383ddb 100644 +--- a/libs/image/tiles3/CMakeLists.txt ++++ b/libs/image/tiles3/CMakeLists.txt +@@ -1 +1,3 @@ +-add_subdirectory(tests) ++if(BUILD_TESTING) ++ add_subdirectory(tests) ++endif() +-- +2.27.0 diff --git a/media-gfx/krita/krita-9999.ebuild b/media-gfx/krita/krita-9999.ebuild index fda25b11c0..215cf210d5 100644 --- a/media-gfx/krita/krita-9999.ebuild +++ b/media-gfx/krita/krita-9999.ebuild @@ -87,6 +87,8 @@ DEPEND="${RDEPEND} # bug 630508 RESTRICT+=" test" +PATCHES=( "${FILESDIR}"/${PN}-4.3.1-tests-optional.patch ) + pkg_setup() { python-single-r1_pkg_setup ecm_pkg_setup