1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name osxfuse |
---|
7 | version 2.6.2 |
---|
8 | categories fuse devel |
---|
9 | platforms macosx |
---|
10 | license BSD APSL |
---|
11 | maintainers dports openmaintainer |
---|
12 | description A FUSE-Compliant File System Implementation Mechanism \ |
---|
13 | for Mac OS X |
---|
14 | |
---|
15 | long_description FUSE for OS X implements a mechanism that makes it possible to implement \ |
---|
16 | a fully functional file system in a user-space program on Mac OS X. It \ |
---|
17 | aims to be API-compliant with the FUSE (File-system in USErspace) \ |
---|
18 | mechanism that originated on Linux. Therefore, many existing FUSE file \ |
---|
19 | systems become readily usable on Mac OS X. This port provides the \ |
---|
20 | user-space library and header files for building filesystems. |
---|
21 | |
---|
22 | homepage http://osxfuse.github.io/ |
---|
23 | |
---|
24 | distfiles |
---|
25 | set mp.dist { |
---|
26 | osxfuse 6423b85 {rmd160 015d1c3a82a1f90b3695bcac4e238583e7d34d65 sha256 f093a9d91c8a0d30902c2d203617876e16f3d12391fb878d6df9539da9c56555} |
---|
27 | kext 634518a {rmd160 562adbcae55b87065f347888f0068d564117d469 sha256 b0c4f0e6e1fe46799a0ac36cd05864df72304e50bd4954fd986d1a5626b7fd38} |
---|
28 | framework 5aa704c {rmd160 608c5f88d4f8178fbb2560244fe0effe62e70cc7 sha256 611e50f0e6dda47ac3cc1e88b2baa468c52eda6f6c1b6859fe29985184f48058} |
---|
29 | prefpane 226437b {rmd160 d66a6cf9c5703ab8768feedc65e8ff6ba61c78ea sha256 f8233ae4d1455365223e32a51d4f1d2a399d983f07b3c1efe9891f450a1a9828} |
---|
30 | fuse ca2210f {rmd160 ec2a232f416233e678d0687557873a12058cb012 sha256 2b9279cc5f0f4582fc4829c68b6c949a23f1118dfa5227de055a44c67f733415} |
---|
31 | support c5eb518 {rmd160 bcef5963e192d0651ae1c87042944387cdf562d1 sha256 da9076bf2da0cd6304b6fe4075ecfcca1fd398548d3c04159dd9225ea3c6a343} |
---|
32 | } |
---|
33 | set mp.osxfuse_rev [lindex ${mp.dist} [expr [lsearch ${mp.dist} osxfuse] + 1]] |
---|
34 | worksrcdir osxfuse-osxfuse-${mp.osxfuse_rev} |
---|
35 | |
---|
36 | foreach { mp.comp mp.rev mp.chksum } ${mp.dist} { |
---|
37 | set f ${mp.comp}-${mp.rev}.tar.gz |
---|
38 | master_sites-append https://github.com/osxfuse/${mp.comp}/tarball/${mp.rev}/:${mp.comp} |
---|
39 | distfiles-append ${f}:${mp.comp} |
---|
40 | checksums-append ${f} |
---|
41 | foreach {type chksum} ${mp.chksum} { |
---|
42 | checksums-append ${type} ${chksum} |
---|
43 | } |
---|
44 | } |
---|
45 | |
---|
46 | post-extract { |
---|
47 | foreach { mp.comp mp.rev mp.chksum } ${mp.dist} { |
---|
48 | if {${mp.comp} ne "osxfuse"} { |
---|
49 | # Replace existing empty directory if it exists |
---|
50 | file delete ${workpath}/${worksrcdir}/${mp.comp} |
---|
51 | move ${workpath}/osxfuse-${mp.comp}-${mp.rev} ${workpath}/${worksrcdir}/${mp.comp} |
---|
52 | } |
---|
53 | } |
---|
54 | } |
---|
55 | |
---|
56 | patchfiles patch-buildsystem.diff \ |
---|
57 | patch-kext-location.diff |
---|
58 | |
---|
59 | post-patch { |
---|
60 | # Perhaps the ports sandbox does not let us write to /tmp. |
---|
61 | # For a quick and temporary fix use this reinplace. |
---|
62 | file mkdir ${workpath}/tmp |
---|
63 | reinplace "s,@@TMP@@,${workpath}/tmp,g" ${worksrcpath}/build.sh |
---|
64 | |
---|
65 | # Only build the archs we want, not the hardcoded universal archs |
---|
66 | reinplace -E "s,@@ARCHS@@,[get_canonical_archs],g" ${worksrcpath}/build.sh |
---|
67 | |
---|
68 | # Inject the destroot path as the buildsystem tries to write to the prefix directly |
---|
69 | reinplace -E "s,@@DESTROOT@@,${destroot},g" ${worksrcpath}/build.sh |
---|
70 | |
---|
71 | # Correct the location of the kext |
---|
72 | reinplace -E "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/kext/common/fuse_param.h |
---|
73 | } |
---|
74 | |
---|
75 | use_configure no |
---|
76 | |
---|
77 | build.cmd ./build.sh |
---|
78 | # Yes, they really named this target homebrew |
---|
79 | build.target -t homebrew |
---|
80 | build.args -f ${prefix} |
---|
81 | |
---|
82 | # The build step already does everything |
---|
83 | destroot {} |
---|
84 | |
---|
85 | # Move filesystem bundle into place |
---|
86 | post-destroot { |
---|
87 | # Set proper permissions |
---|
88 | fs-traverse f ${destroot}${prefix}/Library { |
---|
89 | file attributes $f -owner root -group wheel |
---|
90 | } |
---|
91 | # Enable setuid on helper binary |
---|
92 | file attributes ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs -permissions 04755 |
---|
93 | } |
---|
94 | destroot.violate_mtree yes |
---|
95 | |
---|
96 | # FIXME: Add specific instructions how to unmount and reload kext |
---|
97 | notes { |
---|
98 | When upgrading, unmount all FUSE filesystems and then reload the kernel extension. |
---|
99 | If unsure how to do that, just reboot your computer now. |
---|
100 | } |
---|
101 | |
---|
102 | # Could probably be supported by setting ARCHS correctly above |
---|
103 | universal_variant no |
---|