0001-buildfix-support-fmtlib-10.patch 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. From 37957aac0aea776e6f843af2358916f81056a405 Mon Sep 17 00:00:00 2001
  2. From: Mamoru TASAKA <mtasaka@fedoraproject.org>
  3. Date: Thu, 29 Jun 2023 22:09:15 +0900
  4. Subject: [PATCH] buildfix: support fmtlib 10
  5. With fmtlib10, fmt::format does not accept pugi::xml_node as it is.
  6. Use name() member function, as this usage appear on other places of
  7. gerbera source code.
  8. Closes #2839 .
  9. Upstream: https://github.com/gerbera/gerbera/commit/37957aac0aea776e6f843af2358916f81056a405
  10. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  11. ---
  12. src/config/setup/config_setup_array.cc | 6 +++---
  13. src/config/setup/config_setup_autoscan.cc | 2 +-
  14. src/config/setup/config_setup_client.cc | 2 +-
  15. src/config/setup/config_setup_dictionary.cc | 6 +++---
  16. src/config/setup/config_setup_dynamic.cc | 2 +-
  17. src/config/setup/config_setup_transcoding.cc | 2 +-
  18. src/config/setup/config_setup_tweak.cc | 2 +-
  19. src/config/setup/config_setup_vector.cc | 4 ++--
  20. 8 files changed, 13 insertions(+), 13 deletions(-)
  21. diff --git a/src/config/setup/config_setup_array.cc b/src/config/setup/config_setup_array.cc
  22. index 62dd5c9a7..a5f8958ce 100644
  23. --- a/src/config/setup/config_setup_array.cc
  24. +++ b/src/config/setup/config_setup_array.cc
  25. @@ -137,11 +137,11 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
  26. std::vector<std::string> result;
  27. if (initArray) {
  28. if (!initArray(optValue, result, ConfigDefinition::mapConfigOption(nodeOption))) {
  29. - throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
  30. + throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.name());
  31. }
  32. } else {
  33. if (!createOptionFromNode(optValue, result)) {
  34. - throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
  35. + throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.name());
  36. }
  37. }
  38. if (result.empty()) {
  39. @@ -150,7 +150,7 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
  40. result = defaultEntries;
  41. }
  42. if (notEmpty && result.empty()) {
  43. - throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue);
  44. + throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue.name());
  45. }
  46. return result;
  47. }
  48. diff --git a/src/config/setup/config_setup_autoscan.cc b/src/config/setup/config_setup_autoscan.cc
  49. index 9ae4e61f8..5e1394585 100644
  50. --- a/src/config/setup/config_setup_autoscan.cc
  51. +++ b/src/config/setup/config_setup_autoscan.cc
  52. @@ -245,7 +245,7 @@ std::shared_ptr<ConfigOption> ConfigAutoscanSetup::newOption(const pugi::xml_nod
  53. {
  54. auto result = std::vector<AutoscanDirectory>();
  55. if (!createOptionFromNode(optValue, result)) {
  56. - throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue);
  57. + throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue.name());
  58. }
  59. optionValue = std::make_shared<AutoscanListOption>(result);
  60. return optionValue;
  61. diff --git a/src/config/setup/config_setup_client.cc b/src/config/setup/config_setup_client.cc
  62. index ffd12fc01..857db3c3e 100644
  63. --- a/src/config/setup/config_setup_client.cc
  64. +++ b/src/config/setup/config_setup_client.cc
  65. @@ -183,7 +183,7 @@ std::shared_ptr<ConfigOption> ConfigClientSetup::newOption(const pugi::xml_node&
  66. auto result = std::make_shared<ClientConfigList>();
  67. if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
  68. - throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue);
  69. + throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue.name());
  70. }
  71. optionValue = std::make_shared<ClientConfigListOption>(result);
  72. return optionValue;
  73. diff --git a/src/config/setup/config_setup_dictionary.cc b/src/config/setup/config_setup_dictionary.cc
  74. index 003b4cc59..69d1a7255 100644
  75. --- a/src/config/setup/config_setup_dictionary.cc
  76. +++ b/src/config/setup/config_setup_dictionary.cc
  77. @@ -163,11 +163,11 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
  78. std::map<std::string, std::string> result;
  79. if (initDict) {
  80. if (!initDict(optValue, result)) {
  81. - throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
  82. + throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.name());
  83. }
  84. } else {
  85. if (!createOptionFromNode(optValue, result) && required) {
  86. - throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
  87. + throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.name());
  88. }
  89. }
  90. if (result.empty()) {
  91. @@ -176,7 +176,7 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
  92. result = defaultEntries;
  93. }
  94. if (notEmpty && result.empty()) {
  95. - throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue);
  96. + throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue.name());
  97. }
  98. return result;
  99. }
  100. diff --git a/src/config/setup/config_setup_dynamic.cc b/src/config/setup/config_setup_dynamic.cc
  101. index 0074cb6d3..d6962afe6 100644
  102. --- a/src/config/setup/config_setup_dynamic.cc
  103. +++ b/src/config/setup/config_setup_dynamic.cc
  104. @@ -192,7 +192,7 @@ std::shared_ptr<ConfigOption> ConfigDynamicContentSetup::newOption(const pugi::x
  105. auto result = std::make_shared<DynamicContentList>();
  106. if (!createOptionFromNode(optValue, result)) {
  107. - throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue);
  108. + throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue.name());
  109. }
  110. optionValue = std::make_shared<DynamicContentListOption>(result);
  111. return optionValue;
  112. diff --git a/src/config/setup/config_setup_transcoding.cc b/src/config/setup/config_setup_transcoding.cc
  113. index 17d1780dc..1f6fb0604 100644
  114. --- a/src/config/setup/config_setup_transcoding.cc
  115. +++ b/src/config/setup/config_setup_transcoding.cc
  116. @@ -501,7 +501,7 @@ std::shared_ptr<ConfigOption> ConfigTranscodingSetup::newOption(const pugi::xml_
  117. auto result = std::make_shared<TranscodingProfileList>();
  118. if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
  119. - throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue);
  120. + throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue.name());
  121. }
  122. optionValue = std::make_shared<TranscodingProfileListOption>(result);
  123. return optionValue;
  124. diff --git a/src/config/setup/config_setup_tweak.cc b/src/config/setup/config_setup_tweak.cc
  125. index 65dae2759..4da9fca1b 100644
  126. --- a/src/config/setup/config_setup_tweak.cc
  127. +++ b/src/config/setup/config_setup_tweak.cc
  128. @@ -257,7 +257,7 @@ std::shared_ptr<ConfigOption> ConfigDirectorySetup::newOption(const pugi::xml_no
  129. auto result = std::make_shared<DirectoryConfigList>();
  130. if (!createOptionFromNode(optValue, result)) {
  131. - throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue);
  132. + throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue.name());
  133. }
  134. optionValue = std::make_shared<DirectoryTweakOption>(result);
  135. return optionValue;
  136. diff --git a/src/config/setup/config_setup_vector.cc b/src/config/setup/config_setup_vector.cc
  137. index e5efe2767..9a9670569 100644
  138. --- a/src/config/setup/config_setup_vector.cc
  139. +++ b/src/config/setup/config_setup_vector.cc
  140. @@ -181,7 +181,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
  141. {
  142. std::vector<std::vector<std::pair<std::string, std::string>>> result;
  143. if (!createOptionFromNode(optValue, result) && required) {
  144. - throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue);
  145. + throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue.name());
  146. }
  147. if (result.empty()) {
  148. log_debug("{} assigning {} default values", xpath, defaultEntries.size());
  149. @@ -189,7 +189,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
  150. result = defaultEntries;
  151. }
  152. if (notEmpty && result.empty()) {
  153. - throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue);
  154. + throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue.name());
  155. }
  156. return result;
  157. }