You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
98 lines
3.5 KiB
Tcl
98 lines
3.5 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup github 1.0
|
|
|
|
github.setup macfuse macfuse 5.2.0 macfuse-
|
|
revision 1
|
|
conflicts macfuse4 osxfuse
|
|
categories fuse
|
|
platforms {darwin >= 21}
|
|
supported_archs arm64 x86_64
|
|
license Restrictive
|
|
maintainers {makr @mohd-akram} {ra1nb0w @ra1nb0w} openmaintainer
|
|
|
|
description FUSE for macOS
|
|
|
|
long_description FUSE extends macOS by adding support for user space file \
|
|
systems.
|
|
|
|
homepage https://macfuse.github.io/
|
|
|
|
use_dmg yes
|
|
|
|
checksums rmd160 8509bbf212fd26e728ad683f0257b612643fecaa \
|
|
sha256 09a4b4c23c1930af45335fc119696797da41562dec1630602d2db637f4804f27 \
|
|
size 13736858
|
|
|
|
set pkg ${workpath}/pkg/Core.pkg
|
|
|
|
post-extract {
|
|
system -W ${worksrcpath} \
|
|
"pkgutil --expand 'Extras/macFUSE ${version}.pkg' ${workpath}/pkg"
|
|
system -W ${pkg} "gzip -dc Payload | cpio -id"
|
|
}
|
|
|
|
use_configure no
|
|
|
|
set fs_dir /Library/Filesystems
|
|
set dir ${fs_dir}/macfuse.fs
|
|
set mfmount ${dir}/Contents/Frameworks/MFMount.framework/Versions/A/MFMount
|
|
|
|
build {
|
|
system -W ${pkg} "install_name_tool -id ${prefix}${mfmount} \
|
|
Library/Filesystems/macfuse.fs/Contents/Frameworks/MFMount.framework/Versions/A/MFMount"
|
|
system -W ${pkg} "install_name_tool -id ${prefix}/lib/libfuse.2.dylib \
|
|
-change ${mfmount} ${prefix}${mfmount} \
|
|
usr/local/lib/libfuse.2.dylib"
|
|
system -W ${pkg} "install_name_tool -id ${prefix}/lib/libfuse3.4.dylib \
|
|
-change ${mfmount} ${prefix}${mfmount} \
|
|
usr/local/lib/libfuse3.4.dylib"
|
|
system -W ${pkg} "install_name_tool \
|
|
-id ${prefix}/Library/Frameworks/macFUSE.framework/Versions/A/macFUSE \
|
|
-change /usr/local/lib/libfuse.2.dylib ${prefix}/lib/libfuse.2.dylib \
|
|
Library/Frameworks/macFUSE.framework/Versions/A/macFUSE"
|
|
system -W ${pkg} "codesign -fs - \
|
|
usr/local/lib/libfuse.2.dylib \
|
|
usr/local/lib/libfuse3.4.dylib \
|
|
Library/Frameworks/macFUSE.framework/Versions/A/macFUSE \
|
|
Library/Filesystems/macfuse.fs/Contents/Frameworks/MFMount.framework/Versions/A/MFMount"
|
|
reinplace "s|/usr/local|${prefix}|g" {*}[glob ${pkg}/usr/local/lib/pkgconfig/*]
|
|
# remove FSKit extension on versions older than Tahoe
|
|
if {${os.major} < 25} {
|
|
delete ${pkg}${dir}/Contents/Resources/macfuse.app
|
|
delete ${pkg}${dir}/Contents/_CodeSignature
|
|
}
|
|
}
|
|
|
|
destroot {
|
|
copy ${pkg}${fs_dir} ${destroot}${prefix}/Library
|
|
xinstall -W ${pkg}${dir}/Contents/Resources -m 4755 load_macfuse mount_macfuse \
|
|
${destroot}${prefix}${dir}/Contents/Resources
|
|
|
|
copy {*}[glob ${pkg}/Library/Frameworks/*] ${destroot}${prefix}/Library/Frameworks
|
|
|
|
copy {*}[glob ${pkg}/usr/local/include/*] ${destroot}${prefix}/include
|
|
delete ${destroot}${prefix}/lib/pkgconfig
|
|
copy {*}[glob ${pkg}/usr/local/lib/*] ${destroot}${prefix}/lib
|
|
}
|
|
|
|
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.
|
|
"
|
|
}
|