56 lines
1.7 KiB
Ruby
56 lines
1.7 KiB
Ruby
class Libgsf < Formula
|
|
desc "I/O abstraction library for dealing with structured file formats"
|
|
homepage "https://developer.gnome.org/gsf/"
|
|
url "https://download.gnome.org/sources/libgsf/1.14/libgsf-1.14.40.tar.xz"
|
|
sha256 "350638894b5e324d8880b50e4bc43daabaf9f3f43a66010af080ffa2d32d51e0"
|
|
|
|
bottle do
|
|
sha256 "5ced3547d8de0d5cd2a26aad224b64626fc0a5b95ef7d27a6dbb2c6a898ca2a7" => :sierra
|
|
sha256 "340d7436377f6a8846b2c286fc2fcfa570825c1ca88628bb6fc2e0f8b5396801" => :el_capitan
|
|
sha256 "8bd206f80c912f3763d933658a8a4d29f49d937ad4e5370cf06fb609a2c00d64" => :yosemite
|
|
sha256 "cafc4d3987dd0b779611a1f008b77b848a32ca83898559e0c914d50083cee5d2" => :mavericks
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/GNOME/libgsf.git"
|
|
depends_on "automake" => :build
|
|
depends_on "autoconf" => :build
|
|
depends_on "gnome-common" => :build
|
|
depends_on "gtk-doc" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "gdk-pixbuf" => :optional
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
|
|
def install
|
|
args = %W[--disable-dependency-tracking --prefix=#{prefix}]
|
|
if build.head?
|
|
system "./autogen.sh", *args
|
|
else
|
|
system "./configure", *args
|
|
end
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"gsf", "--help"
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
#include <gsf/gsf-utils.h>
|
|
int main()
|
|
{
|
|
void
|
|
gsf_init (void);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cc, "-I#{include}/libgsf-1",
|
|
"-I#{Formula["glib"].opt_include}/glib-2.0",
|
|
"-I#{Formula["glib"].opt_lib}/glib-2.0/include",
|
|
testpath/"test.c", "-o", testpath/"test"
|
|
system "./test"
|
|
end
|
|
end
|