source: trunk/dports/fuse/osxfuse/Portfile @ 126905

Last change on this file since 126905 was 126905, checked in by ryandesign@…, 5 years ago

osxfuse: update to 2.7.0 to fix build on Yosemite (#44189)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
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: Portfile 126905 2014-10-17 02:30:31Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                osxfuse
7version             2.7.0
8categories          fuse devel
9platforms           macosx
10license             BSD APSL
11maintainers         dports openmaintainer
12
13description         A FUSE-Compliant File System Implementation Mechanism \
14                    for Mac OS X
15long_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
22homepage            http://osxfuse.github.io/
23
24livecheck.type      regex
25livecheck.url       ${homepage}
26livecheck.regex     "[quotemeta [string toupper ${name}]] (\\d+(?:\\.\\d+)*)"
27
28# We will build user-space components for the specified arch, and
29# kernel modules for the kernel arch.
30set kernel_arch [exec uname -m]
31# If building for different kernel arch than our buildslaves use, force a build
32# from source. The binary package IDs don't encode the kernel arch.
33if {${kernel_arch} ne "x86_64"} {
34    archive_sites
35}
36
37distfiles
38set mp.dist {
39    osxfuse     8eb90a2   {rmd160 563f74f3e17caa644be3f01290f4587aea164a56 sha256 82ad7fe7c2b1c31ef522186f0761fb3ab2817027e5dd5cbe85be690f70e846b1}
40    kext        122937c   {rmd160 b912555b99c832a1a6d2cad9d0b6c667e906c8b5 sha256 723b89ac3c52eea2ed3eeb02fc838886e6d4bce29c605761413d89085a03778e}
41    framework   9fdde8a   {rmd160 4124b3e9c396ee41dfce35d480caff41936b8000 sha256 9dd705e05de0b346000853c08c143a15d73673684afcc9bbcf55e6c71b33fb87}
42    prefpane    99d92a5   {rmd160 04706b6e84b8a2ac2a430b53c66c38f34af92b3f sha256 9d8d2990c0f72e1953f1506f9d84bc18299f4b8b9f691c3ecdc4a98b5a81d20b}
43    fuse        98b9960   {rmd160 589cbe0c819caded56dc4be64727580e1400fd9e sha256 f60205e19c2971228b78d180dc65cda2a6271a567229acdeb19567fcbcebb641}
44    support     4b8cfd3   {rmd160 1c03c561c6c8a0650421393857fb356330ea1926 sha256 b30899548a573968b62c109d3394f12f8ef9f79ab981f8e559ba7ab7be77e58a}
45}
46
47depends_build       port:autoconf \
48                    port:automake \
49                    port:libtool
50
51set mp.osxfuse_rev  [lindex ${mp.dist} [expr [lsearch ${mp.dist} osxfuse] + 1]]
52worksrcdir          osxfuse-osxfuse-${mp.osxfuse_rev}
53
54foreach { mp.comp mp.rev mp.chksum } ${mp.dist} {
55    set f ${mp.comp}-${mp.rev}.tar.gz
56    master_sites-append https://github.com/osxfuse/${mp.comp}/tarball/${mp.rev}/:${mp.comp}
57    distfiles-append    ${f}:${mp.comp}
58    checksums-append    ${f}
59    foreach {type chksum} ${mp.chksum} {
60        checksums-append ${type} ${chksum}
61    }
62}
63
64post-extract {
65    foreach { mp.comp mp.rev mp.chksum } ${mp.dist} {
66        if {${mp.comp} ne "osxfuse"} {
67            # Replace existing empty directory if it exists
68            file delete ${workpath}/${worksrcdir}/${mp.comp}
69            move ${workpath}/osxfuse-${mp.comp}-${mp.rev} ${workpath}/${worksrcdir}/${mp.comp}
70        }
71    }
72}
73
74patchfiles          patch-buildsystem.diff \
75                    patch-kext-location.diff
76
77post-patch {
78    # Perhaps the ports sandbox does not let us write to /tmp.
79    # For a quick and temporary fix use this reinplace.
80    file mkdir ${workpath}/tmp
81    reinplace "s,@@TMP@@,${workpath}/tmp,g" ${worksrcpath}/build.sh
82
83    # Only build the archs we want, not the hardcoded universal archs
84    reinplace -E "s,@@ARCHS@@,[get_canonical_archs],g" ${worksrcpath}/build.sh
85    reinplace -E "s,@@KERNELARCHS@@,${kernel_arch},g" ${worksrcpath}/build.sh
86
87    # Inject the destroot path as the buildsystem tries to write to the prefix directly
88    reinplace -E "s,@@DESTROOT@@,${destroot},g" ${worksrcpath}/build.sh
89
90    # Correct the location of the kext
91    reinplace -E "s,@@PREFIX@@,${prefix},g" ${worksrcpath}/kext/common/fuse_param.h
92}
93
94use_configure   no
95
96build.cmd       ./build.sh
97# Yes, they really named this target homebrew
98build.target    -t homebrew
99build.args      -f ${prefix}
100
101# The build step already does everything
102destroot {}
103
104# Move filesystem bundle into place
105post-destroot {
106    # Set proper permissions
107    fs-traverse f ${destroot}${prefix}/Library {
108        file attributes $f -owner root -group wheel
109    }
110    # Enable setuid on helper binary
111    file attributes ${destroot}${prefix}/Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs -permissions 04755
112}
113destroot.violate_mtree yes
114
115notes {
116    When upgrading, unmount all FUSE filesystems and then unload the kernel extension.
117    Unloading can be done via: sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
118    Alternativley (or if this fails), just reboot your computer now.
119}
120
121# Could probably be supported by setting ARCHS correctly above
122universal_variant no
Note: See TracBrowser for help on using the repository browser.