Skip to content

Commit

Permalink
libphonenumber: add workaround for new protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Jun 14, 2023
1 parent e738a0a commit 8670ec5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Formula/libphonenumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Libphonenumber < Formula

def install
ENV.append_to_cflags "-Wno-sign-compare" # Avoid build failure on Linux.
# https://github.com/protocolbuffers/protobuf/commit/4329fde9cf3fab7d1b3a9abe0fbeee1ad8a8b111
ENV.append_to_cflags "-DPROTOBUF_USE_DLLS"
system "cmake", "-S", "cpp", "-B", "build",
"-DCMAKE_CXX_STANDARD=17", # keep in sync with C++ standard in abseil.rb
"-DGTEST_INCLUDE_DIR=#{Formula["googletest"].opt_include}",
Expand Down Expand Up @@ -66,7 +68,7 @@ def install
}
}
EOS
system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lphonenumber", "-o", "test"
system ENV.cxx, "-std=c++17", "-DPROTOBUF_USE_DLLS", "test.cpp", "-L#{lib}", "-lphonenumber", "-o", "test"
system "./test"
end
end
Expand Down

0 comments on commit 8670ec5

Please sign in to comment.