prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [package] fontconfig/2.13.93: Please make gettext dependency optional
  ### Package and Environment Details (include every applicable attribute)
    * Package Name/Version: **fontconfig/2.13.93**
    * Operating System+version: **MacOs**
  
  The current recipe adds an unconditional dependency on libgettext/0.20.1 on MacOs.
  
  Since libgettext is licensed under GPLv3, it places an additional license restriction to an otherwise more liberally licensed library.
  
  </details>
  
  
  --- 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/fontconfig/all/conanfile.py`
  Content:
  ```
  1 import os
  2 import glob
  3 
  4 from conans import ConanFile, tools, AutoToolsBuildEnvironment
  5 from conans.errors import ConanInvalidConfiguration
  6 
  7 
  8 class FontconfigConan(ConanFile):
  9     name = "fontconfig"
  10     license = "MIT"
  11     url = "https://github.com/conan-io/conan-center-index"
  12     description = "Fontconfig is a library for configuring and customizing font access"
  13     homepage = "https://gitlab.freedesktop.org/fontconfig/fontconfig"
  14     topics = ("conan", "fontconfig", "fonts", "freedesktop")
  15     settings = "os", "compiler", "build_type", "arch"
  16     options = {"shared": [True, False], "fPIC": [True, False]}
  17     default_options = {"shared": False, "fPIC": True}
  18     generators = "pkg_config"
  19 
  20     _autotools = None
  21 
  22     @property
  23     def _source_subfolder(self):
  24         return "source_subfolder"
  25 
  26     def config_options(self):
  27         if self.settings.os == "Windows":
  28             del self.options.fPIC
  29 
  30     def configure(self):
  31         if self.settings.compiler == "Visual Studio":
  32             raise ConanInvalidConfiguration("Visual Studio builds are not supported.")
  33         if self.options.shared:
  34             del self.options.fPIC
  35         del self.settings.compiler.libcxx
  36         del self.settings.compiler.cppstd
  37 
  38     def requirements(self):
  39         self.requires("freetype/2.10.4")
  40         self.requires("expat/2.2.10")
  41         if self.settings.os == "Linux":
  42             self.requires("libuuid/1.0.3")
  43         elif self.settings.os == "Macos":
  44             self.requires("libgettext/0.20.1")
  45 
  46     def build_requirements(self):
  47         self.build_requires("gperf/3.1")
  48         self.build_requires("pkgconf/1.7.3")
  49         if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"):
  50             self.build_requires("msys2/20200517")
  51 
  52     def source(self):
  53         tools.get(**self.conan_data["sources"][self.version])
  54         extrated_dir = self.name + "-" + self.version
  55         os.rename(extrated_dir, self._source_subfolder)
  56 
  57     def _configure_autotools(self):
  58         if not self._autotools:
  59             args = ["--enable-static=%s" % ("no" if self.options.shared else "yes"),
  60                     "--enable-shared=%s" % ("yes" if self.options.shared else "no"),
  61                     "--disable-docs"]
  62             args.append("--sysconfdir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "etc")))
  63             args.append("--datadir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "share")))
  64             args.append("--datarootdir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "share")))
  65             args.append("--localstatedir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "var")))
  66             self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows)
  67             self._autotools.libs = []
  68             self._autotools.configure(configure_dir=self._source_subfolder, args=args)
  69             tools.replace_in_file("Makefile", "po-conf test", "po-conf")
  70         return self._autotools
  71 
  72     def _patch_files(self):
  73         #  - fontconfig requires libtool version number, change it for the corresponding freetype one
  74         tools.replace_in_file(os.path.join(self._source_subfolder, 'configure'), '21.0.15', '2.8.1')
  75 
  76     def build(self):
  77         # Patch files from dependencies
  78         self._patch_files()
  79         with tools.run_environment(self):
  80             autotools = self._configure_autotools()
  81             autotools.make()
  82 
  83     def package(self):
  84         self.copy("COPYING", dst="licenses", src=self._source_subfolder)
  85         with tools.run_environment(self):
  86             autotools = self._configure_autotools()
  87             autotools.install()
  88         os.unlink(os.path.join(self.package_folder, "lib", "libfontconfig.la"))
  89         tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
  90         for f in glob.glob(os.path.join(self.package_folder, "bin", "etc", "fonts", "conf.d", "*.conf")):
  91             if os.path.islink(f):
  92                 os.unlink(f)
  93         for def_file in glob.glob(os.path.join(self.package_folder, "lib", "*.def")):
  94             os.remove(def_file)
  95 
  96     def package_info(self):
  97         self.cpp_info.libs = ["fontconfig"]
  98         if self.settings.os in ["Linux", "FreeBSD"]:
  99             self.cpp_info.system_libs.extend(["m", "pthread"])
  100         self.cpp_info.names["cmake_find_package"] = "Fontconfig"
  101         self.cpp_info.names["cmake_find_package_multi"] = "Fontconfig"
  102 
  103         fontconfig_file = os.path.join(self.package_folder, "bin", "etc", "fonts", "fonts.conf")
  104         self.output.info("Creating FONTCONFIG_FILE environment variable: {}".format(fontconfig_file))
  105         self.env_info.FONTCONFIG_FILE = fontconfig_file
  106         fontconfig_path = os.path.join(self.package_folder, "bin", "etc", "fonts")
  107         self.output.info("Creating FONTCONFIG_PATH environment variable: {}".format(fontconfig_path))
  108         self.env_info.FONTCONFIG_PATH = fontconfig_path
  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/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py
  --- a/recipes/fontconfig/all/conanfile.py
  +++ b/recipes/fontconfig/all/conanfile.py
  @@ -40,8 +40,6 @@
           self.requires("expat/2.2.10")
           if self.settings.os == "Linux":
               self.requires("libuuid/1.0.3")
  -        elif self.settings.os == "Macos":
  -            self.requires("libgettext/0.20.1")
   
       def build_requirements(self):
           self.build_requires("gperf/3.1")
  @@ -58,7 +56,9 @@
           if not self._autotools:
               args = ["--enable-static=%s" % ("no" if self.options.shared else "yes"),
                       "--enable-shared=%s" % ("yes" if self.options.shared else "no"),
  -                    "--disable-docs"]
  +                    "--disable-docs",
  +                    "--disable-nls",
  +                   ]
               args.append("--sysconfdir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "etc")))
               args.append("--datadir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "share")))
               args.append("--datarootdir=%s" % tools.unix_path(os.path.join(self.package_folder, "bin", "share")))
  
verification_info: {"golden_diff": "diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py\n--- a/recipes/fontconfig/all/conanfile.py\n+++ b/recipes/fontconfig/all/conanfile.py\n@@ -40,8 +40,6 @@\n         self.requires(\"expat/2.2.10\")\n         if self.settings.os == \"Linux\":\n             self.requires(\"libuuid/1.0.3\")\n-        elif self.settings.os == \"Macos\":\n-            self.requires(\"libgettext/0.20.1\")\n \n     def build_requirements(self):\n         self.build_requires(\"gperf/3.1\")\n@@ -58,7 +56,9 @@\n         if not self._autotools:\n             args = [\"--enable-static=%s\" % (\"no\" if self.options.shared else \"yes\"),\n                     \"--enable-shared=%s\" % (\"yes\" if self.options.shared else \"no\"),\n-                    \"--disable-docs\"]\n+                    \"--disable-docs\",\n+                    \"--disable-nls\",\n+                   ]\n             args.append(\"--sysconfdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"etc\")))\n             args.append(\"--datadir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n             args.append(\"--datarootdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n", "issue": "[package] fontconfig/2.13.93: Please make gettext dependency optional\n### Package and Environment Details (include every applicable attribute)\r\n  * Package Name/Version: **fontconfig/2.13.93**\r\n  * Operating System+version: **MacOs**\r\n\r\nThe current recipe adds an unconditional dependency on libgettext/0.20.1 on MacOs.\r\n\r\nSince libgettext is licensed under GPLv3, it places an additional license restriction to an otherwise more liberally licensed library.\r\n\r\n</details>\r\n\n", "before_files": [{"content": "import os\nimport glob\n\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass FontconfigConan(ConanFile):\n    name = \"fontconfig\"\n    license = \"MIT\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    description = \"Fontconfig is a library for configuring and customizing font access\"\n    homepage = \"https://gitlab.freedesktop.org/fontconfig/fontconfig\"\n    topics = (\"conan\", \"fontconfig\", \"fonts\", \"freedesktop\")\n    settings = \"os\", \"compiler\", \"build_type\", \"arch\"\n    options = {\"shared\": [True, False], \"fPIC\": [True, False]}\n    default_options = {\"shared\": False, \"fPIC\": True}\n    generators = \"pkg_config\"\n\n    _autotools = None\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.settings.compiler == \"Visual Studio\":\n            raise ConanInvalidConfiguration(\"Visual Studio builds are not supported.\")\n        if self.options.shared:\n            del self.options.fPIC\n        del self.settings.compiler.libcxx\n        del self.settings.compiler.cppstd\n\n    def requirements(self):\n        self.requires(\"freetype/2.10.4\")\n        self.requires(\"expat/2.2.10\")\n        if self.settings.os == \"Linux\":\n            self.requires(\"libuuid/1.0.3\")\n        elif self.settings.os == \"Macos\":\n            self.requires(\"libgettext/0.20.1\")\n\n    def build_requirements(self):\n        self.build_requires(\"gperf/3.1\")\n        self.build_requires(\"pkgconf/1.7.3\")\n        if tools.os_info.is_windows and not tools.get_env(\"CONAN_BASH_PATH\"):\n            self.build_requires(\"msys2/20200517\")\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        extrated_dir = self.name + \"-\" + self.version\n        os.rename(extrated_dir, self._source_subfolder)\n\n    def _configure_autotools(self):\n        if not self._autotools:\n            args = [\"--enable-static=%s\" % (\"no\" if self.options.shared else \"yes\"),\n                    \"--enable-shared=%s\" % (\"yes\" if self.options.shared else \"no\"),\n                    \"--disable-docs\"]\n            args.append(\"--sysconfdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"etc\")))\n            args.append(\"--datadir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n            args.append(\"--datarootdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n            args.append(\"--localstatedir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"var\")))\n            self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows)\n            self._autotools.libs = []\n            self._autotools.configure(configure_dir=self._source_subfolder, args=args)\n            tools.replace_in_file(\"Makefile\", \"po-conf test\", \"po-conf\")\n        return self._autotools\n\n    def _patch_files(self):\n        #  - fontconfig requires libtool version number, change it for the corresponding freetype one\n        tools.replace_in_file(os.path.join(self._source_subfolder, 'configure'), '21.0.15', '2.8.1')\n\n    def build(self):\n        # Patch files from dependencies\n        self._patch_files()\n        with tools.run_environment(self):\n            autotools = self._configure_autotools()\n            autotools.make()\n\n    def package(self):\n        self.copy(\"COPYING\", dst=\"licenses\", src=self._source_subfolder)\n        with tools.run_environment(self):\n            autotools = self._configure_autotools()\n            autotools.install()\n        os.unlink(os.path.join(self.package_folder, \"lib\", \"libfontconfig.la\"))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        for f in glob.glob(os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\", \"conf.d\", \"*.conf\")):\n            if os.path.islink(f):\n                os.unlink(f)\n        for def_file in glob.glob(os.path.join(self.package_folder, \"lib\", \"*.def\")):\n            os.remove(def_file)\n\n    def package_info(self):\n        self.cpp_info.libs = [\"fontconfig\"]\n        if self.settings.os in [\"Linux\", \"FreeBSD\"]:\n            self.cpp_info.system_libs.extend([\"m\", \"pthread\"])\n        self.cpp_info.names[\"cmake_find_package\"] = \"Fontconfig\"\n        self.cpp_info.names[\"cmake_find_package_multi\"] = \"Fontconfig\"\n\n        fontconfig_file = os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\", \"fonts.conf\")\n        self.output.info(\"Creating FONTCONFIG_FILE environment variable: {}\".format(fontconfig_file))\n        self.env_info.FONTCONFIG_FILE = fontconfig_file\n        fontconfig_path = os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\")\n        self.output.info(\"Creating FONTCONFIG_PATH environment variable: {}\".format(fontconfig_path))\n        self.env_info.FONTCONFIG_PATH = fontconfig_path\n", "path": "recipes/fontconfig/all/conanfile.py"}], "after_files": [{"content": "import os\nimport glob\n\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass FontconfigConan(ConanFile):\n    name = \"fontconfig\"\n    license = \"MIT\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    description = \"Fontconfig is a library for configuring and customizing font access\"\n    homepage = \"https://gitlab.freedesktop.org/fontconfig/fontconfig\"\n    topics = (\"conan\", \"fontconfig\", \"fonts\", \"freedesktop\")\n    settings = \"os\", \"compiler\", \"build_type\", \"arch\"\n    options = {\"shared\": [True, False], \"fPIC\": [True, False]}\n    default_options = {\"shared\": False, \"fPIC\": True}\n    generators = \"pkg_config\"\n\n    _autotools = None\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.settings.compiler == \"Visual Studio\":\n            raise ConanInvalidConfiguration(\"Visual Studio builds are not supported.\")\n        if self.options.shared:\n            del self.options.fPIC\n        del self.settings.compiler.libcxx\n        del self.settings.compiler.cppstd\n\n    def requirements(self):\n        self.requires(\"freetype/2.10.4\")\n        self.requires(\"expat/2.2.10\")\n        if self.settings.os == \"Linux\":\n            self.requires(\"libuuid/1.0.3\")\n\n    def build_requirements(self):\n        self.build_requires(\"gperf/3.1\")\n        self.build_requires(\"pkgconf/1.7.3\")\n        if tools.os_info.is_windows and not tools.get_env(\"CONAN_BASH_PATH\"):\n            self.build_requires(\"msys2/20200517\")\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        extrated_dir = self.name + \"-\" + self.version\n        os.rename(extrated_dir, self._source_subfolder)\n\n    def _configure_autotools(self):\n        if not self._autotools:\n            args = [\"--enable-static=%s\" % (\"no\" if self.options.shared else \"yes\"),\n                    \"--enable-shared=%s\" % (\"yes\" if self.options.shared else \"no\"),\n                    \"--disable-docs\",\n                    \"--disable-nls\",\n                   ]\n            args.append(\"--sysconfdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"etc\")))\n            args.append(\"--datadir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n            args.append(\"--datarootdir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"share\")))\n            args.append(\"--localstatedir=%s\" % tools.unix_path(os.path.join(self.package_folder, \"bin\", \"var\")))\n            self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows)\n            self._autotools.libs = []\n            self._autotools.configure(configure_dir=self._source_subfolder, args=args)\n            tools.replace_in_file(\"Makefile\", \"po-conf test\", \"po-conf\")\n        return self._autotools\n\n    def _patch_files(self):\n        #  - fontconfig requires libtool version number, change it for the corresponding freetype one\n        tools.replace_in_file(os.path.join(self._source_subfolder, 'configure'), '21.0.15', '2.8.1')\n\n    def build(self):\n        # Patch files from dependencies\n        self._patch_files()\n        with tools.run_environment(self):\n            autotools = self._configure_autotools()\n            autotools.make()\n\n    def package(self):\n        self.copy(\"COPYING\", dst=\"licenses\", src=self._source_subfolder)\n        with tools.run_environment(self):\n            autotools = self._configure_autotools()\n            autotools.install()\n        os.unlink(os.path.join(self.package_folder, \"lib\", \"libfontconfig.la\"))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        for f in glob.glob(os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\", \"conf.d\", \"*.conf\")):\n            if os.path.islink(f):\n                os.unlink(f)\n        for def_file in glob.glob(os.path.join(self.package_folder, \"lib\", \"*.def\")):\n            os.remove(def_file)\n\n    def package_info(self):\n        self.cpp_info.libs = [\"fontconfig\"]\n        if self.settings.os in [\"Linux\", \"FreeBSD\"]:\n            self.cpp_info.system_libs.extend([\"m\", \"pthread\"])\n        self.cpp_info.names[\"cmake_find_package\"] = \"Fontconfig\"\n        self.cpp_info.names[\"cmake_find_package_multi\"] = \"Fontconfig\"\n\n        fontconfig_file = os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\", \"fonts.conf\")\n        self.output.info(\"Creating FONTCONFIG_FILE environment variable: {}\".format(fontconfig_file))\n        self.env_info.FONTCONFIG_FILE = fontconfig_file\n        fontconfig_path = os.path.join(self.package_folder, \"bin\", \"etc\", \"fonts\")\n        self.output.info(\"Creating FONTCONFIG_PATH environment variable: {}\".format(fontconfig_path))\n        self.env_info.FONTCONFIG_PATH = fontconfig_path\n", "path": "recipes/fontconfig/all/conanfile.py"}]}