59 lines
1.9 KiB
Ruby
59 lines
1.9 KiB
Ruby
class Lablgtk < Formula
|
|
desc "Objective Caml interface to gtk+"
|
|
homepage "http://lablgtk.forge.ocamlcore.org"
|
|
url "https://github.com/garrigue/lablgtk/archive/2.18.11.tar.gz"
|
|
sha256 "ff3c551df4e220b0c0fb9a3da6429413bff14f8fc93f4dd6807a35463982c863"
|
|
license "LGPL-2.1"
|
|
revision 2
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :github_latest
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "edcd9db3cfd8315ae8d9466a19f06b42dab15c747228a7a5cef9e962ac41e6d3"
|
|
sha256 cellar: :any, big_sur: "5aac315274a3ba8ae363a696fbc36f15b393dadc950bddef968945d02021b107"
|
|
sha256 cellar: :any, catalina: "6566c8c65d9e1077886e8fd6154909ccab0cacfa798f34d65943659795dec381"
|
|
sha256 cellar: :any, mojave: "05925d647fceebe15da147bbb9e52ddc69d991ae0b09577e255569f89e55b6c1"
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gtk+"
|
|
depends_on "gtksourceview"
|
|
depends_on "librsvg"
|
|
depends_on "ocaml"
|
|
|
|
def install
|
|
system "./configure", "--bindir=#{bin}",
|
|
"--libdir=#{lib}",
|
|
"--mandir=#{man}",
|
|
"--with-libdir=#{lib}/ocaml"
|
|
ENV.deparallelize
|
|
system "make", "world"
|
|
system "make", "old-install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.ml").write <<~EOS
|
|
let _ =
|
|
GtkMain.Main.init ()
|
|
EOS
|
|
ENV["CAML_LD_LIBRARY_PATH"] = "#{lib}/ocaml/stublibs"
|
|
system "ocamlc", "-I", "#{opt_lib}/ocaml/lablgtk2", "lablgtk.cma", "gtkInit.cmo", "test.ml", "-o", "test",
|
|
"-cclib", "-latk-1.0",
|
|
"-cclib", "-lcairo",
|
|
"-cclib", "-lgdk-quartz-2.0",
|
|
"-cclib", "-lgdk_pixbuf-2.0",
|
|
"-cclib", "-lgio-2.0",
|
|
"-cclib", "-lglib-2.0",
|
|
"-cclib", "-lgobject-2.0",
|
|
"-cclib", "-lgtk-quartz-2.0",
|
|
"-cclib", "-lgtksourceview-2.0",
|
|
"-cclib", "-lintl",
|
|
"-cclib", "-lpango-1.0",
|
|
"-cclib", "-lpangocairo-1.0"
|
|
system "./test"
|
|
end
|
|
end
|