Skip to content
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

dwarfs-fuse-mac 0.10.1 (new formula) #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
72 changes: 72 additions & 0 deletions Formula/dwarfs-fuse-mac.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
require_relative "../require/macfuse"

class DwarfsFuseMac < Formula
desc "Fast high compression read-only file system (macFUSE driver)"
homepage "https://github.com/mhx/dwarfs"
url "https://github.com/mhx/dwarfs/releases/download/v0.10.1/dwarfs-0.10.1.tar.xz"
sha256 "db785e0e0f257fa4363d90153db34127add4552791a72998b30ded787840d039"
license "GPL-3.0-or-later"

depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "dwarfs"
depends_on "llvm" if DevelopmentTools.clang_build_version < 1500
depends_on MacfuseRequirement
depends_on :macos

fails_with :clang do
build 1499
cause "Not all required C++20 features are supported"
end

patch :DATA

def install
args = %W[
-DBUILD_SHARED_LIBS=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
-DWITH_LIBDWARFS=OFF
-DWITH_TOOLS=OFF
-DWITH_FUSE_DRIVER=ON
-DWITH_TESTS=OFF
-DWITH_MAN_PAGES=ON
-DENABLE_PERFMON=ON
-DENABLE_STACKTRACE=OFF
-DDISABLE_CCACHE=ON
-DDISABLE_MOLD=ON
]

if DevelopmentTools.clang_build_version < 1500
ENV.llvm_clang

# Needed in order to find the C++ standard library
# See: https://github.com/Homebrew/homebrew-core/issues/178435
ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/c++ -L#{Formula["llvm"].opt_lib} -lunwind"
end

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build", "--parallel"
system "cmake", "--install", "build"
end

test do
system sbin/"dwarfs", "--help"
end
end

__END__
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82ac9be3..28e2f3f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -332,6 +332,10 @@ if(WITH_FUSE_DRIVER)
elseif(APPLE)
target_compile_definitions(dwarfs_main PRIVATE FUSE_USE_VERSION=29)
target_link_libraries(dwarfs_main PRIVATE PkgConfig::FUSE)
+ find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED CONFIG OPTIONAL_COMPONENTS process)
+ if(TARGET Boost::process)
+ target_link_libraries(dwarfs_main PRIVATE Boost::process)
+ endif()
else()
target_compile_definitions(dwarfs_main PRIVATE FUSE_USE_VERSION=35)
target_link_libraries(dwarfs_main PRIVATE PkgConfig::FUSE3)