Skip to content

Commit

Permalink
Update libsass to master to fix several issues
Browse files Browse the repository at this point in the history
Updates libsass to master to incorporate fixes for:

1. The :not selector. sass#91 sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Building with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:

1. Changes the location of libsass.so from ext/ to lib/. Fixes sass#95
2. No longer tries to run `nmake` on Windows (libsass Makefile is
   compatible with GNU Make only).
  • Loading branch information
glebm committed Nov 17, 2018
1 parent c2d6de7 commit 412d15b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ext/libsass
Submodule libsass updated 82 files
+1 −1 .travis.yml
+10 −0 CODE_OF_CONDUCT.md
+21 −35 GNUmakefile.am
+42 −84 Makefile
+10 −1 Makefile.conf
+5 −4 Readme.md
+8 −12 configure.ac
+1 −1 docs/api-doc.md
+73 −0 docs/dev-profiling.md
+18 −7 docs/implementations.md
+3 −0 docs/setup-environment.md
+16 −10 docs/unicode.md
+4 −4 script/ci-build-plugin
+1 −1 script/tap-runner
+45 −43 src/ast.cpp
+123 −172 src/ast.hpp
+13 −16 src/ast2c.cpp
+8 −9 src/ast2c.hpp
+50 −10 src/ast_def_macros.hpp
+11 −5 src/ast_fwd_decl.hpp
+4 −0 src/backtrace.cpp
+13 −12 src/bind.cpp
+3 −1 src/bind.hpp
+64 −0 src/c2ast.cpp
+14 −0 src/c2ast.hpp
+2 −2 src/cencode.c
+0 −7 src/check_nesting.cpp
+6 −5 src/check_nesting.hpp
+8 −0 src/context.cpp
+2 −2 src/context.hpp
+2 −7 src/cssize.cpp
+4 −4 src/cssize.hpp
+11 −8 src/debugger.hpp
+14 −0 src/environment.cpp
+6 −0 src/environment.hpp
+1 −0 src/error_handling.hpp
+151 −176 src/eval.cpp
+20 −12 src/eval.hpp
+14 −22 src/expand.cpp
+7 −11 src/expand.hpp
+3 −3 src/extend.hpp
+22 −0 src/file.cpp
+742 −0 src/fn_colors.cpp
+85 −0 src/fn_colors.hpp
+284 −0 src/fn_lists.cpp
+34 −0 src/fn_lists.hpp
+94 −0 src/fn_maps.cpp
+30 −0 src/fn_maps.hpp
+252 −0 src/fn_miscs.cpp
+40 −0 src/fn_miscs.hpp
+217 −0 src/fn_numbers.cpp
+45 −0 src/fn_numbers.hpp
+238 −0 src/fn_selectors.cpp
+35 −0 src/fn_selectors.hpp
+261 −0 src/fn_strings.cpp
+34 −0 src/fn_strings.hpp
+153 −0 src/fn_utils.cpp
+62 −0 src/fn_utils.hpp
+8 −2,200 src/functions.cpp
+1 −187 src/functions.hpp
+4 −23 src/inspect.cpp
+0 −5 src/inspect.hpp
+0 −5 src/listize.cpp
+3 −3 src/listize.hpp
+4 −7 src/memory/SharedPtr.cpp
+23 −26 src/memory/SharedPtr.hpp
+38 −12 src/operation.hpp
+33 −6 src/operators.cpp
+43 −27 src/parser.cpp
+6 −4 src/parser.hpp
+1 −1 src/prelexer.cpp
+2 −3 src/remove_placeholders.hpp
+5 −2 src/sass.cpp
+12 −9 src/sass.hpp
+45 −14 src/sass2scss.cpp
+1 −1 src/sass_context.cpp
+1 −1 src/sass_functions.hpp
+0 −7 src/to_value.cpp
+0 −5 src/to_value.hpp
+0 −5 src/util.hpp
+20 −2 win/libsass.targets
+56 −2 win/libsass.vcxproj.filters
2 changes: 1 addition & 1 deletion lib/sassc/native.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Native

spec = Gem.loaded_specs["sassc"]
gem_root = spec.gem_dir
ffi_lib "#{gem_root}/ext/libsass/lib/libsass.so"
ffi_lib "#{gem_root}/lib/libsass.so"

require_relative "native/sass_value"

Expand Down
9 changes: 4 additions & 5 deletions lib/tasks/libsass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@
end

cd libsass_path do
Rake::Task["lib/libsass.so"].invoke
Rake::Task["../../lib/libsass.so"].invoke
end
end

file "Makefile" do
sh "git submodule update --init"
end

file "lib/libsass.so" => "Makefile" do
file "../../lib/libsass.so" => "Makefile" do
make_program = ENV['MAKE']
make_program ||= case RUBY_PLATFORM
when /mswin/
'nmake'
when /(bsd|solaris)/
'gmake'
else
'make'
end
sh "#{make_program} lib/libsass.so"
sh({ 'DESTDIR' => '../..', 'PREFIX' => '' },
make_program, '../../lib/libsass.so')
end
end
2 changes: 1 addition & 1 deletion test/engine_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_precision_not_specified
SCSS
expected_output = <<-CSS
.foo {
baz: 0.33333; }
baz: 0.3333333333; }
CSS
output = Engine.new(template).render
assert_equal expected_output, output
Expand Down
2 changes: 1 addition & 1 deletion test/native_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module NativeTest

class General < MiniTest::Test
def test_it_reports_the_libsass_version
assert_equal "3.5.2", Native.version
assert_equal "3.5.2-87-gd225", Native.version
end
end

Expand Down

0 comments on commit 412d15b

Please sign in to comment.