cattle 1.2.1
build from tag install examples and tests add a test Closes #4736. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
0348bcb3e1
commit
557e465dac
1 changed files with 22 additions and 9 deletions
|
@ -1,8 +1,11 @@
|
||||||
class Cattle < Formula
|
class Cattle < Formula
|
||||||
desc "Brainfuck language toolkit"
|
desc "Brainfuck language toolkit"
|
||||||
homepage "https://github.com/andreabolognani/cattle"
|
homepage "https://github.com/andreabolognani/cattle"
|
||||||
url "https://github.com/andreabolognani/cattle/archive/cattle-1.2.0.tar.gz"
|
# Source archive tarball results in "./ChangeLog: No such file or directory"
|
||||||
sha256 "ff0b424011c56f61cb463f1d3fb32e58e40da41260298c407bd0748eb506468d"
|
# Reported 12 Sep 2016 https://github.com/andreabolognani/cattle/issues/4
|
||||||
|
url "https://github.com/andreabolognani/cattle.git",
|
||||||
|
:tag => "cattle-1.2.1",
|
||||||
|
:revision => "338a34f7abc35334afd378f305c6e1fb0d0abd7d"
|
||||||
head "https://github.com/andreabolognani/cattle.git"
|
head "https://github.com/andreabolognani/cattle.git"
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
|
@ -12,12 +15,6 @@ class Cattle < Formula
|
||||||
sha256 "798aa25810d5dbfa2526cf0edf9117798b311c6ae6ce42b3a05c0bc90d087125" => :mountain_lion
|
sha256 "798aa25810d5dbfa2526cf0edf9117798b311c6ae6ce42b3a05c0bc90d087125" => :mountain_lion
|
||||||
end
|
end
|
||||||
|
|
||||||
# https://github.com/andreabolognani/cattle/issues/2
|
|
||||||
patch do
|
|
||||||
url "https://github.com/andreabolognani/cattle/pull/3.diff"
|
|
||||||
sha256 "876802fd965050d95e9cd7836b71a3cac5cd2508bf7f45b17192803a6fe19c17"
|
|
||||||
end
|
|
||||||
|
|
||||||
depends_on "gtk-doc" => :build
|
depends_on "gtk-doc" => :build
|
||||||
depends_on "pkg-config" => :build
|
depends_on "pkg-config" => :build
|
||||||
depends_on "autoconf" => :build
|
depends_on "autoconf" => :build
|
||||||
|
@ -27,12 +24,28 @@ class Cattle < Formula
|
||||||
depends_on "gobject-introspection"
|
depends_on "gobject-introspection"
|
||||||
|
|
||||||
def install
|
def install
|
||||||
inreplace "autogen.sh", "libtoolize", "glibtoolize"
|
pkgshare.mkpath
|
||||||
|
cp_r ["examples", "tests"], pkgshare
|
||||||
|
rm Dir["#{pkgshare}/{examples,tests}/{Makefile.am,.gitignore}"]
|
||||||
|
|
||||||
|
inreplace "autogen.sh", "libtoolize", "glibtoolize"
|
||||||
system "sh", "autogen.sh"
|
system "sh", "autogen.sh"
|
||||||
system "./configure", "--disable-dependency-tracking",
|
system "./configure", "--disable-dependency-tracking",
|
||||||
"--disable-silent-rules",
|
"--disable-silent-rules",
|
||||||
"--prefix=#{prefix}"
|
"--prefix=#{prefix}"
|
||||||
system "make", "install"
|
system "make", "install"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
cp_r (pkgshare/"examples").children, testpath
|
||||||
|
cp_r (pkgshare/"tests").children, testpath
|
||||||
|
system ENV.cc, "common.c", "run.c", "-o", "test",
|
||||||
|
"-I#{include}/cattle-1.0",
|
||||||
|
"-I#{Formula["glib"].include}/glib-2.0",
|
||||||
|
"-I#{Formula["glib"].lib}/glib-2.0/include",
|
||||||
|
"-L#{lib}",
|
||||||
|
"-L#{Formula["glib"].lib}",
|
||||||
|
"-lcattle-1.0", "-lglib-2.0", "-lgio-2.0", "-lgobject-2.0"
|
||||||
|
assert_match "Unbalanced brackets", shell_output("./test program.c 2>&1", 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue