Skip to content

macfuse: add fs_link variant #28398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions fuse/macfuse/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- 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

Check warning on line 1 in fuse/macfuse/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test macfuse: Warning: macfuse is configured to build for the architecture(s) 'arm64', but installed Mach-O files built for the following archs: Warning: x86_64: Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.11/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.12/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.9/macfuse.kext/Contents/MacOS/macfuse Warning: arm64,x86_64: Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/11/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/12/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/14/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/mount_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/uninstall_macfuse.app/Contents/MacOS/applet Warning: /opt/local/Library/Frameworks/macFUSE.framework/Versions/A/macFUSE Warning: /opt/local/lib/libfuse.2.dylib Warning: /opt/local/lib/libfuse3.4.dylib Warning:

Check warning on line 1 in fuse/macfuse/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test macfuse: Warning: macfuse is configured to build for the architecture(s) 'x86_64', but installed Mach-O files built for the following archs: Warning: arm64,x86_64: Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/11/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/12/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/14/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/mount_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/uninstall_macfuse.app/Contents/MacOS/applet Warning: /opt/local/Library/Frameworks/macFUSE.framework/Versions/A/macFUSE Warning: /opt/local/lib/libfuse.2.dylib Warning: /opt/local/lib/libfuse3.4.dylib Warning:

Check warning on line 1 in fuse/macfuse/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port test macfuse: Warning: macfuse is configured to build for the architecture(s) 'arm64', but installed Mach-O files built for the following archs: Warning: x86_64: Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.11/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.12/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/10.9/macfuse.kext/Contents/MacOS/macfuse Warning: arm64,x86_64: Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/11/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/12/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Extensions/14/macfuse.kext/Contents/MacOS/macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/mount_macfuse Warning: /opt/local/Library/Filesystems/macfuse.fs/Contents/Resources/uninstall_macfuse.app/Contents/MacOS/applet Warning: /opt/local/Library/Frameworks/macFUSE.framework/Versions/A/macFUSE Warning: /opt/local/lib/libfuse.2.dylib Warning: /opt/local/lib/libfuse3.4.dylib Warning:

PortSystem 1.0
PortGroup github 1.0
Expand Down Expand Up @@ -61,7 +61,8 @@
}
}

set dir /Library/Filesystems/macfuse.fs
set fs_dir /Library/Filesystems
set dir ${fs_dir}/macfuse.fs

destroot {
copy ${pkg}/Library/Filesystems ${destroot}${prefix}/Library
Expand All @@ -73,11 +74,25 @@
reinplace "s|/usr/local|${prefix}|g" {*}[glob ${destroot}${prefix}/lib/pkgconfig/*]
copy {*}[glob -type f ${pkg}/usr/local/lib/*] ${destroot}${prefix}/lib
# remove unwanted files like ._uninstall_macfuse.app
system "find ${destroot}${prefix} -type f -iname '._*' -delete"
system "find ${destroot}${prefix} -type f -iname '._*' -delete"
}

notes "
variant fs_link description "Link ${name} to a .fs bundle in /Library/Filesystems" {
post-destroot {
xinstall -d ${destroot}${fs_dir}
ln -sf ${prefix}${dir} ${destroot}${dir}
}

destroot.violate_mtree \
yes
}

if {![variant_isset fs_link]} {
notes "
Run the following before using macFUSE:

sudo ln -fsn ${prefix}${dir} ${dir}
"

Alternatively, use the +fs_link variant to automatically create this symlink.
"
}