53 lines
1.7 KiB
Ruby
53 lines
1.7 KiB
Ruby
class Lablgtk < Formula
|
|
desc "Objective Caml interface to gtk+"
|
|
homepage "http://lablgtk.forge.ocamlcore.org"
|
|
url "https://forge.ocamlcore.org/frs/download.php/1726/lablgtk-2.18.6.tar.gz"
|
|
sha256 "4ddca243066418e2a88ac49ebf2d846fac4b667b1b1753efadd078ae777368f8"
|
|
revision 4
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a31b98b22cc8de04806dbcb1c05832b6b2a8c45e930477c034474c77e9f2a661" => :mojave
|
|
sha256 "5fda248f045a1c7a966ee4152cea66ee70caf4c64c545e872bb2ba872938a0e8" => :high_sierra
|
|
sha256 "fe6e01af945294226b247dda8cd1691b63759ffd142f32112725d43d4679368b" => :sierra
|
|
end
|
|
|
|
depends_on "camlp4" => :build
|
|
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
|