prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [package] jbig/20160605: Fails to build on iOS
  <!-- 
    Please don't forget to update the issue title.
    Include all applicable information to help us reproduce your problem.
  -->
  
  ### Package and Environment Details (include every applicable attribute)
    * Package Name/Version: **jbig/20160605**
    * Operating System+version: **iOS 11.0**
    * Compiler+version: **apple-clang 11.0**
    * Conan version: **conan 1.29.2**
    * Python version: **Python 3.8.5**
  
  ### Conan profile
  ```
  [settings]
  arch=x86_64
  arch_build=x86_64
  build_type=Debug
  compiler=apple-clang
  compiler.cppstd=17
  compiler.libcxx=libc++
  compiler.version=11.0
  os=iOS
  os.version=11.0
  os_build=Macos
  [options]
  [build_requires]
  *: darwin-toolchain/1.0.8@theodelrieu/stable
  [env]
  ```
  
  
  ### Steps to reproduce (Include if Applicable)
  
  `conan install jbig/20160605@ --profile ios --build=missing`
  
  ### Logs (Include/Attach if Applicable)
  <details><summary>Click to expand log</summary>
  
  ```
  CMake Error at CMakeLists.txt:31 (install):
    install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
    target "jbgtopbm".
  ```
  
  </details>
  
  I would suggest adding an option that disables the `pbmtojbg` and `jbgtopbm` targets from being generated. The recipe could define individual `build_` options for each, which other packages do, or go with a more generically named option that enables/disables both. For reference, `sqlite3`, `bzip2`, and `spirv-cross` have a `build_executable` option, while `glslang` has a `build_executables` option. 
  
  </issue>
  <code>
  [start of recipes/jbig/all/conanfile.py]
  1 import os
  2 import glob
  3 from conans import ConanFile, CMake, tools
  4 
  5 
  6 class ConanJBig(ConanFile):
  7     name = "jbig"
  8     url = "https://github.com/conan-io/conan-center-index"
  9     homepage = "https://github.com/ImageMagick/jbig"
  10     description = "jbig for the Windows build of ImageMagick"
  11     topics = ("conan", "jbig", "imagemagick", "window", "graphic")
  12     license = "GPL-2.0"
  13     exports_sources = ['CMakeLists.txt', "*.patch"]
  14     generators = 'cmake'
  15     settings = "os", "arch", "compiler", "build_type"
  16     options = {"shared": [True, False], "fPIC": [True, False]}
  17     default_options = {"shared": False, "fPIC": True}
  18 
  19     @property
  20     def _source_subfolder(self):
  21         return "source_subfolder"
  22 
  23     @property
  24     def _build_subfolder(self):
  25         return "build_subfolder"
  26 
  27     def source(self):
  28         tools.get(**self.conan_data["sources"][self.version])
  29         for extracted_dir in glob.glob("jbig-*"):
  30             os.rename(extracted_dir, self._source_subfolder)
  31 
  32     def config_options(self):
  33         if self.settings.os == "Windows":
  34             del self.options.fPIC
  35 
  36     def configure(self):
  37         del self.settings.compiler.libcxx
  38         del self.settings.compiler.cppstd
  39 
  40     def _configure_cmake(self):
  41         cmake = CMake(self)
  42         cmake.configure(build_folder=self._build_subfolder)
  43         return cmake
  44 
  45     def build(self):
  46         for patch in self.conan_data["patches"][self.version]:
  47             tools.patch(**patch)
  48         cmake = self._configure_cmake()
  49         cmake.build()
  50 
  51     def package(self):
  52         self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder)
  53         cmake = self._configure_cmake()
  54         cmake.install()
  55 
  56     def package_info(self):
  57         bindir = os.path.join(self.package_folder, "bin")
  58         self.output.info("Appending PATH environment variable: {}".format(bindir))
  59         self.env_info.PATH.append(bindir)
  60         self.cpp_info.libs = [self.name]
  61         if self.options.shared and self.settings.compiler == "Visual Studio":
  62             self.cpp_info.defines = ["_JBIGDLL_"]
  63
  [end of recipes/jbig/all/conanfile.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/recipes/jbig/all/conanfile.py b/recipes/jbig/all/conanfile.py
  --- a/recipes/jbig/all/conanfile.py
  +++ b/recipes/jbig/all/conanfile.py
  @@ -13,8 +13,18 @@
       exports_sources = ['CMakeLists.txt', "*.patch"]
       generators = 'cmake'
       settings = "os", "arch", "compiler", "build_type"
  -    options = {"shared": [True, False], "fPIC": [True, False]}
  -    default_options = {"shared": False, "fPIC": True}
  +    options = {
  +        "shared": [True, False],
  +        "fPIC": [True, False],
  +        "build_executables": [True, False]
  +    }
  +    default_options = {
  +        "shared": False,
  +        "fPIC": True,
  +        "build_executables": True
  +    }
  +
  +    _cmake = None
   
       @property
       def _source_subfolder(self):
  @@ -38,9 +48,13 @@
           del self.settings.compiler.cppstd
   
       def _configure_cmake(self):
  -        cmake = CMake(self)
  -        cmake.configure(build_folder=self._build_subfolder)
  -        return cmake
  +        if self._cmake:
  +            return self._cmake
  +
  +        self._cmake = CMake(self)
  +        self._cmake.definitions["BUILD_EXECUTABLES"] = self.options.build_executables
  +        self._cmake.configure(build_folder=self._build_subfolder)
  +        return self._cmake
   
       def build(self):
           for patch in self.conan_data["patches"][self.version]:
  @@ -54,9 +68,11 @@
           cmake.install()
   
       def package_info(self):
  -        bindir = os.path.join(self.package_folder, "bin")
  -        self.output.info("Appending PATH environment variable: {}".format(bindir))
  -        self.env_info.PATH.append(bindir)
           self.cpp_info.libs = [self.name]
           if self.options.shared and self.settings.compiler == "Visual Studio":
               self.cpp_info.defines = ["_JBIGDLL_"]
  +
  +        if self.options.build_executables:
  +            bin_path = os.path.join(self.package_folder, "bin")
  +            self.output.info("Appending PATH environment variable: {}".format(bin_path))
  +            self.env_info.PATH.append(bin_path)
  
verification_info: {"golden_diff": "diff --git a/recipes/jbig/all/conanfile.py b/recipes/jbig/all/conanfile.py\n--- a/recipes/jbig/all/conanfile.py\n+++ b/recipes/jbig/all/conanfile.py\n@@ -13,8 +13,18 @@\n     exports_sources = ['CMakeLists.txt', \"*.patch\"]\n     generators = 'cmake'\n     settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n-    options = {\"shared\": [True, False], \"fPIC\": [True, False]}\n-    default_options = {\"shared\": False, \"fPIC\": True}\n+    options = {\n+        \"shared\": [True, False],\n+        \"fPIC\": [True, False],\n+        \"build_executables\": [True, False]\n+    }\n+    default_options = {\n+        \"shared\": False,\n+        \"fPIC\": True,\n+        \"build_executables\": True\n+    }\n+\n+    _cmake = None\n \n     @property\n     def _source_subfolder(self):\n@@ -38,9 +48,13 @@\n         del self.settings.compiler.cppstd\n \n     def _configure_cmake(self):\n-        cmake = CMake(self)\n-        cmake.configure(build_folder=self._build_subfolder)\n-        return cmake\n+        if self._cmake:\n+            return self._cmake\n+\n+        self._cmake = CMake(self)\n+        self._cmake.definitions[\"BUILD_EXECUTABLES\"] = self.options.build_executables\n+        self._cmake.configure(build_folder=self._build_subfolder)\n+        return self._cmake\n \n     def build(self):\n         for patch in self.conan_data[\"patches\"][self.version]:\n@@ -54,9 +68,11 @@\n         cmake.install()\n \n     def package_info(self):\n-        bindir = os.path.join(self.package_folder, \"bin\")\n-        self.output.info(\"Appending PATH environment variable: {}\".format(bindir))\n-        self.env_info.PATH.append(bindir)\n         self.cpp_info.libs = [self.name]\n         if self.options.shared and self.settings.compiler == \"Visual Studio\":\n             self.cpp_info.defines = [\"_JBIGDLL_\"]\n+\n+        if self.options.build_executables:\n+            bin_path = os.path.join(self.package_folder, \"bin\")\n+            self.output.info(\"Appending PATH environment variable: {}\".format(bin_path))\n+            self.env_info.PATH.append(bin_path)\n", "issue": "[package] jbig/20160605: Fails to build on iOS\n<!-- \r\n  Please don't forget to update the issue title.\r\n  Include all applicable information to help us reproduce your problem.\r\n-->\r\n\r\n### Package and Environment Details (include every applicable attribute)\r\n  * Package Name/Version: **jbig/20160605**\r\n  * Operating System+version: **iOS 11.0**\r\n  * Compiler+version: **apple-clang 11.0**\r\n  * Conan version: **conan 1.29.2**\r\n  * Python version: **Python 3.8.5**\r\n\r\n### Conan profile\r\n```\r\n[settings]\r\narch=x86_64\r\narch_build=x86_64\r\nbuild_type=Debug\r\ncompiler=apple-clang\r\ncompiler.cppstd=17\r\ncompiler.libcxx=libc++\r\ncompiler.version=11.0\r\nos=iOS\r\nos.version=11.0\r\nos_build=Macos\r\n[options]\r\n[build_requires]\r\n*: darwin-toolchain/1.0.8@theodelrieu/stable\r\n[env]\r\n```\r\n\r\n\r\n### Steps to reproduce (Include if Applicable)\r\n\r\n`conan install jbig/20160605@ --profile ios --build=missing`\r\n\r\n### Logs (Include/Attach if Applicable)\r\n<details><summary>Click to expand log</summary>\r\n\r\n```\r\nCMake Error at CMakeLists.txt:31 (install):\r\n  install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable\r\n  target \"jbgtopbm\".\r\n```\r\n\r\n</details>\r\n\r\nI would suggest adding an option that disables the `pbmtojbg` and `jbgtopbm` targets from being generated. The recipe could define individual `build_` options for each, which other packages do, or go with a more generically named option that enables/disables both. For reference, `sqlite3`, `bzip2`, and `spirv-cross` have a `build_executable` option, while `glslang` has a `build_executables` option. \n", "before_files": [{"content": "import os\nimport glob\nfrom conans import ConanFile, CMake, tools\n\n\nclass ConanJBig(ConanFile):\n    name = \"jbig\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    homepage = \"https://github.com/ImageMagick/jbig\"\n    description = \"jbig for the Windows build of ImageMagick\"\n    topics = (\"conan\", \"jbig\", \"imagemagick\", \"window\", \"graphic\")\n    license = \"GPL-2.0\"\n    exports_sources = ['CMakeLists.txt', \"*.patch\"]\n    generators = 'cmake'\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\"shared\": [True, False], \"fPIC\": [True, False]}\n    default_options = {\"shared\": False, \"fPIC\": True}\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    @property\n    def _build_subfolder(self):\n        return \"build_subfolder\"\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        for extracted_dir in glob.glob(\"jbig-*\"):\n            os.rename(extracted_dir, self._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        del self.settings.compiler.libcxx\n        del self.settings.compiler.cppstd\n\n    def _configure_cmake(self):\n        cmake = CMake(self)\n        cmake.configure(build_folder=self._build_subfolder)\n        return cmake\n\n    def build(self):\n        for patch in self.conan_data[\"patches\"][self.version]:\n            tools.patch(**patch)\n        cmake = self._configure_cmake()\n        cmake.build()\n\n    def package(self):\n        self.copy(pattern=\"COPYING\", dst=\"licenses\", src=self._source_subfolder)\n        cmake = self._configure_cmake()\n        cmake.install()\n\n    def package_info(self):\n        bindir = os.path.join(self.package_folder, \"bin\")\n        self.output.info(\"Appending PATH environment variable: {}\".format(bindir))\n        self.env_info.PATH.append(bindir)\n        self.cpp_info.libs = [self.name]\n        if self.options.shared and self.settings.compiler == \"Visual Studio\":\n            self.cpp_info.defines = [\"_JBIGDLL_\"]\n", "path": "recipes/jbig/all/conanfile.py"}]}