summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/macfuse/package.py
blob: 256068fa40bd03e9712fbf6775b456aaf8272051 (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
# Copyright 2013-2023 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 Macfuse(Package):
    """FUSE for macOS allows you to extend macOS via third party file systems."""

    homepage = "https://osxfuse.github.io/"
    git = "https://github.com/osxfuse/osxfuse.git"
    has_code = False  # only distributed in binary form

    version("4.1.2")

    provides("fuse")
    conflicts("platform=linux", msg="macfuse does not support linux, use libfuse instead")
    conflicts("platform=cray", msg="macfuse does not support cray, use libfuse instead")

    def install(self, spec, prefix):
        msg = """
macFUSE is only distributed in binary form.
To use macFUSE with Spack, manually download the .dmg from:

    https://github.com/osxfuse/osxfuse/releases

and double-click to install. Once macFUSE is installed,
add it as an external package by running:

    $ spack config edit packages

and add an entry like so:

    packages:
      macfuse:
        buildable: false
        externals:
        - spec: macfuse@4.1.2
          prefix: /Library/Frameworks/macFUSE.framework"""

        raise InstallError(msg)

    def setup_dependent_run_environment(self, env, dependent_spec):
        env.set("FUSE_LIBRARY_PATH", self.prefix.macFUSE)