internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: spack/spack

Issue:
cgal 4.9.1 checksum wrong.
Tried to install a package and the `cgal` chosen by concretisation wasn't installed as the checksum was wrong:

```sh
spack install gcc@7.2.0
spack load gcc@7.2.0
spack compilers find
spack unload gcc@7.2.0
spack install openfoam-com@1706 ^openmpi@3.0 fabrics=psm2 schedulers=sge
...
ChecksumError: ChecksumError: md5 checksum failed for /data/cs1wf/spack/var/spack/stage/cgal-4.9.1-djhtft2maevtiffwtsak5glyhlb7v7o7/CGAL-4.9.1.tar.gz
    Expected df6517df3320bf6c9de2e1b0361738b9 but got 2c427da202ea4a6f5c8c8fbc6987022e
```

Using Spack commit `1b3b2627761a1f5a792749ff9d6b9c263f5203f9` on Centos 7.4.

Get the same issue if explicitly requesting cgal 4.9 instead.


Discussion:
Do you mind contacting the `cgal` developers and seeing if they silently re-released `cgal@4.9.1`? Sometimes it is a bugfix, other times the download site has been compromised and it is a trojan. See https://github.com/caskroom/homebrew-cask/pull/33354 for an example.
I had similar issue when building openfoam-com.

I contacted Laurent Rineau, release manager of the CGAL project.  The two correct URLs for downloading CGAL-4.9.1 are
https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.9.1/CGAL-4.9.1.zip
https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.9.1/CGAL-4.9.1.tar.xz

The checksums of these two files match what are listed in md5sum.txt and sha256sum.txt, under 4.9.1 release page (https://github.com/CGAL/cgal/releases/tag/releases/CGAL-4.9.1).

The tar.gz version (https://github.com/CGAL/cgal/archive/releases/CGAL-4.9.1.tar.gz) used in spack is generated by github, as a snapshot of the git repository corresponding to the release version, and does not correspond to the CGAL release, per Laurent's reply.

In CGAL-4.11, Laurent has removed the checksums for the .tar.gz tarball, to avoid the ambiguity.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -33,12 +33,13 @@ class Cgal(CMakePackage):
     molecular biology, medical imaging, computer graphics, and robotics.
     """
     homepage = 'http://www.cgal.org/'
-    url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz'
+    url      = 'https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.11/CGAL-4.11.tar.xz'
 
-    version('4.9.1', 'df6517df3320bf6c9de2e1b0361738b9')
-    version('4.9', '7b628db3e5614347f776c046b7666089')
-    version('4.7', '4826714810f3b4c65cac96b90fb03b67')
-    version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d')
+    version('4.11',  '0e9566046e402f8dc514caef11155864')
+    version('4.9.1', '820ef17ffa7ed87af6cc9918a961d966')
+    version('4.9',   'ee31343dbc4bf7b5b7501ec1650e9233')
+    version('4.7',   '623d91fb2ab0a35049dc6098a0f235cc')
+    version('4.6.3', '6953897544d41ffcc63ffe58b32a688f')
 
     variant('shared', default=True,
             description='Enables the build of shared libraries')


Test patch:
Repository: spack/spack

Issue:
spack checksum refers to deprecated md5 command
Passing a URL to spack checksum results in an error referencing a deprecated command #6428.

```console
==> Error: `spack checksum` accepts package names, not URLs. Use `spack md5 <url>` instead.
```



Discussion:

Resolving patch:
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -54,8 +54,7 @@ def setup_parser(subparser):
 def checksum(parser, args):
     # Make sure the user provided a package and not a URL
     if not valid_fully_qualified_module_name(args.package):
-        tty.die("`spack checksum` accepts package names, not URLs. "
-                "Use `spack md5 <url>` instead.")
+        tty.die("`spack checksum` accepts package names, not URLs.")
 
     # Get the package we're going to generate checksums for
     pkg = spack.repo.get(args.package)


Test patch:
Repository: spack/spack

Issue:
spack mirror remove doesn't seem to be working on rzmanta (power 8)
```
rzmanta23{jeg}44: spack mirror list
local_filesystem    file:/usr/global/tools/openspeedshop/oss-dev/spack-mirror-new
rzmanta23{jeg}45: spack mirror remove local_filesystem
==> Removed mirror local_filesystem with url file:/usr/global/tools/openspeedshop/oss-dev/spack-mirror-new
rzmanta23{jeg}46: spack mirror list
local_filesystem    file:/usr/global/tools/openspeedshop/oss-dev/spack-mirror-new
rzmanta23{jeg}47: 
```
```
rzmanta23{jeg}43: spack install openspeedshop%gcc@4.9.3
==> Installing libsigsegv
==> **Fetching file:///usr/global/tools/openspeedshop/oss-dev/spack-mirror-new/li**bsigsegv/libsigsegv-2.11.tar.gz
curl: (37) Couldn't open file /usr/global/tools/openspeedshop/oss-dev/spack-mirror-new/libsigsegv/libsigsegv-2.11.tar.gz
==> Fetching from file:///usr/global/tools/openspeedshop/oss-dev/spack-mirror-new/libsigsegv/libsigsegv-2.11.tar.gz failed.
==> Fetching https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.11.tar.gz
######################################################################## 100.0%
==> Staging archive: /usr/global/tools/openspeedshop/oss-dev/spack/var/spack/stage/libsigsegv-
```


Discussion:
When you created the mirror, did you already download libsigsegv?
The mirror existed prior to my building today.  I had built it and added it for another machine (rzmerl).  I then tried to remove it for the rzmanta build.
Confirmed:
```console
$ spack mirror list
production    file:///home/mculpo/production/spack-mirror

$ spack mirror remove production
==> Removed mirror production with url file:///home/mculpo/production/spack-mirror

$ spack mirror list
production    file:///home/mculpo/production/spack-mirror
```

Resolving patch:
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -445,16 +445,8 @@ def update_config(section, update_data, scope=None):
     validate_section_name(section)  # validate section name
     scope = validate_scope(scope)  # get ConfigScope object from string.
 
-    # read in the config to ensure we've got current data
-    configuration = get_config(section)
-
-    if isinstance(update_data, list):
-        configuration = update_data
-    else:
-        configuration.update(update_data)
-
     # read only the requested section's data.
-    scope.sections[section] = {section: configuration}
+    scope.sections[section] = {section: update_data}
     scope.write_section(section)
 
 


Test patch:
Repository: spack/spack

Issue:
version is not passed to cmark_args
In neovim's package.py line 52 we have
`if version >= Version('0.2.1'):`
which throws the error 
> coerce_versions cannot be called on <type 'function'>

This is appears to be due to the fact that cmake_args does not have access to version.



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py
--- a/var/spack/repos/builtin/packages/neovim/package.py
+++ b/var/spack/repos/builtin/packages/neovim/package.py
@@ -49,7 +49,7 @@ class Neovim(CMakePackage):
 
     def cmake_args(self):
         args = []
-        if version >= Version('0.2.1'):
+        if self.version >= Version('0.2.1'):
             args = ['-DPREFER_LUA=ON']
 
         return args


Test patch:
Repository: spack/spack

Issue:
COINHSL version 2014.1.10 fails to build 
I'm trying to use spack to install coinhsl version 2014.1.10.  For this effort, I modified my coinhsl `package.py` to point to a tar ball with this version.  However, the command:
```
spack install --keep-stage -v coinhsl@2014.01.10%intel@16.0.3 cflags="-g -O0" cppflags="-g -O0" cxxflags="-g -O0" fflags="-g -O0"  arch=linux-rhel7-x86_64
```
fails to build because it seems like coinhsl (at least this version) cannot be built in parallel.  Since I don't have access to the latest version, can somebody let me know if this a problem with the default '2014.01.17` version as well?

### Information on your system
Platform : TOSS3/TOSS (Tri-Lab Operating System Stack)

Relevant configuration details:
compilers.yaml
```
compilers:
- compiler:
    environment: {}
    extra_rpaths: []
    flags: {}
    modules: []
    operating_system: rhel7
    paths:
      cc: /usr/bin/gcc
      cxx: /usr/bin/g++
      f77: /usr/bin/gfortran
      fc: /usr/bin/gfortran
    spec: gcc@4.8.5
    target: x86_64
- compiler:
    environment: {}
    extra_rpaths: []
    modules: []
    operating_system: rhel7
    paths:
      cc: /usr/tce/packages/intel/intel-16.0.3/bin/icc
      cxx: /usr/tce/packages/intel/intel-16.0.3/bin/icpc
      f77: /usr/tce/packages/intel/intel-16.0.3/bin/ifort
      fc: /usr/tce/packages/intel/intel-16.0.3/bin/ifort
    flags:
      cflags: -O0 -g
      cxxflags: -O0 -g
      cppflags: -O0 -g
      fflags: -O0 -g
    spec: intel@16.0.3
    target: x86_64
```

packages.yaml:
```
packages:
  all:
    compiler: [intel, gcc, pgi, clang, xl, nag]
    providers:
      mpi: [mvapich2]
      blas: [netlib-lapack]
      lapack: [netlib-lapack]
  metis:
    version: [4.0.3]
  netlib-lapack:
    paths:
      netlib-lapack@3.4.2: /usr/lib64/
    buildable: False
  mvapich2:
    paths:
      mvapich2@2.2: /usr/tce/packages/mvapich2/mvapich2-2.2-intel-16.0.3/
    buildable: False
  mpich:
    buildable: False
  openmpi:
    buildable: False
  intel-mpi:
    buildable: False
  spectrum-mpi:
    buildable: False
  intel-parallel-studio:
    buildable: False
  cmake:
    paths:
      cmake@3.5.2 arch=linux-rhel7-x86_64: /usr/tce/packages/cmake/cmake-3.5.2/
    buildable: False
  pkg-config:
    paths:
      pkg-config@0.27.1 arch=linux-rhel7-x86_64: /usr/bin/
    buildable: False
  m4:
    paths:
      m4@1.4.16 arch=linux-rhe17-x86_64: /usr/bin/
    buildable: False
```


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/coinhsl/package.py b/var/spack/repos/builtin/packages/coinhsl/package.py
--- a/var/spack/repos/builtin/packages/coinhsl/package.py
+++ b/var/spack/repos/builtin/packages/coinhsl/package.py
@@ -45,3 +45,6 @@ class Coinhsl(AutotoolsPackage):
     url = "file://{0}/coinhsl-archive-2014.01.17.tar.gz".format(os.getcwd())
 
     version('2014.01.17', '9eb3dd40ed034814ed8dfee75b281180c1d9d2ae')
+
+    # CoinHSL fails to build in parallel
+    parallel = False


Test patch:
Repository: spack/spack

Issue:
Spack should set up CC, CXX in llvm module when +clang

### Expected Result

When loading `llvm+clang` the environment should have CC and CXX pointing to it.

### Actual Result

No CC and CXX update of the environment. As such, if you have a system installation compiler (like gcc), loading llvm and running cmake chooses system compiler instead of spack's.

The llvm module has updates to PATH, MANPATH, etc, but no compilers.

### Steps to reproduce the issue

```console
$ spack install llvm@5.0.0
$ spack load llvm
$ env | grep CC
```

### Information on your system

Fedora 26


Discussion:
I think `flang` also suffers from this.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/flang/package.py b/var/spack/repos/builtin/packages/flang/package.py
--- a/var/spack/repos/builtin/packages/flang/package.py
+++ b/var/spack/repos/builtin/packages/flang/package.py
@@ -80,3 +80,8 @@ def post_install(self):
             out.close()
         chmod = which('chmod')
         chmod('+x', flang)
+
+    def setup_environment(self, spack_env, run_env):
+        run_env.set('FC', join_path(self.spec.prefix.bin, 'flang'))
+        run_env.set('F77', join_path(self.spec.prefix.bin, 'flang'))
+        run_env.set('F90', join_path(self.spec.prefix.bin, 'flang'))
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -365,6 +365,10 @@ class Llvm(CMakePackage):
     def setup_environment(self, spack_env, run_env):
         spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
 
+        if '+clang' in self.spec:
+            run_env.set('CC', join_path(self.spec.prefix.bin, 'clang'))
+            run_env.set('CXX', join_path(self.spec.prefix.bin, 'clang++'))
+
     def cmake_args(self):
         spec = self.spec
 


Test patch:
Repository: spack/spack

Issue:
is Cython needed for mpi4py 3.0?
On mpi4py's web-page, they mention Cython is only needed when developing mpi4py, its not needed to build their releases

mpi4py's ``setup.py`` logic seems to confirm this:

```
def build_sources(cmd):
    from distutils.errors import DistutilsError
    has_src = os.path.exists(os.path.join(
        topdir, 'src', 'mpi4py.MPI.c'))
    has_vcs = (os.path.isdir(os.path.join(topdir, '.git')) or
               os.path.isdir(os.path.join(topdir, '.hg' )))
    if (has_src and not has_vcs and not cmd.force): return
    # mpi4py.MPI
    source = 'mpi4py.MPI.pyx'
    depends = ['mpi4py/MPI/*.pyx',
               'mpi4py/MPI/*.pxd',
               'mpi4py/MPI/*.pxi',]
    destdir_h = os.path.join('mpi4py', 'include', 'mpi4py')
    run_cython(source, depends, destdir_h=destdir_h,
               wdir='src', force=cmd.force, VERSION=CYTHON)
```

I checked and their source release for 3.0.0 does contain `src/mpi4py.MPI.c' see the early return:

`if (has_src and not has_vcs and not cmd.force): return`

it seems that the development ver (``develop``) would require cython, but its only being added when 3.0.0 is built:

`    depends_on('py-cython', when='@3.0.0:', type='build')`




Discussion:
@shuds13 Would you like to comment on this? It looks like you added this dependency in #5798. Based on your comment "Add cython dependency for develop version" it sounds like this is really only needed for develop.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -43,4 +43,4 @@ class PyMpi4py(PythonPackage):
     depends_on('python@2.7:2.8,3.3:')
     depends_on('py-setuptools', type='build')
     depends_on('mpi')
-    depends_on('py-cython', when='@3.0.0:', type='build')
+    depends_on('py-cython', when='@develop', type='build')


Test patch:
Repository: spack/spack

Issue:
geant4@10.02.p02 pulls wrong version of qt
`geant4@10.02.p02` requires `qt4` not `qt5`, see

```
     24    -- Using VecGeom install configuration at /cvmfs/oasis.opensciencegrid.org/osg/spack/opt/spack/linux-rhel7-x86_64/gcc-5.3.0/vecgeom-0.3.rc-pwnbkcxok4xg6kvf65c64vpheuqykuzx/lib/CMake/USolids/USolidsConfig.cmake.
  >> 25    CMake Error at /cvmfs/oasis.opensciencegrid.org/osg/spack/opt/spack/linux-rhel7-x86_64/gcc-5.3.0/cmake-3.10.0-f57tuxwjk7p64pq2cfyivrcf7ijcxwzi/share/cmake-3.10/Modules/FindQt4.cmake:1320 (message):
     26      Found unsuitable Qt version "5.9.1" from
     27      /cvmfs/oasis.opensciencegrid.org/osg/spack/opt/spack/linux-rhel7-x86_64/gcc-5.3.0/qt-5.9.1-jsi7xb357uzy36g5rhnrjxqggpcrudse/bin/qmake,
     28      this code requires Qt 4.x
     29    Call Stack (most recent call first):
     30      cmake/Modules/Geant4InterfaceOptions.cmake:117 (find_package)
     31      CMakeLists.txt:80 (include)
```

Need better restrictions:
```
[centos@cvmfs-rhel7-build-machine ~]$ spack spec geant4
Input spec
--------------------------------
geant4

Concretized
--------------------------------
geant4@10.02.p02%gcc@5.3.0 build_type=RelWithDebInfo +qt arch=linux-rhel7-x86_64
[...]
    ^qt@5.9.1%gcc@5.3.0~dbus~examples~gtk~krellpatch~opengl patches=7f34d48d2faaa108dc3fcc47187af1ccd1d37ee0f931b42597b820f03a99864c,c52f72dac7fdff5a296467536cc9ea024d78f94b49903286395f53fd0eb66e5e ~phonon~webkit arch=linux-rhel7-x86_64
[...]
```


Discussion:
Apparently `qt@4.8.6` is broken on EL7 or requires extra sauce on the system. Would be better to turn off `qt` support by default. Opinions? @gartung @JavierCVilla 
Yes. I build without qt and vecgeom by default.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py
--- a/var/spack/repos/builtin/packages/geant4/package.py
+++ b/var/spack/repos/builtin/packages/geant4/package.py
@@ -40,7 +40,7 @@ class Geant4(CMakePackage):
     version('10.02.p01', 'b81f7082a15f6a34b720b6f15c6289cfe4ddbbbdcef0dc52719f71fac95f7f1c')
     version('10.01.p03', '4fb4175cc0dabcd517443fbdccd97439')
 
-    variant('qt', default=True, description='Enable Qt support')
+    variant('qt', default=False, description='Enable Qt support')
 
     depends_on('cmake@3.5:', type='build')
 
@@ -51,7 +51,7 @@ class Geant4(CMakePackage):
     depends_on("zlib")
     depends_on("vecgeom")
     depends_on("xerces-c")
-    depends_on("qt@4.8:", when="+qt")
+    depends_on("qt@4.8:4.999", when="+qt")
 
     def cmake_args(self):
         spec = self.spec


Test patch:
Repository: spack/spack

Issue:
libiconv 1.14 should conflict with newer compilers
@tgamblin 

### Expected Result

I expected libiconv 1.14 to work with gcc 5.3.0 and 6.2.0.

### Actual Result

The build failed and reported
```
../lib/.libs/libiconv.so: undefined reference to 'aliases2_lookup'
```
It worked with gcc 4.9.2.  According to the internet, the inline semantics in newer versions of gcc are causing this problem.  I have not tried libiconv 1.15 and do not know if this is an issue with that version as well.

### Steps to reproduce the issue

```console
spack install libiconv@1.14%gcc@5.3.0
spack install libiconv@1.14%gcc@6.2.0
```


Discussion:
I just tried libiconv@1.15 with gcc@5.3.0, which installed successfully.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py
--- a/var/spack/repos/builtin/packages/libiconv/package.py
+++ b/var/spack/repos/builtin/packages/libiconv/package.py
@@ -40,6 +40,8 @@ class Libiconv(AutotoolsPackage):
     # of C11 any more and thus might not exist.
     patch('gets.patch', when='@1.14')
 
+    conflicts('@1.14', when='%gcc@5:')
+
     def configure_args(self):
         args = ['--enable-extra-encodings']
 


Test patch:
Repository: spack/spack

Issue:
VTK module generation error
Generating a VTK module after installation causes an error.

VTK's package.py has this line in its cmake_args():
``` python
cmake_args = std_cmake_args[:]
```

The error would go away if I replaced the initialization with an empty list. I would submit a fix by I don't know this has side effects.

### Steps to reproduce the issue
``` console
$ spack install vtk ^qt+opengl
...
$ spack module refresh -y --module-type tcl vtk; 
==> Regenerating tcl module files
==> Warning: Could not write module file [<ROOT>/spack/share/spack/modules/linux-centos7-x86_64/vtk/7.1.0]
==> Warning: 	--> global name 'std_cmake_args' is not defined <--
```

### Information on your system
Centos 7


Discussion:
Wait a minute, why in the world are we extending `std_cmake_args`? It's already extended in `CMakePackage`. That might be a holdover from before `CMakePackage` existed. Let me submit a PR to fix this.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -64,8 +64,7 @@ def cmake_args(self):
         qt_ver = spec['qt'].version.up_to(1)
         qt_bin = spec['qt'].prefix.bin
 
-        cmake_args = std_cmake_args[:]
-        cmake_args.extend([
+        cmake_args = [
             '-DBUILD_SHARED_LIBS=ON',
             '-DVTK_RENDERING_BACKEND:STRING={0}'.format(opengl_ver),
             '-DVTK_USE_SYSTEM_HDF5=ON',
@@ -86,7 +85,7 @@ def cmake_args(self):
             '-DVTK_QT_VERSION:STRING={0}'.format(qt_ver),
             '-DQT_QMAKE_EXECUTABLE:PATH={0}/qmake'.format(qt_bin),
             '-DVTK_Group_Qt:BOOL=ON',
-        ])
+        ]
 
         # NOTE: The following definitions are required in order to allow
         # VTK to build with qt~webkit versions (see the documentation for
@@ -99,7 +98,9 @@ def cmake_args(self):
             ])
 
         if spec.satisfies('@:6.1.0'):
-            cmake_args.append('-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY')
-            cmake_args.append('-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY')
+            cmake_args.extend([
+                '-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY',
+                '-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY'
+            ])
 
         return cmake_args


Test patch:
Repository: spack/spack

Issue:
Unable to build qt on CentOS 7 with GCC 7.1.0
This one actually produced a useful error message:
```
WARNING: Could not find XKB config root, use -xkb-config-root to set a path to
XKB configuration data. This is required for keyboard input support.

ERROR: Feature 'opengl' was enabled, but the pre-condition 'features.opengl-desktop || features.opengl-dynamic || features.opengles2' failed.

ERROR: The OpenGL functionality tests failed!
```
Full [spack-build.out](https://github.com/LLNL/spack/files/1195614/spack-build.txt)



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -71,7 +71,9 @@ class Qt(Package):
     # see https://github.com/Homebrew/homebrew-core/pull/5951
     patch('restore-pc-files.patch', when='@5.9: platform=darwin')
 
+    patch('qt3accept.patch', when='@3.3.8b')
     patch('qt3krell.patch', when='@3.3.8b+krellpatch')
+    patch('qt3ptrdiff.patch', when='@3.3.8b')
 
     # see https://bugreports.qt.io/browse/QTBUG-57656
     patch('QTBUG-57656.patch', when='@5.8.0')
@@ -125,9 +127,13 @@ class Qt(Package):
 
     # OpenGL hardware acceleration
     depends_on("mesa", when='@4:+opengl')
+
     depends_on("libxcb", when=sys.platform != 'darwin')
     depends_on("libx11", when=sys.platform != 'darwin')
 
+    if sys.platform != 'darwin':
+        depends_on("libxext", when='@3:4.99')
+
     # Webkit
     depends_on("flex", when='+webkit', type='build')
     depends_on("bison", when='+webkit', type='build')
@@ -368,6 +374,11 @@ def configure(self):
                 '-skip', 'webengine',
             ])
 
+        if '~opengl' in self.spec and self.spec.satisfies('@5.10:'):
+            config_args.extend([
+                '-skip', 'webglplugin',
+            ])
+
         configure('-no-eglfs',
                   '-no-directfb',
                   '-{0}gtk'.format('' if '+gtk' in self.spec else 'no-'),


Test patch: