homebrew-core/Formula/mono-libgdiplus.rb

50 lines
1.4 KiB
Ruby
Raw Normal View History

class MonoLibgdiplus < Formula
desc "GDI+-compatible API on non-Windows operating systems"
homepage "http://www.mono-project.com/docs/gui/libgdiplus/"
url "https://github.com/mono/libgdiplus/archive/5.4.tar.gz"
sha256 "ce31da0c6952c8fd160813dfa9bf4a9a871bfe7284e9e3abff9a8ee689acfe58"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "cairo"
depends_on "fontconfig"
depends_on "freetype"
depends_on "gettext"
depends_on "giflib"
depends_on "glib"
depends_on "jpeg"
depends_on "libexif"
depends_on "libpng"
depends_on "libtiff"
depends_on "pixman"
def install
system "autoreconf", "-fiv"
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--without-x11",
"--disable-tests",
"--prefix=#{prefix}"
system "make"
cd "tests" do
system "make", "testbits"
system "./testbits"
end
system "make", "install"
end
test do
# Since no headers are installed, we just test that we can link with
# libgdiplus
(testpath/"test.c").write <<-EOS.undent
int main() {
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lgdiplus", "-o", "test"
end
end