summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fox/package.py
blob: 98e44974736447a71dc3a9180514a9716cc12944 (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
48
49
50
51
52
53
# Copyright 2013-2024 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.package import *


class Fox(AutotoolsPackage):
    """FOX is a C++ based Toolkit for developing Graphical User Interfaces
    easily and effectively. It offers a wide, and growing, collection of
    Controls, and provides state of the art facilities such as drag and drop,
    selection, as well as OpenGL widgets for 3D graphical manipulation. FOX
    also implements icons, images, and user-convenience features such as status
    line help, and tooltips. Tooltips may even be used for 3D objects!"""

    homepage = "http://fox-toolkit.org/"
    url = "http://fox-toolkit.org/ftp/fox-1.7.67.tar.gz"

    license("LGPL-3.0-or-later")

    version("1.7.67", sha256="7e511685119ef096fa90d334da46f0e50cfed8d414df32d80a7850442052f57d")
    version(
        "1.6.57",
        preferred=True,
        sha256="65ef15de9e0f3a396dc36d9ea29c158b78fad47f7184780357b929c94d458923",
    )

    patch("no_rexdebug.patch", when="@1.7.67")

    variant("opengl", default=False, description="opengl support")

    depends_on("bzip2")
    depends_on("jpeg")
    depends_on("libpng")
    depends_on("libtiff")
    depends_on("zlib-api")
    depends_on("libx11")
    depends_on("libsm")
    depends_on("libxft")
    depends_on("libxext")
    depends_on("libxcursor")
    depends_on("libxi")
    depends_on("libxrandr")
    depends_on("gl", when="+opengl")
    depends_on("glu", when="+opengl", type="link")

    def configure_args(self):
        # Make the png link flags explicit or it will try to pick up libpng15
        # from system
        args = ["LDFLAGS={0}".format(self.spec["libpng"].libs.search_flags)]
        args += self.with_or_without("opengl")
        return args