Skip to content

Commit

Permalink
Fix workaround to build imap-uw [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Sep 15, 2024
1 parent b6bc682 commit 3b9165a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Formula/imap-uw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def add_headers
def install
ENV.deparallelize

ENV.append "CFLAGS", "-Wno-incompatible-function-pointer-types"

inreplace "Makefile" do |s|
s.gsub! "SSLINCLUDE=/usr/include/openssl",
"SSLINCLUDE=#{Formula["openssl@3"].opt_include}/openssl"
Expand All @@ -122,14 +120,20 @@ def install
# Skip IPv6 warning on Linux as libc should be IPv6 safe.
touch "ip6"

extra_cflags = []
# Workaround for Xcode 14.3
extra_cflags << "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403
# Workaround for Xcode 15
extra_cflags << "-Wno-incompatible-function-pointer-types" if DevelopmentTools.clang_build_version >= 1500

if OS.mac?
add_headers
system "make", "oxp"
system "make", "oxp", "EXTRACFLAGS=#{extra_cflags.join(" ")}"
else
system "make", "ldbs"
system "make", "ldbs", "EXTRACFLAGS=#{extra_cflags.join(" ")}"
lib.install "c-client/libc-client.so"
system "make", "clean"
system "make", "ldb"
system "make", "ldb", "EXTRACFLAGS=#{extra_cflags.join(" ")}"
end

# email servers:
Expand Down

0 comments on commit 3b9165a

Please sign in to comment.