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

erlang 23.0 #54665

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
File renamed without changes.
5 changes: 4 additions & 1 deletion Formula/couchdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "[email protected]"
depends_on "spidermonkey"

conflicts_with "ejabberd", :because => "both install `jiffy` lib"

def install
system "./configure"
system "make", "release"
Expand Down
5 changes: 4 additions & 1 deletion Formula/ejabberd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "[email protected]"

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
Expand Down
16 changes: 8 additions & 8 deletions Formula/erlang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
77 changes: 77 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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["[email protected]"].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
4 changes: 2 additions & 2 deletions Formula/wrangler.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}"
Expand Down
20 changes: 15 additions & 5 deletions Formula/yaws.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down