Blame SOURCES/evolution-3.28.5-intltool-cache.patch

956363
From f315ca6a601e77220323bff4ac7782b54c862a0c Mon Sep 17 00:00:00 2001
956363
From: Milan Crha <mcrha@redhat.com>
956363
Date: Tue, 30 Oct 2018 15:50:58 +0100
956363
Subject: [PATCH] Make sure intltool-merge cache is created only once
956363
956363
Similar to https://gitlab.gnome.org/GNOME/evolution/issues/196
956363
when intltool-merge is called in parallel, it could either rewrite
956363
the ongoing attempt to build it or use an incomplete data, which
956363
results in broken output files (.desktop, .metainfo and so on).
956363
This change ensures the intltool-merge cache is created only once
956363
and any other requests which would use it will wait until it's created.
956363
---
956363
 cmake/modules/FindIntltool.cmake | 11 ++++++++++-
956363
 1 file changed, 10 insertions(+), 1 deletion(-)
956363
956363
diff --git a/cmake/modules/FindIntltool.cmake b/cmake/modules/FindIntltool.cmake
956363
index 2cda2549eb..8e223e9d7f 100644
956363
--- a/cmake/modules/FindIntltool.cmake
956363
+++ b/cmake/modules/FindIntltool.cmake
956363
@@ -176,9 +176,18 @@ macro(intltool_merge _in_filename _out_filename)
956363
 			DEPENDS ${_in}
956363
 		)
956363
 	else(_has_no_translations)
956363
+		if(NOT TARGET intltool-merge-cache)
956363
+			add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache
956363
+				COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
956363
+				DEPENDS ${_in}
956363
+			)
956363
+			add_custom_target(intltool-merge-cache ALL
956363
+				DEPENDS ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache)
956363
+		endif(NOT TARGET intltool-merge-cache)
956363
+
956363
 		add_custom_command(OUTPUT ${_out}
956363
 			COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
956363
-			DEPENDS ${_in}
956363
+			DEPENDS ${_in} intltool-merge-cache
956363
 		)
956363
 	endif(_has_no_translations)
956363
 endmacro(intltool_merge)
956363
-- 
956363
2.18.1
956363