prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [doxygen] Model iconv dependency as a conan package
  Specify library name and version:  **doxygen/1.9.2**
  
  This resolves an issue where `iconv` wasn't being appropriately modelled as a conan dependency in the doxygen recipe. This lead to unresolved symbol errors on Macos builds with conan 2. This was previously part of https://github.com/conan-io/conan-center-index/pull/18415, but is being split to a separate PR to separate concerns and make review easier.
  
  Closes #19903 
  
  ---
  
  - [x] I've read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md).
  - [x] I've used a [recent](https://github.com/conan-io/conan/releases/latest) Conan client version close to the [currently deployed](https://github.com/conan-io/conan-center-index/blob/master/.c3i/config_v1.yml#L6).
  - [x] I've tried at least one configuration locally with the [conan-center hook](https://github.com/conan-io/hooks.git) activated.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `recipes/doxygen/all/conanfile.py`
  Content:
  ```
  1 from conan import ConanFile
  2 from conan.errors import ConanInvalidConfiguration
  3 from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
  4 from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
  5 from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime
  6 from conan.tools.scm import Version
  7 import os
  8 
  9 required_conan_version = ">=1.52.0"
  10 
  11 
  12 class DoxygenConan(ConanFile):
  13     name = "doxygen"
  14     description = "A documentation system for C++, C, Java, IDL and PHP --- Note: Dot is disabled in this package"
  15     topics = ("installer", "devtool", "documentation")
  16     homepage = "https://github.com/doxygen/doxygen"
  17     license = "GPL-2.0-or-later"
  18     url = "https://github.com/conan-io/conan-center-index"
  19     package_type = "application"
  20     settings = "os", "arch", "compiler", "build_type"
  21     options = {
  22         "enable_parse": [True, False],
  23         "enable_search": [True, False],
  24     }
  25     default_options = {
  26         "enable_parse": True,
  27         "enable_search": True,
  28     }
  29 
  30     @property
  31     def _settings_build(self):
  32         return getattr(self, "settings_build", self.settings)
  33 
  34     @property
  35     def _minimum_compiler_version(self):
  36         if Version(self.version) <= "1.9.1":
  37             return {
  38                 "gcc": "5",
  39             }
  40         return {
  41             "gcc": "7",  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297
  42             "Visual Studio": "15",
  43             "msvc": "191",
  44         }
  45 
  46     def export_sources(self):
  47         export_conandata_patches(self)
  48 
  49     def layout(self):
  50         cmake_layout(self, src_folder="src")
  51 
  52     def requirements(self):
  53         if self.options.enable_search:
  54             self.requires("xapian-core/1.4.19")
  55             self.requires("zlib/1.2.13")
  56 
  57     def package_id(self):
  58         del self.info.settings.compiler
  59 
  60     def compatibility(self):
  61         return [{"settings": [("build_type", "Release")]}]
  62 
  63     def validate(self):
  64         minimum_compiler_version = self._minimum_compiler_version.get(str(self.settings.compiler))
  65         if minimum_compiler_version and Version(self.settings.compiler.version) < minimum_compiler_version:
  66             raise ConanInvalidConfiguration(f"Compiler version too old. At least {minimum_compiler_version} is required.")
  67         if Version(self.version) == "1.8.18":
  68             check_min_vs(self, "191")
  69 
  70     def build_requirements(self):
  71         if self._settings_build.os == "Windows":
  72             self.tool_requires("winflexbison/2.5.24")
  73         else:
  74             self.tool_requires("flex/2.6.4")
  75             self.tool_requires("bison/3.8.2")
  76 
  77     def source(self):
  78         get(self, **self.conan_data["sources"][self.version], strip_root=True)
  79 
  80     def generate(self):
  81         tc = CMakeToolchain(self)
  82         tc.variables["build_parse"] = self.options.enable_parse
  83         tc.variables["build_search"] = self.options.enable_search
  84         tc.variables["use_libc++"] = self.settings.compiler.get_safe("libcxx") == "libc++"
  85         tc.variables["win_static"] = is_msvc_static_runtime(self)
  86         tc.generate()
  87 
  88         deps = CMakeDeps(self)
  89         deps.generate()
  90 
  91     def build(self):
  92         apply_conandata_patches(self)
  93         cmake = CMake(self)
  94         cmake.configure()
  95         cmake.build()
  96 
  97     def package(self):
  98         copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
  99         cmake = CMake(self)
  100         cmake.install()
  101 
  102     def package_info(self):
  103         self.cpp_info.set_property("cmake_find_mode", "none")
  104         self.cpp_info.libdirs = []
  105         self.cpp_info.includedirs = []
  106 
  107         # TODO: to remove in conan v2
  108         self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
  109
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/recipes/doxygen/all/conanfile.py b/recipes/doxygen/all/conanfile.py
  --- a/recipes/doxygen/all/conanfile.py
  +++ b/recipes/doxygen/all/conanfile.py
  @@ -21,10 +21,12 @@
       options = {
           "enable_parse": [True, False],
           "enable_search": [True, False],
  +        "enable_app": [True, False],
       }
       default_options = {
           "enable_parse": True,
           "enable_search": True,
  +        "enable_app": False,
       }
   
       @property
  @@ -52,10 +54,10 @@
       def requirements(self):
           if self.options.enable_search:
               self.requires("xapian-core/1.4.19")
  -            self.requires("zlib/1.2.13")
  -
  -    def package_id(self):
  -        del self.info.settings.compiler
  +            self.requires("zlib/[>=1.2.11 <2]")
  +        if self.options.enable_app or self.options.enable_parse:
  +            # INFO: Doxygen uses upper case CMake variables to link/include IConv, so we are using patches for targets.
  +            self.requires("libiconv/1.17")
   
       def compatibility(self):
           return [{"settings": [("build_type", "Release")]}]
  @@ -81,6 +83,7 @@
           tc = CMakeToolchain(self)
           tc.variables["build_parse"] = self.options.enable_parse
           tc.variables["build_search"] = self.options.enable_search
  +        tc.variables["build_app"] = self.options.enable_app
           tc.variables["use_libc++"] = self.settings.compiler.get_safe("libcxx") == "libc++"
           tc.variables["win_static"] = is_msvc_static_runtime(self)
           tc.generate()
  @@ -103,6 +106,8 @@
           self.cpp_info.set_property("cmake_find_mode", "none")
           self.cpp_info.libdirs = []
           self.cpp_info.includedirs = []
  +        if self.settings.os in ["Linux", "FreeBSD"]:
  +            self.cpp_info.system_libs = ["pthread", "m"]
   
           # TODO: to remove in conan v2
           self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
  
verification_info: {"golden_diff": "diff --git a/recipes/doxygen/all/conanfile.py b/recipes/doxygen/all/conanfile.py\n--- a/recipes/doxygen/all/conanfile.py\n+++ b/recipes/doxygen/all/conanfile.py\n@@ -21,10 +21,12 @@\n     options = {\n         \"enable_parse\": [True, False],\n         \"enable_search\": [True, False],\n+        \"enable_app\": [True, False],\n     }\n     default_options = {\n         \"enable_parse\": True,\n         \"enable_search\": True,\n+        \"enable_app\": False,\n     }\n \n     @property\n@@ -52,10 +54,10 @@\n     def requirements(self):\n         if self.options.enable_search:\n             self.requires(\"xapian-core/1.4.19\")\n-            self.requires(\"zlib/1.2.13\")\n-\n-    def package_id(self):\n-        del self.info.settings.compiler\n+            self.requires(\"zlib/[>=1.2.11 <2]\")\n+        if self.options.enable_app or self.options.enable_parse:\n+            # INFO: Doxygen uses upper case CMake variables to link/include IConv, so we are using patches for targets.\n+            self.requires(\"libiconv/1.17\")\n \n     def compatibility(self):\n         return [{\"settings\": [(\"build_type\", \"Release\")]}]\n@@ -81,6 +83,7 @@\n         tc = CMakeToolchain(self)\n         tc.variables[\"build_parse\"] = self.options.enable_parse\n         tc.variables[\"build_search\"] = self.options.enable_search\n+        tc.variables[\"build_app\"] = self.options.enable_app\n         tc.variables[\"use_libc++\"] = self.settings.compiler.get_safe(\"libcxx\") == \"libc++\"\n         tc.variables[\"win_static\"] = is_msvc_static_runtime(self)\n         tc.generate()\n@@ -103,6 +106,8 @@\n         self.cpp_info.set_property(\"cmake_find_mode\", \"none\")\n         self.cpp_info.libdirs = []\n         self.cpp_info.includedirs = []\n+        if self.settings.os in [\"Linux\", \"FreeBSD\"]:\n+            self.cpp_info.system_libs = [\"pthread\", \"m\"]\n \n         # TODO: to remove in conan v2\n         self.env_info.PATH.append(os.path.join(self.package_folder, \"bin\"))\n", "issue": "[doxygen] Model iconv dependency as a conan package\nSpecify library name and version:  **doxygen/1.9.2**\r\n\r\nThis resolves an issue where `iconv` wasn't being appropriately modelled as a conan dependency in the doxygen recipe. This lead to unresolved symbol errors on Macos builds with conan 2. This was previously part of https://github.com/conan-io/conan-center-index/pull/18415, but is being split to a separate PR to separate concerns and make review easier.\r\n\r\nCloses #19903 \r\n\r\n---\r\n\r\n- [x] I've read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md).\r\n- [x] I've used a [recent](https://github.com/conan-io/conan/releases/latest) Conan client version close to the [currently deployed](https://github.com/conan-io/conan-center-index/blob/master/.c3i/config_v1.yml#L6).\r\n- [x] I've tried at least one configuration locally with the [conan-center hook](https://github.com/conan-io/hooks.git) activated.\r\n\n", "before_files": [{"content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout\nfrom conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get\nfrom conan.tools.microsoft import check_min_vs, is_msvc_static_runtime\nfrom conan.tools.scm import Version\nimport os\n\nrequired_conan_version = \">=1.52.0\"\n\n\nclass DoxygenConan(ConanFile):\n    name = \"doxygen\"\n    description = \"A documentation system for C++, C, Java, IDL and PHP --- Note: Dot is disabled in this package\"\n    topics = (\"installer\", \"devtool\", \"documentation\")\n    homepage = \"https://github.com/doxygen/doxygen\"\n    license = \"GPL-2.0-or-later\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    package_type = \"application\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"enable_parse\": [True, False],\n        \"enable_search\": [True, False],\n    }\n    default_options = {\n        \"enable_parse\": True,\n        \"enable_search\": True,\n    }\n\n    @property\n    def _settings_build(self):\n        return getattr(self, \"settings_build\", self.settings)\n\n    @property\n    def _minimum_compiler_version(self):\n        if Version(self.version) <= \"1.9.1\":\n            return {\n                \"gcc\": \"5\",\n            }\n        return {\n            \"gcc\": \"7\",  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297\n            \"Visual Studio\": \"15\",\n            \"msvc\": \"191\",\n        }\n\n    def export_sources(self):\n        export_conandata_patches(self)\n\n    def layout(self):\n        cmake_layout(self, src_folder=\"src\")\n\n    def requirements(self):\n        if self.options.enable_search:\n            self.requires(\"xapian-core/1.4.19\")\n            self.requires(\"zlib/1.2.13\")\n\n    def package_id(self):\n        del self.info.settings.compiler\n\n    def compatibility(self):\n        return [{\"settings\": [(\"build_type\", \"Release\")]}]\n\n    def validate(self):\n        minimum_compiler_version = self._minimum_compiler_version.get(str(self.settings.compiler))\n        if minimum_compiler_version and Version(self.settings.compiler.version) < minimum_compiler_version:\n            raise ConanInvalidConfiguration(f\"Compiler version too old. At least {minimum_compiler_version} is required.\")\n        if Version(self.version) == \"1.8.18\":\n            check_min_vs(self, \"191\")\n\n    def build_requirements(self):\n        if self._settings_build.os == \"Windows\":\n            self.tool_requires(\"winflexbison/2.5.24\")\n        else:\n            self.tool_requires(\"flex/2.6.4\")\n            self.tool_requires(\"bison/3.8.2\")\n\n    def source(self):\n        get(self, **self.conan_data[\"sources\"][self.version], strip_root=True)\n\n    def generate(self):\n        tc = CMakeToolchain(self)\n        tc.variables[\"build_parse\"] = self.options.enable_parse\n        tc.variables[\"build_search\"] = self.options.enable_search\n        tc.variables[\"use_libc++\"] = self.settings.compiler.get_safe(\"libcxx\") == \"libc++\"\n        tc.variables[\"win_static\"] = is_msvc_static_runtime(self)\n        tc.generate()\n\n        deps = CMakeDeps(self)\n        deps.generate()\n\n    def build(self):\n        apply_conandata_patches(self)\n        cmake = CMake(self)\n        cmake.configure()\n        cmake.build()\n\n    def package(self):\n        copy(self, \"LICENSE\", src=self.source_folder, dst=os.path.join(self.package_folder, \"licenses\"))\n        cmake = CMake(self)\n        cmake.install()\n\n    def package_info(self):\n        self.cpp_info.set_property(\"cmake_find_mode\", \"none\")\n        self.cpp_info.libdirs = []\n        self.cpp_info.includedirs = []\n\n        # TODO: to remove in conan v2\n        self.env_info.PATH.append(os.path.join(self.package_folder, \"bin\"))\n", "path": "recipes/doxygen/all/conanfile.py"}], "after_files": [{"content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout\nfrom conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get\nfrom conan.tools.microsoft import check_min_vs, is_msvc_static_runtime\nfrom conan.tools.scm import Version\nimport os\n\nrequired_conan_version = \">=1.52.0\"\n\n\nclass DoxygenConan(ConanFile):\n    name = \"doxygen\"\n    description = \"A documentation system for C++, C, Java, IDL and PHP --- Note: Dot is disabled in this package\"\n    topics = (\"installer\", \"devtool\", \"documentation\")\n    homepage = \"https://github.com/doxygen/doxygen\"\n    license = \"GPL-2.0-or-later\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    package_type = \"application\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\n        \"enable_parse\": [True, False],\n        \"enable_search\": [True, False],\n        \"enable_app\": [True, False],\n    }\n    default_options = {\n        \"enable_parse\": True,\n        \"enable_search\": True,\n        \"enable_app\": False,\n    }\n\n    @property\n    def _settings_build(self):\n        return getattr(self, \"settings_build\", self.settings)\n\n    @property\n    def _minimum_compiler_version(self):\n        if Version(self.version) <= \"1.9.1\":\n            return {\n                \"gcc\": \"5\",\n            }\n        return {\n            \"gcc\": \"7\",  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297\n            \"Visual Studio\": \"15\",\n            \"msvc\": \"191\",\n        }\n\n    def export_sources(self):\n        export_conandata_patches(self)\n\n    def layout(self):\n        cmake_layout(self, src_folder=\"src\")\n\n    def requirements(self):\n        if self.options.enable_search:\n            self.requires(\"xapian-core/1.4.19\")\n            self.requires(\"zlib/[>=1.2.11 <2]\")\n        if self.options.enable_app or self.options.enable_parse:\n            # INFO: Doxygen uses upper case CMake variables to link/include IConv, so we are using patches for targets.\n            self.requires(\"libiconv/1.17\")\n\n    def compatibility(self):\n        return [{\"settings\": [(\"build_type\", \"Release\")]}]\n\n    def validate(self):\n        minimum_compiler_version = self._minimum_compiler_version.get(str(self.settings.compiler))\n        if minimum_compiler_version and Version(self.settings.compiler.version) < minimum_compiler_version:\n            raise ConanInvalidConfiguration(f\"Compiler version too old. At least {minimum_compiler_version} is required.\")\n        if Version(self.version) == \"1.8.18\":\n            check_min_vs(self, \"191\")\n\n    def build_requirements(self):\n        if self._settings_build.os == \"Windows\":\n            self.tool_requires(\"winflexbison/2.5.24\")\n        else:\n            self.tool_requires(\"flex/2.6.4\")\n            self.tool_requires(\"bison/3.8.2\")\n\n    def source(self):\n        get(self, **self.conan_data[\"sources\"][self.version], strip_root=True)\n\n    def generate(self):\n        tc = CMakeToolchain(self)\n        tc.variables[\"build_parse\"] = self.options.enable_parse\n        tc.variables[\"build_search\"] = self.options.enable_search\n        tc.variables[\"build_app\"] = self.options.enable_app\n        tc.variables[\"use_libc++\"] = self.settings.compiler.get_safe(\"libcxx\") == \"libc++\"\n        tc.variables[\"win_static\"] = is_msvc_static_runtime(self)\n        tc.generate()\n\n        deps = CMakeDeps(self)\n        deps.generate()\n\n    def build(self):\n        apply_conandata_patches(self)\n        cmake = CMake(self)\n        cmake.configure()\n        cmake.build()\n\n    def package(self):\n        copy(self, \"LICENSE\", src=self.source_folder, dst=os.path.join(self.package_folder, \"licenses\"))\n        cmake = CMake(self)\n        cmake.install()\n\n    def package_info(self):\n        self.cpp_info.set_property(\"cmake_find_mode\", \"none\")\n        self.cpp_info.libdirs = []\n        self.cpp_info.includedirs = []\n        if self.settings.os in [\"Linux\", \"FreeBSD\"]:\n            self.cpp_info.system_libs = [\"pthread\", \"m\"]\n\n        # TODO: to remove in conan v2\n        self.env_info.PATH.append(os.path.join(self.package_folder, \"bin\"))\n", "path": "recipes/doxygen/all/conanfile.py"}]}