diff --git a/Aliases/erlang@22 b/Aliases/erlang@23 similarity index 100% rename from Aliases/erlang@22 rename to Aliases/erlang@23 diff --git a/Formula/couchdb.rb b/Formula/couchdb.rb index 6792ec5dc415a..26b6b7c96d4ad 100644 --- a/Formula/couchdb.rb +++ b/Formula/couchdb.rb @@ -4,6 +4,7 @@ class Couchdb < Formula url "https://www.apache.org/dyn/closer.lua?path=couchdb/source/3.1.0/apache-couchdb-3.1.0.tar.gz" mirror "https://archive.apache.org/dist/couchdb/source/3.1.0/apache-couchdb-3.1.0.tar.gz" sha256 "4867c796a1ff6f0794b7bd3863089ea6397bd5c47544f9b97db8cdacff90f8ed" + revision 1 bottle do cellar :any @@ -15,13 +16,15 @@ class Couchdb < Formula depends_on "autoconf" => :build depends_on "autoconf-archive" => :build depends_on "automake" => :build - depends_on "erlang" => :build + depends_on "erlang@22" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "icu4c" depends_on "openssl@1.1" depends_on "spidermonkey" + conflicts_with "ejabberd", :because => "both install `jiffy` lib" + def install system "./configure" system "make", "release" diff --git a/Formula/ejabberd.rb b/Formula/ejabberd.rb index 7bb41b5353bfd..86b70436d1445 100644 --- a/Formula/ejabberd.rb +++ b/Formula/ejabberd.rb @@ -3,6 +3,7 @@ class Ejabberd < Formula homepage "https://www.ejabberd.im" url "https://static.process-one.net/ejabberd/downloads/20.04/ejabberd-20.04.tgz" sha256 "130673a835a9768a47c78c6bfe9c622a3b5916dd8aaf12aad0acd2d0f7f3a5cf" + revision 1 bottle do cellar :any @@ -18,11 +19,13 @@ class Ejabberd < Formula depends_on "automake" => :build end - depends_on "erlang" + depends_on "erlang@22" depends_on "gd" depends_on "libyaml" depends_on "openssl@1.1" + conflicts_with "couchdb", :because => "both install `jiffy` lib" + def install ENV["TARGET_DIR"] = ENV["DESTDIR"] = "#{lib}/ejabberd/erlang/lib/ejabberd-#{version}" ENV["MAN_DIR"] = man diff --git a/Formula/erlang.rb b/Formula/erlang.rb index bc56845536c1e..65ad2896761fe 100644 --- a/Formula/erlang.rb +++ b/Formula/erlang.rb @@ -2,8 +2,8 @@ class Erlang < Formula desc "Programming language for highly scalable real-time systems" homepage "https://www.erlang.org/" # Download tarball from GitHub; it is served faster than the official tarball. - url "https://github.com/erlang/otp/archive/OTP-22.3.4.tar.gz" - sha256 "79657e07aee0cc174f89c1bd7d8d251295f64144cced6ea72b98777ec6a6660d" + url "https://github.com/erlang/otp/archive/OTP-23.0.tar.gz" + sha256 "a12263e031374130f5bd4ff01c13f2d39ced241c695267498b19c66012e03d6a" head "https://github.com/erlang/otp.git" bottle do @@ -22,15 +22,15 @@ class Erlang < Formula uses_from_macos "m4" => :build resource "man" do - url "https://www.erlang.org/download/otp_doc_man_22.3.tar.gz" - mirror "https://fossies.org/linux/misc/otp_doc_man_22.3.tar.gz" - sha256 "43b6d62d9595e1dc51946d55c9528c706c5ae753876b9bf29303b7d11a7ccb16" + url "https://www.erlang.org/download/otp_doc_man_23.0.tar.gz" + mirror "https://fossies.org/linux/misc/otp_doc_man_23.0.tar.gz" + sha256 "c0804cb5bead8780de24cf9ba656efefd9307a457e0541cc513109523731bf6f" end resource "html" do - url "https://www.erlang.org/download/otp_doc_html_22.3.tar.gz" - mirror "https://fossies.org/linux/misc/otp_doc_html_22.3.tar.gz" - sha256 "9b01c61f2898235e7f6643c66215d6419f8706c8fdd7c3e0123e68960a388c34" + url "https://www.erlang.org/download/otp_doc_html_23.0.tar.gz" + mirror "https://fossies.org/linux/misc/otp_doc_html_23.0.tar.gz" + sha256 "4da19f0de96d1c516d91c621a5ddf20837303cc25695b944e263e3ea46dd31da" end def install diff --git a/Formula/erlang@22.rb b/Formula/erlang@22.rb new file mode 100644 index 0000000000000..2a428dbef7a6d --- /dev/null +++ b/Formula/erlang@22.rb @@ -0,0 +1,77 @@ +class ErlangAT22 < Formula + desc "Programming language for highly scalable real-time systems" + homepage "https://www.erlang.org/" + # Download tarball from GitHub; it is served faster than the official tarball. + url "https://github.com/erlang/otp/archive/OTP-22.3.4.tar.gz" + sha256 "79657e07aee0cc174f89c1bd7d8d251295f64144cced6ea72b98777ec6a6660d" + + keg_only :versioned_formula + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "openssl@1.1" + depends_on "wxmac" # for GUI apps like observer + + uses_from_macos "m4" => :build + + resource "man" do + url "https://www.erlang.org/download/otp_doc_man_22.3.tar.gz" + mirror "https://fossies.org/linux/misc/otp_doc_man_22.3.tar.gz" + sha256 "43b6d62d9595e1dc51946d55c9528c706c5ae753876b9bf29303b7d11a7ccb16" + end + + resource "html" do + url "https://www.erlang.org/download/otp_doc_html_22.3.tar.gz" + mirror "https://fossies.org/linux/misc/otp_doc_html_22.3.tar.gz" + sha256 "9b01c61f2898235e7f6643c66215d6419f8706c8fdd7c3e0123e68960a388c34" + end + + def install + # Unset these so that building wx, kernel, compiler and + # other modules doesn't fail with an unintelligable error. + %w[LIBS FLAGS AFLAGS ZFLAGS].each { |k| ENV.delete("ERL_#{k}") } + + # Do this if building from a checkout to generate configure + system "./otp_build", "autoconf" if File.exist? "otp_build" + + args = %W[ + --disable-debug + --disable-silent-rules + --prefix=#{prefix} + --enable-dynamic-ssl-lib + --enable-hipe + --enable-sctp + --enable-shared-zlib + --enable-smp-support + --enable-threads + --enable-wx + --with-ssl=#{Formula["openssl@1.1"].opt_prefix} + --without-javac + --enable-darwin-64bit + ] + + args << "--enable-kernel-poll" if MacOS.version > :el_capitan + args << "--with-dynamic-trace=dtrace" if MacOS::CLT.installed? + + system "./configure", *args + system "make" + system "make", "install" + + (lib/"erlang").install resource("man").files("man") + doc.install resource("html") + end + + def caveats + <<~EOS + Man pages can be found in: + #{opt_lib}/erlang/man + + Access them with `erl -man`, or add this directory to MANPATH. + EOS + end + + test do + system "#{bin}/erl", "-noshell", "-eval", "crypto:start().", "-s", "init", "stop" + end +end diff --git a/Formula/wrangler.rb b/Formula/wrangler.rb index 41ac800386b16..1fae63c44e405 100644 --- a/Formula/wrangler.rb +++ b/Formula/wrangler.rb @@ -1,7 +1,7 @@ class Wrangler < Formula desc "Refactoring tool for Erlang with emacs and Eclipse integration" homepage "https://www.cs.kent.ac.uk/projects/wrangler/Wrangler/" - revision 2 + revision 3 head "https://github.com/RefactoringTools/wrangler.git" stable do @@ -28,7 +28,7 @@ class Wrangler < Formula sha256 "35f891e2ab69591e3d4bd907197b21fae3b23f9b727278e1c2cc577d10277660" => :high_sierra end - depends_on "erlang" + depends_on "erlang@22" def install system "./configure", "--prefix=#{prefix}" diff --git a/Formula/yaws.rb b/Formula/yaws.rb index 0765d0e8495ca..6ee57005d11eb 100644 --- a/Formula/yaws.rb +++ b/Formula/yaws.rb @@ -1,10 +1,20 @@ class Yaws < Formula desc "Webserver for dynamic content (written in Erlang)" homepage "http://yaws.hyber.org" - url "https://github.com/klacke/yaws/archive/yaws-2.0.7.tar.gz" - sha256 "083b1b6be581fdfb66d77a151bbb2fc3897b1b0497352ff6c93c2256ef2b08f6" - revision 1 - head "https://github.com/klacke/yaws.git" + revision 2 + head "https://github.com/erlyaws/yaws.git" + + stable do + url "https://github.com/erlyaws/yaws/archive/yaws-2.0.7.tar.gz" + sha256 "083b1b6be581fdfb66d77a151bbb2fc3897b1b0497352ff6c93c2256ef2b08f6" + + # Erlang 23 compatibility + # Remove with the next release. Also remove `WARNINGS_AS_ERRORS=` flag from `make install` call + patch do + url "https://github.com/erlyaws/yaws/compare/c0fd79f17d52628fcec527da7fa3e788c283c445..28eecfd1c65c369de5b4b99cea9407205bbe8f8e.patch?full_index=1" + sha256 "0dbcb92e961ae9dc9d6613436f5d39e0c1b675635cfbeef888e1d2b487add413" + end + end bottle do cellar :any_skip_relocation @@ -29,7 +39,7 @@ def install # Ensure pam headers are found on Xcode-only installs "--with-extrainclude=#{MacOS.sdk_path}/usr/include/security", "SED=/usr/bin/sed" - system "make", "install" + system "make", "install", "WARNINGS_AS_ERRORS=" cd "applications/yapp" do system "make"