Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 45 lines (37 sloc) 1.395 kb
178e1fd @staticfloat New formula: libpng12
staticfloat authored
1 class Libpng12 < Formula
1299c8b @jacknagel libpng12 1.2.52
jacknagel authored
2 homepage "http://www.libpng.org/pub/png/libpng.html"
3 url "https://downloads.sourceforge.net/project/libpng/libpng12/1.2.52/libpng-1.2.52.tar.xz"
06a1f8a @DomT4 libpng12: add test
DomT4 authored
4 sha256 "d4fb0fbf14057ad6d0319034188fc2aecddb493da8e3031b7b072ed28f510ec0"
178e1fd @staticfloat New formula: libpng12
staticfloat authored
5
b529e65 @BrewTestBot libpng12: add 1.2.52 bottle.
BrewTestBot authored
6 bottle do
7 root_url "https://homebrew.bintray.com/bottles-versions"
8 cellar :any
9 sha256 "5dce4e061796e9ba41112b3f0dfd2ede83eff085e2c5fa19ceb5839a63867a41" => :yosemite
10 sha256 "88360558925258c5d2701088de404ac253952e572ed1917f3e6281f3b04d6732" => :mavericks
11 sha256 "37b4c67b1a155c392fe0813924b8e8bae8eb0bce565bf70003d712a7a28bd41e" => :mountain_lion
12 end
13
178e1fd @staticfloat New formula: libpng12
staticfloat authored
14 keg_only :provided_by_osx
15
68d2c43 @silasb libpng12: add --universal
silasb authored
16 option :universal
17
178e1fd @staticfloat New formula: libpng12
staticfloat authored
18 def install
68d2c43 @silasb libpng12: add --universal
silasb authored
19 ENV.universal_binary if build.universal?
06a1f8a @DomT4 libpng12: add test
DomT4 authored
20
1299c8b @jacknagel libpng12 1.2.52
jacknagel authored
21 system "./configure", "--disable-dependency-tracking",
22 "--disable-silent-rules",
23 "--prefix=#{prefix}"
24 system "make"
25 system "make", "test"
26 system "make", "install"
178e1fd @staticfloat New formula: libpng12
staticfloat authored
27 end
06a1f8a @DomT4 libpng12: add test
DomT4 authored
28
29 test do
30 (testpath/"test.c").write <<-EOS.undent
31 #include <png.h>
32
33 int main()
34 {
35 png_structp png_ptr;
36 png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
37 png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
38 return 0;
39 }
40 EOS
41 system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lpng", "-o", "test"
42 system "./test"
43 end
178e1fd @staticfloat New formula: libpng12
staticfloat authored
44 end
Something went wrong with that request. Please try again.