# -*- 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 # $Id$ PortSystem 1.0 name osxfuse version 3.5.3 set branch [join [lrange [split ${version} .] 0 1] .] categories fuse devel platforms macosx license BSD APSL maintainers dports openmaintainer description A FUSE-Compliant File System Implementation Mechanism \ for Mac OS X long_description FUSE for OS X implements a mechanism that makes it possible to implement \ a fully functional file system in a user-space program on Mac OS X. It \ aims to be API-compliant with the FUSE (File-system in USErspace) \ mechanism that originated on Linux. Therefore, many existing FUSE file \ systems become readily usable on Mac OS X. This port provides the \ user-space library and header files for building filesystems. homepage http://osxfuse.github.io/ livecheck.type regex livecheck.url ${homepage} livecheck.regex "FUSE for macOS (\\d+(?:\\.\\d+)*)" # Use the published signed kext for OS 10.9 (Darwin 13) and later. # Don't even fetch and extract the dmg unnecessarily, since the commands don't # work on some earlier OS versions. if {${os.major} >= 13} { set use_signed_kext yes } else { set use_signed_kext no } # We will build user-space components for the specified arch, and # kernel modules for the kernel arch. set kernel_arch [exec uname -m] # If building for different kernel arch than our buildslaves use, force a build # from source. The binary package IDs don't encode the kernel arch. if {${kernel_arch} ne "x86_64"} { archive_sites } distfiles set mp.dist { osxfuse 4edf75f kext bad3919 framework ae7d4de prefpane 3481385 fuse 8c1ba89 support e965716 } depends_build port:autoconf \ port:automake \ port:libtool set mp.osxfuse_rev [lindex ${mp.dist} [expr [lsearch ${mp.dist} osxfuse] + 1]] worksrcdir osxfuse-osxfuse-${mp.osxfuse_rev} foreach { mp.comp mp.rev } ${mp.dist} { set f ${mp.comp}-${mp.rev}.tar.gz master_sites-append https://github.com/osxfuse/${mp.comp}/tarball/${mp.rev}/:${mp.comp} distfiles-append ${f}:${mp.comp} } if { $use_signed_kext } { master_sites-append https://github.com/osxfuse/osxfuse/releases/download/osxfuse-${version} distfiles-append ${name}-${version}.dmg } checksums osxfuse-4edf75f.tar.gz \ rmd160 75d643a7f7aba9d8e5a6ca4f392d11c205004c74 \ sha256 cd3cddd8d89315badd378c6b8b74e0151cb8d9a5f00815e00e83d80d9e241ecf \ kext-bad3919.tar.gz \ rmd160 cddaa500ab06a8933d6bed6626dac2b626ffbaa7 \ sha256 2b870c2fc724c6aed684316d462c11ec95e28d7a6a3a3a18f91ce6afa2f70ded \ framework-ae7d4de.tar.gz \ rmd160 d0dc45d512cdb03987d2a8a90c7aba3a980145bc \ sha256 0616b96fd63e9bdb522b6a3717296ff9bf7132f67bb2467f4fc028f5af3056b7 \ prefpane-3481385.tar.gz \ rmd160 fa8450c70b0ec4fae129973de3f44e56f946413b \ sha256 202154e170d84ec7721619b9d95c9e5449b1c3e65c21547783e59a1424289554 \ fuse-8c1ba89.tar.gz \ rmd160 8034000932e831f8496ae97e583940d9bf80e0f4 \ sha256 2975de98a615d184ba8c0bc98f88fd9f8509d51814e50d3f36a22554e856e9f5 \ support-e965716.tar.gz \ rmd160 32c5416675fff62fa09119a7ccd465fc00872055 \ sha256 1676891805fb82fdd4b1385b6812cb067d6ad0df71caffc13319234d5bc65c43 \ osxfuse-3.5.3.dmg \ rmd160 2164b12e35c68d392c62eee88ff4945973e53308 \ sha256 9d48cbfe360bead9e9fd31bc95e18a90f03be7c4be5b5c62acd7df98c8c0c80b # extract phase will just extract the dmg; post-extract will expand # the tarballs if { $use_signed_kext } { use_dmg yes extract.only ${name}-${version}.dmg } post-extract { # Extract the pkg and the appropriate payload from the binary dmg if { $use_signed_kext } { system -W ${workpath}/${name}-${version} "pkgutil --expand 'FUSE for macOS.pkg' ${workpath}/pkg" system -W ${workpath}/pkg/Core.pkg "gzip -dc Payload | cpio -id" } # Extract the source tarballs foreach { mp.comp mp.rev } ${mp.dist} { if { $use_signed_kext } { system -W ${workpath} "tar -xvf ${distpath}/${mp.comp}-${mp.rev}.tar.gz" } if {${mp.comp} ne "osxfuse"} { # Replace existing empty directory if it exists file delete ${workpath}/${worksrcdir}/${mp.comp} move ${workpath}/osxfuse-${mp.comp}-${mp.rev} ${workpath}/${worksrcdir}/${mp.comp} } } } use_configure no build.cmd ./build.sh -t packagemanager build.target -a build build.args -v 5 \ --build-directory="${workpath}" -- \ -a [join [get_canonical_archs] " -a "] \ --framework-prefix="${prefix}" \ --fsbundle-prefix="${prefix}" \ --library-prefix="${prefix}" # Clear CPATH and LIBRARY_PATH because a ncurses include file # conflicts with the one in MacPorts. It doesn't matter much anyway # because osxfuse doesn't have any dependencies to link against. compiler.cpath compiler.library_path destroot.target -a install destroot.args -v 5 --build-directory="${workpath}" destroot.destdir -- "${destroot}${prefix}" # Move filesystem bundle into place post-destroot { # Set proper permissions fs-traverse f ${destroot}${prefix}/Library { file attributes $f -owner root -group wheel } # Enable setuid on helper binary file attributes ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse -permissions 04755 } # On Mavericks and Yosemite, replace the kext we just built with the # one from the binary distribution. This works around OS X's # unwillingness to load an unsigned kext (and our inability to sign # kexts). See #45521. # # Unlike newer versions, Mavericks does not require the kext to be # signed, but will display a warning if it's unsigned -- so use the # signed binary instead here too. if { $use_signed_kext } { post-destroot { delete ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents/Extensions file copy ${workpath}/pkg/Core.pkg/Library/Filesystems/osxfuse.fs/Contents/Extensions \ ${destroot}${prefix}/Library/Filesystems/osxfuse.fs/Contents } } destroot.violate_mtree yes notes { When upgrading, unmount all FUSE filesystems and then unload the kernel extension. Unloading can be done via: sudo kextunload -b com.github.osxfuse.filesystems.osxfuse Alternatively (or if this fails), just reboot your computer now. } # Could probably be supported by setting ARCHS correctly above universal_variant no