summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/ghostscript/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py
index ee14758dd1..d69a10e007 100644
--- a/var/spack/repos/builtin/packages/ghostscript/package.py
+++ b/var/spack/repos/builtin/packages/ghostscript/package.py
@@ -5,6 +5,7 @@
from spack import *
import shutil
+import re
class Ghostscript(AutotoolsPackage):
@@ -13,6 +14,8 @@ class Ghostscript(AutotoolsPackage):
homepage = "http://ghostscript.com/"
url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz"
+ executables = [r'^gs$']
+
version('9.50', sha256='0f53e89fd647815828fc5171613e860e8535b68f7afbc91bf89aee886769ce89')
version('9.27', sha256='9760e8bdd07a08dbd445188a6557cb70e60ccb6a5601f7dbfba0d225e28ce285')
version('9.26', sha256='831fc019bd477f7cc2d481dc5395ebfa4a593a95eb2fe1eb231a97e450d7540d')
@@ -71,3 +74,9 @@ class Ghostscript(AutotoolsPackage):
def install(self, spec, prefix):
make('install')
make('soinstall')
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('--help', output=str, error=str)
+ match = re.search(r'GPL Ghostscript (\S+)', output)
+ return match.group(1) if match else None