Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
31 changes: 12 additions & 19 deletions Formula/e/edencommon.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Edencommon < Formula
desc "Shared library for Watchman and Eden projects"
homepage "https://github.com/facebookexperimental/edencommon"
url "https://github.com/facebookexperimental/edencommon/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "3b60d7dd939c5844b1758a843a37f42cfafda37536a4396eb3876cee70a844bd"
url "https://github.com/facebookexperimental/edencommon/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "9d8a1cee7f5e95b11f67b7b553940b9e578eb699a33c5a75427b45b8172f8f4c"
license "MIT"
revision 1
head "https://github.com/facebookexperimental/edencommon.git", branch: "main"

bottle do
Expand All @@ -17,29 +16,25 @@
end

depends_on "cmake" => :build
depends_on "fbthrift" => :build
depends_on "gflags" => :build
depends_on "glog" => :build
Comment thread
bevanjkay marked this conversation as resolved.
depends_on "googletest" => :build
depends_on "mvfst" => :build
depends_on "wangle" => :build
depends_on "boost"
depends_on "fb303"
depends_on "fbthrift"
depends_on "fmt"
depends_on "folly"
depends_on "gflags"
depends_on "glog"
depends_on "openssl@3"

def install
# Workaround to build with glog >= 0.7 until fixed upstream
inreplace "CMakeLists.txt", /^find_package\(Glog MODULE /, "# \\0"

# Fix "Process terminated due to timeout" by allowing a longer timeout.
inreplace buildpath.glob("eden/common/{os,utils}/test/CMakeLists.txt"),
/gtest_discover_tests\((.*)\)/,
"gtest_discover_tests(\\1 DISCOVERY_TIMEOUT 60)"
inreplace "eden/common/utils/test/CMakeLists.txt",
/gtest_discover_tests\((.*)\)/,
"gtest_discover_tests(\\1 DISCOVERY_TIMEOUT 60)"
# Related: https://gitlab.kitware.com/cmake/cmake/-/issues/26773
test_cmakelists = %w[
eden/common/os/test/CMakeLists.txt
eden/common/utils/test/CMakeLists.txt
]
inreplace test_cmakelists, /(gtest_discover_tests\(.*)\)/, "\\1 DISCOVERY_TIMEOUT 60)"

# Avoid having to build FBThrift py library
inreplace "CMakeLists.txt", "COMPONENTS cpp2 py)", "COMPONENTS cpp2)"
Expand All @@ -49,9 +44,7 @@
-DBUILD_SHARED_LIBS=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]
linker_flags = %w[-undefined dynamic_lookup -dead_strip_dylibs]
linker_flags << "-ld_classic" if OS.mac? && MacOS.version == :ventura
shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if OS.mac?
shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup -Wl,-dead_strip_dylibs" if OS.mac?

system "cmake", "-S", ".", "-B", "_build", *shared_args, *std_cmake_args
system "cmake", "--build", "_build"
Expand Down
11 changes: 3 additions & 8 deletions Formula/f/fb303.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Fb303 < Formula
desc "Thrift functions for querying information from a service"
homepage "https://github.com/facebook/fb303"
url "https://github.com/facebook/fb303/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "e455652551702d040b9ba7c9e3991f556c851fc513fd28b039a56127a1190dd5"
url "https://github.com/facebook/fb303/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "194c458684b68cc51aec63b44fd7bd41f3260390fa181cc35ece07988a4d37f4"
license "Apache-2.0"
revision 1
head "https://github.com/facebook/fb303.git", branch: "main"

bottle do
Expand All @@ -17,19 +16,15 @@
end

depends_on "cmake" => [:build, :test]
depends_on "fizz" => [:build, :test]
depends_on "mvfst" => [:build, :test]
depends_on "fbthrift"
depends_on "fizz"
depends_on "fmt"
depends_on "folly"
depends_on "gflags"
depends_on "glog"
depends_on "openssl@3"

def install
# Workaround to build with glog >= 0.7 until fixed upstream
inreplace "CMakeLists.txt", /^find_package\(Glog MODULE /, "# \\0"

shared_args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"]
shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac?

Expand Down
9 changes: 4 additions & 5 deletions Formula/f/fbthrift.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Fbthrift < Formula
desc "Facebook's branch of Apache Thrift, including a new C++ server"
homepage "https://github.com/facebook/fbthrift"
url "https://github.com/facebook/fbthrift/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "6601fd362b96160ac9c37c3184153f605e4b09fbc54f3d474cf5cc926a3d62de"
url "https://github.com/facebook/fbthrift/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "666184a82c151b373e313de5d9a673de40ff0dc02ed2018f48cd1d68762771b7"
license "Apache-2.0"
revision 1
head "https://github.com/facebook/fbthrift.git", branch: "main"

bottle do
Expand All @@ -20,6 +19,7 @@
depends_on "bison" => :build # Needs Bison 3.1+
depends_on "cmake" => [:build, :test]
depends_on "mvfst" => [:build, :test]
depends_on "zstd" => :build
depends_on "double-conversion"
depends_on "fizz"
depends_on "fmt"
Expand All @@ -29,7 +29,6 @@
depends_on "openssl@3"
depends_on "wangle"
depends_on "xxhash"
depends_on "zstd"

uses_from_macos "flex" => :build
uses_from_macos "python" => :build
Expand Down Expand Up @@ -97,7 +96,7 @@
# Test CMake package to make sure required dependencies without linkage are kept,
# Link to `FBThrift::transport` as it uses path to `zstd` shared library
(testpath/"CMakeLists.txt").write <<~CMAKE
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 4.0)
project(test LANGUAGES CXX)

list(APPEND CMAKE_MODULE_PATH "#{Formula["fizz"].opt_libexec}/cmake")
Expand Down
21 changes: 12 additions & 9 deletions Formula/f/fizz.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Fizz < Formula
desc "C++14 implementation of the TLS-1.3 standard"
homepage "https://github.com/facebookincubator/fizz"
url "https://github.com/facebookincubator/fizz/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "b7ae5196273553ee2d04830120830c1f1604b9e96d78db9b58c2ef2b753580d2"
url "https://github.com/facebookincubator/fizz/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "f5756c8a869ecbff50cc720816bb6c7f99b61b0581edcef0fad7f0b0cb98c3d8"
license "BSD-3-Clause"
revision 1
head "https://github.com/facebookincubator/fizz.git", branch: "main"

bottle do
Expand All @@ -18,11 +17,10 @@
end

depends_on "cmake" => [:build, :test]
depends_on "gflags" => :build
depends_on "libevent" => :build
depends_on "double-conversion"
depends_on "fmt"
depends_on "folly"
depends_on "gflags"
depends_on "glog"
depends_on "libsodium"
depends_on "openssl@3"
Expand All @@ -33,12 +31,17 @@
end

def install
args = ["-DBUILD_TESTS=OFF", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"]
args = %W[
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_SHARED_LIBS=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]
if OS.mac?
# Prevent indirect linkage with boost and snappy.
args += [
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs",
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs",
args += %w[
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs
]
end
system "cmake", "-S", "fizz", "-B", "build", *args, *std_cmake_args
Expand Down
71 changes: 34 additions & 37 deletions Formula/f/folly.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Folly < Formula
desc "Collection of reusable C++ library artifacts developed at Facebook"
homepage "https://github.com/facebook/folly"
url "https://github.com/facebook/folly/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "4b694698c773a3236d6379316f67872db77070d56ea256bec5759964712f9c34"
url "https://github.com/facebook/folly/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "f2a9bbd4bd36256d4554f9917fcefa9ec356cec637d2a743e01a6a1d569224dc"
license "Apache-2.0"
revision 1
head "https://github.com/facebook/folly.git", branch: "main"

bottle do
Expand Down Expand Up @@ -52,15 +51,12 @@
EOS
end

# Workaround to build with glog >= 0.7
# ref: https://github.com/facebook/folly/issues/2171
# ref: https://github.com/facebook/folly/pull/2320
# ref: https://github.com/facebook/folly/pull/2474
# Workaround for arm64 Linux error on duplicate symbols
# Based on https://github.com/facebook/folly/pull/2562
patch :DATA

def install
args = %W[
-DCMAKE_LIBRARY_ARCHITECTURE=#{Hardware::CPU.arch}
args = %w[
-DFOLLY_USE_JEMALLOC=OFF
]

Expand All @@ -79,9 +75,6 @@
end

test do
# Force use of Clang rather than LLVM Clang
ENV.clang if OS.mac?

(testpath/"test.cc").write <<~CPP
#include <folly/FBVector.h>
int main() {
Expand All @@ -94,36 +87,40 @@
return 0;
}
CPP
system ENV.cxx, "-std=c++17", "test.cc", "-I#{include}", "-L#{lib}",
"-lfolly", "-o", "test"
system ENV.cxx, "-std=c++17", "test.cc", "-I#{include}", "-L#{lib}", "-lfolly", "-o", "test"
system "./test"
end
end

__END__
diff --git a/CMake/folly-config.cmake.in b/CMake/folly-config.cmake.in
index 957ae5c56..fe811d7d9 100644
--- a/CMake/folly-config.cmake.in
+++ b/CMake/folly-config.cmake.in
@@ -30,6 +30,7 @@ set(FOLLY_LIBRARIES Folly::folly)
diff --git a/folly/external/aor/CMakeLists.txt b/folly/external/aor/CMakeLists.txt
index e07e58745..1429f54e9 100644
--- a/folly/external/aor/CMakeLists.txt
+++ b/folly/external/aor/CMakeLists.txt
@@ -20,6 +20,10 @@
# Linux ELF directives (.size, etc.) that Darwin's assembler doesn't support
if(IS_AARCH64_ARCH)

# Find folly's dependencies
find_dependency(fmt)
+find_dependency(glog CONFIG)
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_ASM_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_LIBRARY})
+endif()
+
folly_add_library(
NAME memcpy_aarch64
SRCS
@@ -34,6 +38,7 @@ folly_add_library(

set(Boost_USE_STATIC_LIBS "@FOLLY_BOOST_LINK_STATIC@")
find_package(Boost 1.69.0 REQUIRED
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index 2ca5cfec7..a284a91fe 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
@@ -62,7 +62,8 @@ if(LIBGFLAGS_FOUND)
set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
endif()
folly_add_library(
NAME memcpy_aarch64-use
+ EXCLUDE_FROM_MONOLITH
SRCS
memcpy-advsimd.S
memcpy-armv8.S
@@ -58,6 +63,7 @@ folly_add_library(

-find_package(Glog MODULE)
+find_package(GLOG NAMES glog CONFIG REQUIRED)
+set(GLOG_LIBRARY glog::glog)
set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
folly_add_library(
NAME memset_aarch64-use
+ EXCLUDE_FROM_MONOLITH
SRCS
memset-advsimd.S
memset-mops.S
12 changes: 4 additions & 8 deletions Formula/m/mvfst.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Mvfst < Formula
desc "QUIC transport protocol implementation"
homepage "https://github.com/facebook/mvfst"
url "https://github.com/facebook/mvfst/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "5c000c1ad7886a25d434224f85f9b5147acb9d0058497ec7666d843de129fd8a"
url "https://github.com/facebook/mvfst/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "29ca852391e280a56c4a83cae76b9bad6e265bc1eba4ffa06e898fe3d9193e59"
license "MIT"
revision 1
head "https://github.com/facebook/mvfst.git", branch: "main"

bottle do
Expand All @@ -24,14 +23,11 @@
depends_on "folly"
depends_on "gflags"
depends_on "glog"
depends_on "libsodium"
depends_on "openssl@3"

def install
shared_args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"]
linker_flags = %w[-undefined dynamic_lookup -dead_strip_dylibs]
linker_flags << "-ld_classic" if OS.mac? && MacOS.version == :ventura
shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if OS.mac?
shared_args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup -Wl,-dead_strip_dylibs" if OS.mac?

system "cmake", "-S", ".", "-B", "_build", "-DBUILD_TESTS=OFF", *shared_args, *std_cmake_args
system "cmake", "--build", "_build"
Expand All @@ -58,7 +54,7 @@
quic/common/test/TestUtils.cpp
quic/common/test/TestPacketBuilders.cpp
)
target_link_libraries(echo ${mvfst_LIBRARIES} fizz::fizz_test_support GTest::gmock)
target_link_libraries(echo mvfst::mvfst fizz::fizz_test_support GTest::gmock)
target_include_directories(echo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(echo PROPERTIES BUILD_RPATH "#{lib};#{HOMEBREW_PREFIX}/lib")
CMAKE
Expand Down
16 changes: 5 additions & 11 deletions Formula/p/proxygen.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Proxygen < Formula
desc "Collection of C++ HTTP libraries"
homepage "https://github.com/facebook/proxygen"
url "https://github.com/facebook/proxygen/releases/download/v2026.01.12.00/proxygen-v2026.01.12.00.tar.gz"
sha256 "66364e2119618a98f5c3ad62765b53d8bc2c34a9e51e0e861345aa7a5e87414f"
url "https://github.com/facebook/proxygen/releases/download/v2026.03.02.00/proxygen-v2026.03.02.00.tar.gz"
sha256 "9a6bfc54ad2adebd7dd2d1a9afc6c659601425a9abcbab0727fa22112b235106"
license "BSD-3-Clause"
revision 1
head "https://github.com/facebook/proxygen.git", branch: "main"

bottle do
Expand Down Expand Up @@ -40,15 +39,10 @@ class Proxygen < Formula

conflicts_with "hq", because: "both install `hq` binaries"

# Fix name of `liblibhttperf2`.
# https://github.com/facebook/proxygen/pull/574
patch do
url "https://github.com/facebook/proxygen/commit/415ed3320f3d110f1d8c6846ca0582a4db7d225a.patch?full_index=1"
sha256 "4ea28c2f87732526afad0f2b2b66be330ad3d4fc18d0f20eb5e1242b557a6fcf"
end

def install
args = ["-DBUILD_SHARED_LIBS=ON", "-DCMAKE_INSTALL_RPATH=#{rpath}"]
# FIXME: shared libraries are currently broken. Unlikely to get much upstream
Comment thread
bevanjkay marked this conversation as resolved.
# support given `BUILD_SHARED_LIBS` says: "This is generally discouraged".
args = ["-DBUILD_SHARED_LIBS=OFF", "-DCMAKE_INSTALL_RPATH=#{rpath}"]
if OS.mac?
args += [
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-dead_strip_dylibs",
Expand Down
13 changes: 4 additions & 9 deletions Formula/w/wangle.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Wangle < Formula
desc "Modular, composable client/server abstractions framework"
homepage "https://github.com/facebook/wangle"
url "https://github.com/facebook/wangle/archive/refs/tags/v2026.01.12.00.tar.gz"
sha256 "49b8e318a44e6bcdce37d79644ffd4efc7084621d08b6822cc357047819634ec"
url "https://github.com/facebook/wangle/archive/refs/tags/v2026.03.02.00.tar.gz"
sha256 "46ee6bdf3f2625e8ec1f7b26cad6faa3b4e58fc981148233fc433f9ac36f706b"
license "Apache-2.0"
revision 1
head "https://github.com/facebook/wangle.git", branch: "main"

bottle do
Expand All @@ -17,23 +16,19 @@
end

depends_on "cmake" => [:build, :test]
depends_on "libevent" => :build
depends_on "double-conversion"
depends_on "fizz"
depends_on "fmt"
depends_on "folly"
depends_on "gflags"
depends_on "glog"
depends_on "libevent"
depends_on "lz4"
depends_on "openssl@3"
depends_on "zstd"
uses_from_macos "bzip2"

def install
args = ["-DBUILD_TESTS=OFF"]
# Prevent indirect linkage with boost, libsodium, snappy and xz
linker_flags = %w[-dead_strip_dylibs]
args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,#{linker_flags.join(",")}" if OS.mac?
args << "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-dead_strip_dylibs" if OS.mac?

system "cmake", "-S", "wangle", "-B", "build/shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args
system "cmake", "--build", "build/shared"
Expand Down
Loading
Loading