gnu-cobol 2.2
Closes #24600. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
840d615ad7
commit
26bf294b49
1 changed files with 10 additions and 39 deletions
|
@ -1,19 +1,8 @@
|
|||
class GnuCobol < Formula
|
||||
desc "Implements much of the COBOL 85 and COBOL 2002 standards"
|
||||
homepage "https://sourceforge.net/projects/open-cobol/"
|
||||
revision 5
|
||||
|
||||
stable do
|
||||
url "https://downloads.sourceforge.net/project/open-cobol/gnu-cobol/1.1/gnu-cobol-1.1.tar.gz"
|
||||
sha256 "5cd6c99b2b1c82fd0c8fffbb350aaf255d484cde43cf5d9b92de1379343b3d7e"
|
||||
|
||||
fails_with :clang do
|
||||
cause <<~EOS
|
||||
Building with Clang configures GNU-COBOL to use Clang as its compiler,
|
||||
which causes subsequent GNU-COBOL-based builds to fail.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
url "https://downloads.sourceforge.net/project/open-cobol/gnu-cobol/2.2/gnucobol-2.2.tar.xz"
|
||||
sha256 "dc18fc45c269debfe86a4bbe20a7250983cba6238ea1917e135df5926cd024a0"
|
||||
|
||||
bottle do
|
||||
sha256 "d8d90339937363e53f4555e93d195d3c9d69f495876cfe975c320dbfbf130b8a" => :high_sierra
|
||||
|
@ -22,17 +11,8 @@ class GnuCobol < Formula
|
|||
sha256 "ec0481e921b59ac386a1e2a1266cb86b671a82fa466e6478f8581f4f2b114881" => :yosemite
|
||||
end
|
||||
|
||||
devel do
|
||||
version "2.0_nightly_r658"
|
||||
url "https://downloads.sourceforge.net/project/open-cobol/gnu-cobol/2.0/gnu-cobol-2.0_nightly_r658.tar.gz"
|
||||
sha256 "0a210d10624a53904871526afd69a6bef9feab40c2766386f74477598a313ae8"
|
||||
end
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "berkeley-db"
|
||||
depends_on "gmp"
|
||||
depends_on "gcc"
|
||||
|
||||
conflicts_with "open-cobol",
|
||||
:because => "both install `cob-config`, `cobc` and `cobcrun` binaries"
|
||||
|
@ -46,21 +26,12 @@ 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}"
|
||||
|
||||
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 "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-libiconv-prefix=/usr",
|
||||
"--with-libintl-prefix=/usr"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
|
@ -73,7 +44,7 @@ class GnuCobol < Formula
|
|||
000004 DISPLAY "Hello World!".
|
||||
000005 STOP RUN.
|
||||
EOS
|
||||
system "#{bin}/cobc", "-x", testpath/"hello.cob"
|
||||
system testpath/"hello"
|
||||
system "#{bin}/cobc", "-x", "hello.cob"
|
||||
system "./hello"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue