aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorGerrit Beine2014-09-08 22:45:11 +0200
committerMike McQuaid2014-09-10 08:49:24 +0100
commitc9cff1636e4168bf1e520b78a76109bbfa340f9b (patch)
treea5a68b7e17ea136320ffb8fdac90b9bd16ab40bc /Library
parentc470b8af3671fda18e81dd36a44d4541f2da9be8 (diff)
downloadhomebrew-c9cff1636e4168bf1e520b78a76109bbfa340f9b.tar.bz2
gnu-cobol: add devel and use GCC for stable.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gnu-cobol.rb32
1 files changed, 26 insertions, 6 deletions
diff --git a/Library/Formula/gnu-cobol.rb b/Library/Formula/gnu-cobol.rb
index b7ad3572a..3aa42921f 100644
--- a/Library/Formula/gnu-cobol.rb
+++ b/Library/Formula/gnu-cobol.rb
@@ -5,6 +5,12 @@ class GnuCobol < Formula
url "https://downloads.sourceforge.net/project/open-cobol/gnu-cobol/1.1/gnu-cobol-1.1.tar.gz"
sha1 "86e928c43cb3372f1f4564f3fd5e1dde668e8c1f"
+ devel do
+ version "2.0_nightly_r411"
+ url "https://downloads.sourceforge.net/project/open-cobol/gnu-cobol/2.0/gnu-cobol-2.0_nightly_r411.tar.gz"
+ sha1 "009215c090b9a90fbf02bbc913095ce2a9b31910"
+ end
+
bottle do
sha1 "322762bbffd52fb562106ea1d30c84bb4b7a5927" => :mavericks
sha1 "55dea1ba4f72978138421002797a39dddf7c57db" => :mountain_lion
@@ -16,6 +22,15 @@ class GnuCobol < Formula
depends_on "berkeley-db4"
depends_on "gmp"
+ if build.stable?
+ fails_with :clang do
+ cause <<-EOS.undent
+ Building with Clang configures GNU-COBOL to use Clang as its compiler,
+ which causes subsequent GNU-COBOL-based builds to fail.
+ EOS
+ end
+ end
+
def install
# both environment variables are needed to be set
# the cobol compiler takes these variables for calling cc during its run
@@ -25,15 +40,20 @@ class GnuCobol < Formula
ENV.append "CPPFLAGS", "-I#{gmp.opt_include} -I#{bdb.opt_include}"
ENV.append "LDFLAGS", "-L#{gmp.opt_lib} -L#{bdb.opt_lib}"
- system "aclocal"
-
- # fix referencing of libintl and libiconv for ld
- # bug report can be found here: https://sourceforge.net/p/open-cobol/bugs/93/
- inreplace "configure", "-R$found_dir", "-L$found_dir"
-
args = ["--prefix=#{prefix}", "--infodir=#{info}"]
args << "--with-libiconv-prefix=/usr"
args << "--with-libintl-prefix=/usr"
+
+ if build.stable?
+ system "aclocal"
+
+ # fix referencing of libintl and libiconv for ld
+ # bug report can be found here: https://sourceforge.net/p/open-cobol/bugs/93/
+ inreplace "configure", "-R$found_dir", "-L$found_dir"
+
+ args << "--with-cc=#{ENV.cc}"
+ end
+
system "./configure", *args
system "make", "install"
end