Skip to content

Commit

Permalink
simple-tiles 0.6.0
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#39893.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
dunn authored and DomT4 committed May 25, 2015
1 parent eb81a3a commit f42fbd3
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions Formula/simple-tiles.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
require 'formula'

class SimpleTiles < Formula
homepage 'http://propublica.github.io/simple-tiles/'
url 'https://github.com/propublica/simple-tiles/archive/v0.5.0.tar.gz'
sha1 'dde1359132f29e56e01596cbab58b1ed85d2de08'
homepage "https://propublica.github.io/simple-tiles/"
url "https://github.com/propublica/simple-tiles/archive/v0.6.0.tar.gz"
sha256 "336fdc04c34b85270c377d880a0d4cc2ac1a9c9e5e4c3d53e0322d43c9495ac9"

head 'https://github.com/propublica/simple-tiles.git'
head "https://github.com/propublica/simple-tiles.git"

depends_on "pkg-config" => :build
depends_on "cairo"
Expand All @@ -14,6 +12,26 @@ class SimpleTiles < Formula

def install
system "./configure", "--prefix=#{prefix}"
system "make install"
system "make", "install"
end

test do
(testpath/"test.c").write <<-EOS.undent
#include <simple-tiles/simple_tiles.h>
int main(){
simplet_map_t *map = simplet_map_new();
simplet_map_free(map);
return 0;
}
EOS
system ENV.cc, "-I#{include}", "-L#{lib}", "-lsimple-tiles",
"-I#{Formula["cairo"].opt_include}/cairo",
"-I#{Formula["gdal"].opt_include}",
"-I#{Formula["glib"].opt_include}/glib-2.0",
"-I#{Formula["glib"].opt_lib}/glib-2.0/include",
"-I#{Formula["pango"].opt_include}/pango-1.0",
"test.c", "-o", "test"
system testpath/"test"
end
end

0 comments on commit f42fbd3

Please sign in to comment.