Repository: spack/spack

Issue:
Installation issue: gnuplot (No spec with name wx)
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:

1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.

We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->

### Steps to reproduce the issue
spack install gnuplot@5.2.8%gcc@8.4.0 +X +cairo +gd +libcerf +pbm +qt +wx 

returns error
Error: KeyError: 'No spec with name wx in gnuplot@5.2.8%gcc@8.4.0+X+cairo+gd+libcerf+pbm+qt+wx patches=ad89f23815fd925889ae78009ba22e6f9e4b12fea389280040cef519deafb052 arch=linux-rhel8-x86_64 ^at-spi2-atk@2 ... (listing all dependencies, etc)

### Information on your system
* **Spack:** 0.14.2
* **Python:** 3.8.2
* **Platform:** linux-rhel8-x86_64


### Additional information

<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-out.txt]()
* [spack-build-env.txt]()

<!-- Some packages have maintainers who have volunteered to debug build failures. Run `spack maintainers <name-of-the-package>` and @mention them here if they exist. -->

### General information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [x ] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x ] I have run `spack maintainers <name-of-the-package>` and @mentioned any maintainers
- [x] I have uploaded the build log and environment files
- [x ] I have searched the issues of this repo and believe this is not a duplicate



Discussion:
[spack-build-env.txt](https://github.com/spack/spack/files/4723935/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/4723938/spack-build-out.txt)
No spack-configure-args.txt created

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py
--- a/var/spack/repos/builtin/packages/gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/gnuplot/package.py
@@ -122,7 +122,7 @@ def configure_args(self):
             options.append('--with-qt=no')
 
         if '+wx' in spec:
-            options.append('--with-wx=%s' % spec['wx'].prefix)
+            options.append('--with-wx=%s' % spec['wxwidgets'].prefix)
         else:
             options.append('--disable-wxwidgets')
 
diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py
--- a/var/spack/repos/builtin/packages/paraver/package.py
+++ b/var/spack/repos/builtin/packages/paraver/package.py
@@ -51,6 +51,6 @@ def install(self, spec, prefix):
                   "--with-paraver=%s" % prefix,
                   "--with-boost=%s" % spec['boost'].prefix,
                   "--with-boost-serialization=boost_serialization",
-                  "--with-wxdir=%s" % spec['wx'].prefix.bin)
+                  "--with-wxdir=%s" % spec['wxwidgets'].prefix.bin)
         make()
         make("install")
diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py
--- a/var/spack/repos/builtin/packages/wxpropgrid/package.py
+++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py
@@ -20,7 +20,7 @@ class Wxpropgrid(Package, SourceforgePackage):
 
     def install(self, spec, prefix):
         configure("--prefix=%s" % prefix, "--with-wxdir=%s" %
-                  spec['wx'].prefix.bin, "--enable-unicode")
+                  spec['wxwidgets'].prefix.bin, "--enable-unicode")
 
         make()
         make("install")


Test patch: