prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  problem with xproto
  the xproto could be compile properly but while installing, i come across the following problem
  
  ```
  ==> 'make' '-j8'
  /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
  Making all in specs
  Making all in SIAddresses
  make[3]: Nothing to be done for `all'.
  make[3]: Nothing to be done for `all-am'.
  make[2]: Nothing to be done for `all-am'.
  ==> 'make' '-j8' 'install'
  Making install in specs
  Making install in SIAddresses
  make[3]: Nothing to be done for `install-exec-am'.
  make[3]: Nothing to be done for `install-data-am'.
  make[3]: Nothing to be done for `install-exec-am'.
   /spack/var/spack/stage/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/xproto-7.0.31/install-sh -c -d '/spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto'
   /spack/var/spack/stage/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/xproto-7.0.31/install-sh -c -d '/spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto'
  mkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share: File exists
  mkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc: File exists
  mkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto: File exists
  make[3]: *** [install-dist_shelfDATA] Error 1
  make[3]: *** Waiting for unfinished jobs....
  make[2]: *** [install-am] Error 2
  make[1]: *** [install-recursive] Error 1
  make: *** [install-recursive] Error 1
  ```
  
  </issue>
  <code>
  [start of var/spack/repos/builtin/packages/xproto/package.py]
  1 ##############################################################################
  2 # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
  3 # Produced at the Lawrence Livermore National Laboratory.
  4 #
  5 # This file is part of Spack.
  6 # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
  7 # LLNL-CODE-647188
  8 #
  9 # For details, see https://github.com/llnl/spack
  10 # Please also see the NOTICE and LICENSE files for our notice and the LGPL.
  11 #
  12 # This program is free software; you can redistribute it and/or modify
  13 # it under the terms of the GNU Lesser General Public License (as
  14 # published by the Free Software Foundation) version 2.1, February 1999.
  15 #
  16 # This program is distributed in the hope that it will be useful, but
  17 # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
  18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
  19 # conditions of the GNU Lesser General Public License for more details.
  20 #
  21 # You should have received a copy of the GNU Lesser General Public
  22 # License along with this program; if not, write to the Free Software
  23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24 ##############################################################################
  25 from spack import *
  26 
  27 
  28 class Xproto(AutotoolsPackage):
  29     """X Window System Core Protocol.
  30 
  31     This package provides the headers and specification documents defining
  32     the X Window System Core Protocol, Version 11.
  33 
  34     It also includes a number of headers that aren't purely protocol related,
  35     but are depended upon by many other X Window System packages to provide
  36     common definitions and porting layer."""
  37 
  38     homepage = "http://cgit.freedesktop.org/xorg/proto/x11proto"
  39     url      = "https://www.x.org/archive/individual/proto/xproto-7.0.31.tar.gz"
  40 
  41     version('7.0.31', '04b925bf9e472c80f9212615cd684f1e')
  42     version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af')
  43 
  44     depends_on('pkg-config@0.9.0:', type='build')
  45     depends_on('util-macros', type='build')
  46
  [end of var/spack/repos/builtin/packages/xproto/package.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/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py
  --- a/var/spack/repos/builtin/packages/xproto/package.py
  +++ b/var/spack/repos/builtin/packages/xproto/package.py
  @@ -43,3 +43,8 @@
   
       depends_on('pkg-config@0.9.0:', type='build')
       depends_on('util-macros', type='build')
  +
  +    def install(self, spec, prefix):
  +        # Installation fails in parallel
  +        # See https://github.com/LLNL/spack/issues/4805
  +        make('install', parallel=False)
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py\n--- a/var/spack/repos/builtin/packages/xproto/package.py\n+++ b/var/spack/repos/builtin/packages/xproto/package.py\n@@ -43,3 +43,8 @@\n \n     depends_on('pkg-config@0.9.0:', type='build')\n     depends_on('util-macros', type='build')\n+\n+    def install(self, spec, prefix):\n+        # Installation fails in parallel\n+        # See https://github.com/LLNL/spack/issues/4805\n+        make('install', parallel=False)\n", "issue": "problem with xproto\nthe xproto could be compile properly but while installing, i come across the following problem\r\n\r\n```\r\n==> 'make' '-j8'\r\n/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive\r\nMaking all in specs\r\nMaking all in SIAddresses\r\nmake[3]: Nothing to be done for `all'.\r\nmake[3]: Nothing to be done for `all-am'.\r\nmake[2]: Nothing to be done for `all-am'.\r\n==> 'make' '-j8' 'install'\r\nMaking install in specs\r\nMaking install in SIAddresses\r\nmake[3]: Nothing to be done for `install-exec-am'.\r\nmake[3]: Nothing to be done for `install-data-am'.\r\nmake[3]: Nothing to be done for `install-exec-am'.\r\n /spack/var/spack/stage/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/xproto-7.0.31/install-sh -c -d '/spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto'\r\n /spack/var/spack/stage/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/xproto-7.0.31/install-sh -c -d '/spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto'\r\nmkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share: File exists\r\nmkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc: File exists\r\nmkdir: /spack/opt/spack/darwin-sierra-x86_64/clang-3.9.0/xproto-7.0.31-rgclwhmbundqudnhjaavmnvuzceqlgsh/share/doc/xproto: File exists\r\nmake[3]: *** [install-dist_shelfDATA] Error 1\r\nmake[3]: *** Waiting for unfinished jobs....\r\nmake[2]: *** [install-am] Error 2\r\nmake[1]: *** [install-recursive] Error 1\r\nmake: *** [install-recursive] Error 1\r\n```\n", "before_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/llnl/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\nfrom spack import *\n\n\nclass Xproto(AutotoolsPackage):\n    \"\"\"X Window System Core Protocol.\n\n    This package provides the headers and specification documents defining\n    the X Window System Core Protocol, Version 11.\n\n    It also includes a number of headers that aren't purely protocol related,\n    but are depended upon by many other X Window System packages to provide\n    common definitions and porting layer.\"\"\"\n\n    homepage = \"http://cgit.freedesktop.org/xorg/proto/x11proto\"\n    url      = \"https://www.x.org/archive/individual/proto/xproto-7.0.31.tar.gz\"\n\n    version('7.0.31', '04b925bf9e472c80f9212615cd684f1e')\n    version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af')\n\n    depends_on('pkg-config@0.9.0:', type='build')\n    depends_on('util-macros', type='build')\n", "path": "var/spack/repos/builtin/packages/xproto/package.py"}]}