summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/texstudio/package.py
blob: 13d1daba11bd1897a44d8225b6987cd8c3346d3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Texstudio(QMakePackage):
    """TeXstudio is a fully featured LaTeX editor, whose goal is to make
    writing LaTeX documents as easy and comfortable as possible."""

    homepage = "http://www.texstudio.org"
    url      = "https://github.com/texstudio-org/texstudio/archive/2.12.16.tar.gz"
    git      = "https://github.com/texstudio-org/texstudio.git"

    version('master', branch='master')
    version('3.0.1',   sha256='0a2a7d266fecdfa3ea4a454fd66833a54590e610f880c6a97644cdcfc2116191')
    version('3.0.0',   sha256='c1f704f84b2007621c5f8ec7fd3b4cf96693f98fd25724ee8fe9c3dccdc7ab2a')

    version('2.12.16', sha256='a14b8912bfd15d982cfbe5f00deed37ca85fb6e38d3aa0c2dac23b4ecaab0984')
    version('2.12.14', sha256='61df71f368bbf21f865645534f63840fd48dbd2996d6d0188aa26d3b647fede0')
    version('2.12.12', sha256='5978daa806c616f9a1eea231bb613f0bc1037d7d2435ee5ca6b14fe88a2caa8c')
    version('2.12.10', sha256='92cf9cbb536e58a5929611fa40438cd9d7ea6880022cd3c5de0483fd15d3df0b')

    variant('poppler', default=True, description='Compile with Poppler library for internal pdf preview')

    # Base dependencies
    depends_on('poppler+qt', when="+poppler")
    # There is a known issue with QT 5.10
    # See https://github.com/texstudio-org/texstudio/wiki/Compiling
    depends_on('qt@4.4.4:5.9.999,5.11.0:')

    conflicts('target=aarch64:', when='@:2.12.22')

    def qmake_args(self):
        args = ['PREFIX={0}'.format(self.prefix)]

        if (self.spec.satisfies('+poppler')):
            args.append('INCLUDEPATH+={0}'.format(
                self.spec['poppler'].prefix.include))
            args.append('LIBS+={0}'.format(
                self.spec['poppler'].libs.search_flags))
        else:
            args.append('NO_POPPLER_PREVIEW=true')

        return args