forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This formula provides the kernel extension required to run FUSE-based filesystems using fuse4x. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
require 'formula' | ||
|
||
def kext_prefix | ||
prefix + 'Library' + 'Extensions' | ||
end | ||
|
||
class Fuse4xKext < Formula | ||
homepage 'http://fuse4x.org/' | ||
url 'https://github.com/fuse4x/kext.git', :tag => "fuse4x_0_8_12" | ||
version "0.8.12" | ||
|
||
def install | ||
ENV.delete('CC') | ||
ENV.delete('CXX') | ||
|
||
args = [ | ||
"-sdk", | ||
"macosx#{MACOS_VERSION}", | ||
"-configuration", "Release", | ||
"-alltargets", | ||
"MACOSX_DEPLOYMENT_TARGET=#{MACOS_VERSION}", | ||
"SYMROOT=build" | ||
] | ||
# Don't build a multi-arch kext for Leopard---it will fail. | ||
args.concat %w[ARCHS=i386 ONLY_ACTIVE_ARCH=NO] if MacOS.leopard? | ||
|
||
system "/usr/bin/xcodebuild", *args | ||
system "/bin/mkdir -p build/Release/fuse4x.kext/Support" | ||
system "/bin/cp build/Release/load_fuse4x build/Release/fuse4x.kext/Support" | ||
|
||
kext_prefix.install "build/Release/fuse4x.kext" | ||
end | ||
|
||
def caveats | ||
<<-EOS.undent | ||
In order for FUSE-based filesystems to work, the fuse4x kernel extension | ||
must be installed by the root user: | ||
sudo cp -rfX #{kext_prefix}/fuse4x.kext /System/Library/Extensions | ||
EOS | ||
end | ||
end |