aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/sassc.rb
blob: 3101082e38aa72590d6023ddcf280aae39057890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'formula'

class Sassc < Formula
  homepage 'https://github.com/hcatlin/sassc'
  url 'https://github.com/hcatlin/sassc/archive/v1.0.1.tar.gz'
  sha1 '69e7d97264b252593a3307330a96a5ccdc2813b5'

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "libsass"

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

  test do
    (testpath/"test.sass").write "a { color:blue; &:hover { color:red; } }"
    expected = <<-EOS.undent
      a {
        color: blue; }
        a:hover {
          color: red; }
    EOS
    assert_equal expected, `#{bin}/sassc test.sass`
  end
end