diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2021-05-21 02:22:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 09:22:03 +0200 |
commit | 2d69f63a9c1aa07f0bfd9380573ad6250d3d2207 (patch) | |
tree | 2f5478eaac7f9336c20b0088e65b2e9ae4d982e8 /var | |
parent | 63ea0c88655fa7469314fd04267f8dcb99ee7447 (diff) | |
download | spack-2d69f63a9c1aa07f0bfd9380573ad6250d3d2207.tar.gz spack-2d69f63a9c1aa07f0bfd9380573ad6250d3d2207.tar.bz2 spack-2d69f63a9c1aa07f0bfd9380573ad6250d3d2207.tar.xz spack-2d69f63a9c1aa07f0bfd9380573ad6250d3d2207.zip |
ghostscript: add tesseract variant (#23794)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ghostscript/package.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index 18c60e1396..2cdd2e94d3 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -24,6 +24,9 @@ class Ghostscript(AutotoolsPackage): version('9.21', sha256='02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85') version('9.18', sha256='5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b') + # https://www.ghostscript.com/ocr.html + variant('tesseract', default=False, description='Use the Tesseract library for OCR') + depends_on('pkgconfig', type='build') depends_on('krb5', type='link') @@ -36,6 +39,12 @@ class Ghostscript(AutotoolsPackage): depends_on('libxext') depends_on('gtkplus') + # https://www.ghostscript.com/doc/9.53.0/News.htm + conflicts('+tesseract', when='@:9.52', msg='Tesseract OCR engine added in 9.53.0') + + # https://trac.macports.org/ticket/62832 + conflicts('+tesseract', when='platform=darwin', msg='Tesseract does not build correctly on macOS') + patch('nogoto.patch', when='%fj@:4.1.0') # Related bug report: https://bugs.ghostscript.com/show_bug.cgi?id=702985 @@ -69,12 +78,17 @@ class Ghostscript(AutotoolsPackage): string=True) def configure_args(self): - return [ + args = [ '--disable-compile-inits', '--enable-dynamic', '--with-system-libtiff', ] + if self.spec.satisfies('@9.53:'): + args.extend(self.with_or_without('tesseract')) + + return args + def build(self, spec, prefix): make() make('so') |