From d48022402391ce3e8411fc71254482ad785a2c608416a80dcf21ac09943e2581 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 29 Apr 2021 07:33:37 +0000 Subject: [PATCH] - add 53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff to fix automoc race OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=455 --- 53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff | 47 +++++++++++++++++++ cmake.changes | 6 +++ cmake.spec | 2 + 3 files changed, 55 insertions(+) create mode 100644 53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff diff --git a/53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff b/53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff new file mode 100644 index 0000000..c3b679f --- /dev/null +++ b/53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff @@ -0,0 +1,47 @@ +diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx +index 535f786f41487e57fd3e9d547d22344b18b924a1..f5831628d3fe3c05b0bf4447036e5ac6bcdbdafc 100644 +--- a/Source/cmQtAutoMocUic.cxx ++++ b/Source/cmQtAutoMocUic.cxx +@@ -564,8 +564,7 @@ private: + // -- Generation + bool CreateDirectories(); + // -- Support for depfiles +- static std::vector dependenciesFromDepFile( +- const char* filePath); ++ std::vector dependenciesFromDepFile(const char* filePath); + + // -- Settings + BaseSettingsT BaseConst_; +@@ -2066,7 +2065,8 @@ void cmQtAutoMocUicT::JobCompileMocT::Process() + " does not exist."); + return; + } +- this->CacheEntry->Moc.Depends = dependenciesFromDepFile(depfile.c_str()); ++ this->CacheEntry->Moc.Depends = ++ this->Gen()->dependenciesFromDepFile(depfile.c_str()); + } + } + +@@ -2223,12 +2223,12 @@ void cmQtAutoMocUicT::JobDepFilesMergeT::Process() + this->MessagePath(this->BaseConst().DepFile.c_str()))); + } + auto processDepFile = +- [](const std::string& mocOutputFile) -> std::vector { ++ [this](const std::string& mocOutputFile) -> std::vector { + std::string f = mocOutputFile + ".d"; + if (!cmSystemTools::FileExists(f)) { + return {}; + } +- return dependenciesFromDepFile(f.c_str()); ++ return this->Gen()->dependenciesFromDepFile(f.c_str()); + }; + + std::vector dependencies = this->initialDependencies(); +@@ -2961,6 +2961,7 @@ bool cmQtAutoMocUicT::CreateDirectories() + std::vector cmQtAutoMocUicT::dependenciesFromDepFile( + const char* filePath) + { ++ std::lock_guard guard(this->CMakeLibMutex_); + auto const content = cmReadGccDepfile(filePath); + if (!content || content->empty()) { + return {}; diff --git a/cmake.changes b/cmake.changes index 01bd979..87331ab 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 29 07:33:25 UTC 2021 - Dirk Müller + +- add 53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff to fix automoc + race + ------------------------------------------------------------------- Fri Apr 9 16:10:18 UTC 2021 - Andreas Stieger diff --git a/cmake.spec b/cmake.spec index 441d99b..12b93be 100644 --- a/cmake.spec +++ b/cmake.spec @@ -55,6 +55,8 @@ Patch0: cmake-fix-ruby-test.patch # Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice Patch1: feature-suse-python-interp-search-order.patch Patch2: cmake-fix-png-include-dir.patch +# From https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6008 +Patch3: 53d523f2e11839bcbbdc9288b4f71c764d0efd5c.diff BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkgconfig