diff options
| author | Drew Wells | 2015-01-05 01:25:51 -0600 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-05 08:08:57 +0000 |
| commit | 6651fa0a53ad94bf4c7a908cd3e4dffe715c5d11 (patch) | |
| tree | abc3bdfe07e60543f59c5230bd659e8da90584f0 /Library/Formula | |
| parent | 3a3ce6b7ee69b1443af4b5d20868484fba81c612 (diff) | |
| download | homebrew-6651fa0a53ad94bf4c7a908cd3e4dffe715c5d11.tar.bz2 | |
libsass 3.1.0
Closes #35558.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libsass.rb | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/Library/Formula/libsass.rb b/Library/Formula/libsass.rb index bc117c0a7..6f55e6990 100644 --- a/Library/Formula/libsass.rb +++ b/Library/Formula/libsass.rb @@ -1,7 +1,7 @@ class Libsass < Formula homepage "https://github.com/sass/libsass" - url "https://github.com/sass/libsass/archive/3.0.2.tar.gz" - sha1 "415e4377ec73fcf0bd7af949d65f7ca730be1e5c" + url "https://github.com/sass/libsass/archive/3.1.0.tar.gz" + sha1 "858c41405f5ff8b4186c7111e08f29893f4e51a1" head "https://github.com/sass/libsass.git" bottle do @@ -11,12 +11,6 @@ class Libsass < Formula sha1 "d435e14e0a8a3886ba9dc301aed4db4baceb9fe6" => :mountain_lion end - devel do - url "https://github.com/sass/libsass/archive/3.1.0-beta.tar.gz" - sha1 "478571d0ddf789a41c08587562c52b5b54c3e418" - version "3.1.0-beta" - end - depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build @@ -25,7 +19,6 @@ class Libsass < Formula def install ENV.cxx11 ENV["LIBSASS_VERSION"] = "HEAD" if build.head? - ENV["LIBSASS_VERSION"] = "3.1.0" if build.devel? system "autoreconf", "-fvi" system "./configure", "--prefix=#{prefix}", "--disable-silent-rules", "--disable-dependency-tracking" @@ -39,24 +32,23 @@ class Libsass < Formula test do # This will need to be updated when devel = stable due to API changes. (testpath/"test.c").write <<-EOS.undent - #include <sass_interface.h> + #include <sass_context.h> #include <string.h> int main() { - struct sass_context* sass_ctx = sass_new_context(); - struct sass_options options; - options.output_style = SASS_STYLE_NESTED; - options.source_comments = 0; - options.image_path = "images"; - options.include_paths = ""; - sass_ctx->source_string = "a { color:blue; &:hover { color:red; } }"; - sass_ctx->options = options; - sass_compile(sass_ctx); - if(sass_ctx->error_status) { + char* source_string = "a { color:blue; &:hover { color:red; } }"; + struct Sass_Data_Context* data_ctx = sass_make_data_context(source_string); + struct Sass_Options* options = sass_data_context_get_options(data_ctx); + sass_option_set_precision(options, SASS_STYLE_NESTED); + sass_option_set_source_comments(options, 0); + sass_compile_data_context(data_ctx); + struct Sass_Context* ctx = sass_data_context_get_context(data_ctx); + int err = sass_context_get_error_status(ctx); + if(err != 0) { return 1; } else { - return strcmp(sass_ctx->output_string, "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0; + return strcmp(sass_context_get_output_string(ctx), "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0; } } EOS |
