mirror of
https://github.com/gromgit/homebrew-fuse.git
synced 2025-12-05 23:34:43 +00:00
fix FUSE2/3 segregation during build prep
Need to make sure only one FUSE version is visible, so as to avoid build confusion.
This commit is contained in:
parent
0649e8a73e
commit
cc6597f897
1 changed files with 29 additions and 3 deletions
|
|
@ -51,13 +51,25 @@ class Formula
|
|||
|
||||
def setup_fuse_includes
|
||||
mkdir "#{alt_fuse_root}/include" do
|
||||
Dir["/usr/local/include/fuse*"].each { |f| cp_r f, "." }
|
||||
Dir["/usr/local/include/fuse", "/usr/local/include/fuse.h"].each { |f| cp_r f, "." }
|
||||
end
|
||||
end
|
||||
|
||||
def setup_fuse3_includes
|
||||
mkdir "#{alt_fuse_root}/include" do
|
||||
Dir["/usr/local/include/fuse3", "/usr/local/include/fuse.h"].each { |f| cp_r f, "." }
|
||||
end
|
||||
end
|
||||
|
||||
def setup_fuse_libs
|
||||
mkdir "#{alt_fuse_root}/lib" do
|
||||
Dir["/usr/local/lib/*fuse*"].each { |f| cp_r f, "." }
|
||||
Dir["/usr/local/lib/libfuse.*"].each { |f| cp_r f, "." }
|
||||
end
|
||||
end
|
||||
|
||||
def setup_fuse3_libs
|
||||
mkdir "#{alt_fuse_root}/lib" do
|
||||
Dir["/usr/local/lib/libfuse3.*"].each { |f| cp_r f, "." }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -73,6 +85,12 @@ class Formula
|
|||
mkdir "#{alt_fuse_root}/lib/pkgconfig" do
|
||||
cp "/usr/local/lib/pkgconfig/fuse.pc", "."
|
||||
inreplace "fuse.pc", "/usr/local", alt_fuse_root.to_s
|
||||
end
|
||||
ENV.prepend_path "PKG_CONFIG_PATH", "#{alt_fuse_root}/lib/pkgconfig"
|
||||
end
|
||||
|
||||
def setup_fuse3_pkgconfig
|
||||
mkdir "#{alt_fuse_root}/lib/pkgconfig" do
|
||||
cp "/usr/local/lib/pkgconfig/fuse3.pc", "."
|
||||
inreplace "fuse3.pc", "/usr/local", alt_fuse_root.to_s
|
||||
end
|
||||
|
|
@ -92,6 +110,14 @@ class Formula
|
|||
Dir.glob("#{alt_fuse_root}/**/*").each { |f| odebug ">>> #{f}" }
|
||||
end
|
||||
|
||||
def setup_fuse3_env
|
||||
odebug "Setting up FUSE3 temp environment under #{alt_fuse_root}"
|
||||
setup_fuse3_includes
|
||||
setup_fuse3_libs
|
||||
setup_fuse3_pkgconfig
|
||||
Dir.glob("#{alt_fuse_root}/**/*").each { |f| odebug ">>> #{f}" }
|
||||
end
|
||||
|
||||
def disable_macfuse_extensions
|
||||
ENV.append "CFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0"
|
||||
ENV.append "CPPFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0"
|
||||
|
|
@ -159,7 +185,7 @@ class Formula
|
|||
def setup_fuse3
|
||||
return unless need_alt_fuse?
|
||||
|
||||
setup_fuse_env
|
||||
setup_fuse3_env
|
||||
setup_fuse3_flags
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue