Skip to content

Commit

Permalink
Update libsass and sassc to 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed May 19, 2019
1 parent ed13e36 commit d95a2df
Show file tree
Hide file tree
Showing 29 changed files with 1,220 additions and 484 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install:
script:
- perl Makefile.PL --profiling --sassc
- make -j5
- HARNESS_PERL_SWITCHES=-MDevel::Cover make test
- HARNESS_PERL_SWITCHES=-MDevel::Cover PSASS_FORCE_PLUGIN_CHECKS=1 make test
- make install
- psass --version
- psass --list-plugins
Expand Down
13 changes: 13 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
CSS::Sass (3.6.0)

First release with next major libsass version
This may cause your existing sass code to break
Please check the libsass changelog for breaking changes
https://github.com/sass/libsass/releases/tag/3.6.0

* Bumped libsass version to latest 3.6 stable branch (3.6.0)
* Added digest plugin to compute md5/base64/crc checksums
* Adjusted a few test cases to match new 3.6 behaviors

-- Marcel Greter <perl-libsass@ocbnet.ch> Thu, 19 May 2019 17:49:32 +0100

CSS::Sass (3.4.13)

* Fix build failures when using clang
Expand Down
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
"url" : "https://github.com/sass/perl-libsass"
}
},
"version" : "v3.5.0"
"version" : "v3.6.0"
}
2 changes: 1 addition & 1 deletion META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ resources:
homepage: https://metacpan.org/release/CSS-Sass
license: http://opensource.org/licenses/MIT
repository: https://github.com/sass/perl-libsass
version: v3.5.0
version: v3.6.0
17 changes: 8 additions & 9 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ sub libsass_sassc
else {
# create the sassc executable by linking against sassc and libsass
push @ret, "\t" . '$(LD) -o $(SASSC_EXE) $(LDFLAGS) -lm $(SASSC_OBJ) $(LIBS)'
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++')
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++')
. ' $(OPTIMIZE) -lstdc++ -std=c++0x ' . join(" ", @libs)
. ($^O eq "linux" ? ' -ldl' : '')
. ' -Wl,-rpath,$(INST_BIN)';
. ' -Wl,-rpath,$(INST_ARCHAUTODIR)';
}
# add target to virtual "pure_all"
push @cleanups, '$(SASSC_OBJ)';
Expand All @@ -663,7 +663,7 @@ sub libsass_lib
# register our source and object files
my @ret = 'LIBSASS_OBJ = ' . join(" ", @SOURCES);
# location of the created object
push @ret, 'LIBSASS_LIB = $(INST_BIN)/libsass.$(SO)';
push @ret, 'LIBSASS_LIB = $(INST_ARCHAUTODIR)/libsass.$(SO)';
# create the target for the makefile
push @ret, '$(LIBSASS_LIB): $(LIBSASS_OBJ)';
# create the libsass shared library by linking against all objects
Expand All @@ -687,7 +687,7 @@ sub libsass_plugin_math
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/math';
# create the libsass shared library by linking against all objects
push @ret, "\t" . compile_lib($_[0], '$(MATH_LIB)') . ' $(MATH_OBJ)'
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
# add target to virtual "pure_all"
push @cleanups, '$(MATH_OBJ)';
push @cleanups, '$(MATH_LIB)';
Expand All @@ -707,7 +707,7 @@ sub libsass_plugin_img_size
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/img-size';
# create the libsass shared library by linking against all objects
push @ret, "\t" . compile_lib($_[0], '$(IMG_SIZE_LIB)') . ' $(IMG_SIZE_OBJ)'
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
# add target to virtual "pure_all"
push @cleanups, '$(IMG_SIZE_OBJ)';
push @cleanups, '$(IMG_SIZE_LIB)';
Expand All @@ -732,7 +732,7 @@ sub libsass_plugin_digest
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/digest';
# create the libsass shared library by linking against all objects
push @ret, "\t" . compile_lib($_[0], '$(DIGEST_LIB)') . ' $(DIGEST_OBJ)'
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
# add target to virtual "pure_all"
push @cleanups, '$(DIGEST_OBJ)';
push @cleanups, '$(DIGEST_LIB)';
Expand All @@ -757,7 +757,7 @@ sub libsass_plugin_glob
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/glob';
# create the libsass shared library by linking against all objects
push @ret, "\t" . compile_lib($_[0], '$(GLOB_LIB)') . ' $(GLOB_OBJ)'
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
# add target to virtual "pure_all"
push @cleanups, '$(GLOB_OBJ)';
push @cleanups, '$(GLOB_LIB)';
Expand Down Expand Up @@ -787,8 +787,7 @@ sub runOnce
push @commands, '', libsass_plugin_glob($mm);
push @commands, '', libsass_plugin_math($mm);
push @commands, '', libsass_plugin_img_size($mm);
# needs a few C-API changes not yet released
# push @commands, '', libsass_plugin_digest();
push @commands, '', libsass_plugin_digest($mm);
}
# add new targets to virtual Makefile targets
push @commands, '', 'pure_all :: ' . join(" ", @targets);
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,15 @@ Included default plugins
$ psass --list-plugins
```

- [--glob-plugin][2]
- [--img-size-plugin][3]
- [--math-plugin][4]

[2]: https://github.com/mgreter/libsass-glob
[3]: https://github.com/mgreter/libsass-img-size
[4]: https://github.com/mgreter/libsass-math
- [--digest-plugin][2]
- [--glob-plugin][3]
- [--img-size-plugin][4]
- [--math-plugin][5]

[2]: https://github.com/mgreter/libsass-digest
[3]: https://github.com/mgreter/libsass-glob
[4]: https://github.com/mgreter/libsass-img-size
[5]: https://github.com/mgreter/libsass-math


Copyright And Licence
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ install:

build_script:
- perl Makefile.PL --sassc
- gmake PSASS_FORCE_PLUGIN_CHECKS=1 test
- gmake install
- psass --version
- sassc --version
Expand Down
2 changes: 1 addition & 1 deletion lib/CSS/Sass.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ our @EXPORT = qw(
SASS2SCSS_CONVERT_COMMENT
);

our $VERSION = "3.5.0";
our $VERSION = "3.6.0";

require XSLoader;
XSLoader::load('CSS::Sass', $VERSION);
Expand Down
18 changes: 11 additions & 7 deletions lib/CSS/Sass/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ use warnings;

################################################################################
package CSS::Sass::Plugins;
our $VERSION = "3.5.0";
our $VERSION = "3.6.0";
################################################################################
# collect plugins
our %plugins;
################################################################################
# all plugin directory variants
# propably too many, check-a-lot
our @ppaths = (
'auto',
'auto/lib',
'arch',
'arch/auto',
'arch/auto/lib',
Expand All @@ -44,9 +46,9 @@ our @ppaths = (
'blib/lib/arch',
'blib/lib/arch/auto',
'lib',
'lib/auto',
'lib/arch',
'lib/arch/auto',
'lib/auto',
);
################################################################################
use Exporter 'import'; # gives you Exporter's import() method directly
Expand All @@ -63,21 +65,23 @@ foreach my $path (map {
# normalize all slashes
$rpath =~ s/[\\\/]+/\//g;
# remove our own file from path
$rpath =~ s/CSS\/Plugins\.pm$//;
# remove perl path parts
$rpath =~ s/(?:b?lib\/+)+//g;
$rpath =~ s/CSS\/(?:Sass\/)?Plugins\.pm$//;
# remove perl path parts (install tests)
$rpath =~ s/(?:blib\/+lib\/*)$//g;
# remove trailing slash
$rpath =~ s/[\\\/]+$//g;
# only interested in base path
$rpath = $rpath . $path;
$rpath = $rpath . '/' . $path;
# silently ignore missing directory
next unless -d $rpath;
# open plugins directory to query
opendir (my $dh, $rpath) or
die "error querying plugins";
while (my $item = readdir($dh)) {
next unless $item =~ m/^[a-zA-Z\-]+$/;
$plugins{$item} = $rpath . $item
$plugins{$item} = $rpath . '/' . $item;
# normalize directory slashes
$plugins{$item} =~ s/[\\\/]+/\//g;
}

}
Expand Down
2 changes: 1 addition & 1 deletion lib/CSS/Sass/Value.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use CSS::Sass;

################################################################################
package CSS::Sass::Value;
our $VERSION = "3.5.0";
our $VERSION = "3.6.0";
################################################################################
use CSS::Sass qw(import_sv);
use CSS::Sass qw(sass_operation);
Expand Down
2 changes: 1 addition & 1 deletion lib/CSS/Sass/Watchdog.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use CSS::Sass;

################################################################################
package CSS::Sass::Watchdog;
our $VERSION = "3.5.0";
our $VERSION = "3.6.0";
################################################################################

use Exporter 'import'; # gives you Exporter's import() method directly
Expand Down
2 changes: 1 addition & 1 deletion libsass
Submodule libsass updated 3 files
+0 −6 extconf.rb
+7 −1 src/expand.cpp
+1 −1 src/parser.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 27dd2fe0f22cd56ec6f0618b3cb3803229e06025 Mon Sep 17 00:00:00 2001
From ccc3d135322993391bfb659eabf2a25cee62f74d Mon Sep 17 00:00:00 2001
From: Marcel Greter <marcel.greter@ocbnet.ch>
Date: Mon, 9 Jan 2017 17:51:08 +0100
Subject: [PATCH 3/3] Add script to unroll C++11 range based for loops
Subject: [PATCH 01/12] Add script to unroll C++11 range based for loops

---
script/replace-range-for-loops.md | 48 ++++++++++++++++++++++++++
Expand All @@ -12,7 +12,7 @@ Subject: [PATCH 3/3] Add script to unroll C++11 range based for loops

diff --git a/script/replace-range-for-loops.md b/script/replace-range-for-loops.md
new file mode 100644
index 00000000..093294d5
index 00000000..66101656
--- /dev/null
+++ b/script/replace-range-for-loops.md
@@ -0,0 +1,48 @@
Expand Down Expand Up @@ -66,7 +66,7 @@ index 00000000..093294d5
+```
diff --git a/script/replace-range-for-loops.pl b/script/replace-range-for-loops.pl
new file mode 100644
index 00000000..f08d7495
index 00000000..07f47024
--- /dev/null
+++ b/script/replace-range-for-loops.pl
@@ -0,0 +1,57 @@
Expand Down Expand Up @@ -99,7 +99,7 @@ index 00000000..f08d7495
+ my $org = $cpp;
+
+ my $re_decl = qr/(?:const\s*)?\w+(?:\:\:\w+)*(?:\s*[\*\&])?/;
+ my $re_val = qr/\w+(?:\(\))?(?:(?:->|\.)\w+(?:\(\))?)*/;
+ my $re_val = qr/\w+(?:\[[^\]]+\])?(?:\(\))?(?:(?:->|\.)\w+(?:\(\))?)*/;
+
+ $cpp =~ s/for\s*\(\s*($re_decl)\s*(\w+)\s*:\s*(\(\*?$re_val\)|\*?$re_val)\s*\)\s*{/
+ $count ++;
Expand Down
Loading

0 comments on commit d95a2df

Please sign in to comment.