Skip to content

Commit d95a2df

Browse files
committed
Update libsass and sassc to 3.6.0
1 parent ed13e36 commit d95a2df

29 files changed

+1220
-484
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ install:
2020
script:
2121
- perl Makefile.PL --profiling --sassc
2222
- make -j5
23-
- HARNESS_PERL_SWITCHES=-MDevel::Cover make test
23+
- HARNESS_PERL_SWITCHES=-MDevel::Cover PSASS_FORCE_PLUGIN_CHECKS=1 make test
2424
- make install
2525
- psass --version
2626
- psass --list-plugins

Changes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
CSS::Sass (3.6.0)
2+
3+
First release with next major libsass version
4+
This may cause your existing sass code to break
5+
Please check the libsass changelog for breaking changes
6+
https://github.com/sass/libsass/releases/tag/3.6.0
7+
8+
* Bumped libsass version to latest 3.6 stable branch (3.6.0)
9+
* Added digest plugin to compute md5/base64/crc checksums
10+
* Adjusted a few test cases to match new 3.6 behaviors
11+
12+
-- Marcel Greter <[email protected]> Thu, 19 May 2019 17:49:32 +0100
13+
114
CSS::Sass (3.4.13)
215

316
* Fix build failures when using clang

META.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@
6868
"url" : "https://github.com/sass/perl-libsass"
6969
}
7070
},
71-
"version" : "v3.5.0"
71+
"version" : "v3.6.0"
7272
}

META.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ resources:
3939
homepage: https://metacpan.org/release/CSS-Sass
4040
license: http://opensource.org/licenses/MIT
4141
repository: https://github.com/sass/perl-libsass
42-
version: v3.5.0
42+
version: v3.6.0

Makefile.PL

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,10 @@ sub libsass_sassc
645645
else {
646646
# create the sassc executable by linking against sassc and libsass
647647
push @ret, "\t" . '$(LD) -o $(SASSC_EXE) $(LDFLAGS) -lm $(SASSC_OBJ) $(LIBS)'
648-
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++')
648+
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++')
649649
. ' $(OPTIMIZE) -lstdc++ -std=c++0x ' . join(" ", @libs)
650650
. ($^O eq "linux" ? ' -ldl' : '')
651-
. ' -Wl,-rpath,$(INST_BIN)';
651+
. ' -Wl,-rpath,$(INST_ARCHAUTODIR)';
652652
}
653653
# add target to virtual "pure_all"
654654
push @cleanups, '$(SASSC_OBJ)';
@@ -663,7 +663,7 @@ sub libsass_lib
663663
# register our source and object files
664664
my @ret = 'LIBSASS_OBJ = ' . join(" ", @SOURCES);
665665
# location of the created object
666-
push @ret, 'LIBSASS_LIB = $(INST_BIN)/libsass.$(SO)';
666+
push @ret, 'LIBSASS_LIB = $(INST_ARCHAUTODIR)/libsass.$(SO)';
667667
# create the target for the makefile
668668
push @ret, '$(LIBSASS_LIB): $(LIBSASS_OBJ)';
669669
# create the libsass shared library by linking against all objects
@@ -687,7 +687,7 @@ sub libsass_plugin_math
687687
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/math';
688688
# create the libsass shared library by linking against all objects
689689
push @ret, "\t" . compile_lib($_[0], '$(MATH_LIB)') . ' $(MATH_OBJ)'
690-
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
690+
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
691691
# add target to virtual "pure_all"
692692
push @cleanups, '$(MATH_OBJ)';
693693
push @cleanups, '$(MATH_LIB)';
@@ -707,7 +707,7 @@ sub libsass_plugin_img_size
707707
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/img-size';
708708
# create the libsass shared library by linking against all objects
709709
push @ret, "\t" . compile_lib($_[0], '$(IMG_SIZE_LIB)') . ' $(IMG_SIZE_OBJ)'
710-
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
710+
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
711711
# add target to virtual "pure_all"
712712
push @cleanups, '$(IMG_SIZE_OBJ)';
713713
push @cleanups, '$(IMG_SIZE_LIB)';
@@ -732,7 +732,7 @@ sub libsass_plugin_digest
732732
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/digest';
733733
# create the libsass shared library by linking against all objects
734734
push @ret, "\t" . compile_lib($_[0], '$(DIGEST_LIB)') . ' $(DIGEST_OBJ)'
735-
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
735+
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
736736
# add target to virtual "pure_all"
737737
push @cleanups, '$(DIGEST_OBJ)';
738738
push @cleanups, '$(DIGEST_LIB)';
@@ -757,7 +757,7 @@ sub libsass_plugin_glob
757757
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/glob';
758758
# create the libsass shared library by linking against all objects
759759
push @ret, "\t" . compile_lib($_[0], '$(GLOB_LIB)') . ' $(GLOB_OBJ)'
760-
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_BIN) -lsass -lstdc++');
760+
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
761761
# add target to virtual "pure_all"
762762
push @cleanups, '$(GLOB_OBJ)';
763763
push @cleanups, '$(GLOB_LIB)';
@@ -787,8 +787,7 @@ sub runOnce
787787
push @commands, '', libsass_plugin_glob($mm);
788788
push @commands, '', libsass_plugin_math($mm);
789789
push @commands, '', libsass_plugin_img_size($mm);
790-
# needs a few C-API changes not yet released
791-
# push @commands, '', libsass_plugin_digest();
790+
push @commands, '', libsass_plugin_digest($mm);
792791
}
793792
# add new targets to virtual Makefile targets
794793
push @commands, '', 'pure_all :: ' . join(" ", @targets);

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ Included default plugins
151151
$ psass --list-plugins
152152
```
153153

154-
- [--glob-plugin][2]
155-
- [--img-size-plugin][3]
156-
- [--math-plugin][4]
157-
158-
[2]: https://github.com/mgreter/libsass-glob
159-
[3]: https://github.com/mgreter/libsass-img-size
160-
[4]: https://github.com/mgreter/libsass-math
154+
- [--digest-plugin][2]
155+
- [--glob-plugin][3]
156+
- [--img-size-plugin][4]
157+
- [--math-plugin][5]
158+
159+
[2]: https://github.com/mgreter/libsass-digest
160+
[3]: https://github.com/mgreter/libsass-glob
161+
[4]: https://github.com/mgreter/libsass-img-size
162+
[5]: https://github.com/mgreter/libsass-math
161163

162164

163165
Copyright And Licence

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ install:
99

1010
build_script:
1111
- perl Makefile.PL --sassc
12+
- gmake PSASS_FORCE_PLUGIN_CHECKS=1 test
1213
- gmake install
1314
- psass --version
1415
- sassc --version

lib/CSS/Sass.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ our @EXPORT = qw(
6969
SASS2SCSS_CONVERT_COMMENT
7070
);
7171

72-
our $VERSION = "3.5.0";
72+
our $VERSION = "3.6.0";
7373

7474
require XSLoader;
7575
XSLoader::load('CSS::Sass', $VERSION);

lib/CSS/Sass/Plugins.pm

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ use warnings;
2424

2525
################################################################################
2626
package CSS::Sass::Plugins;
27-
our $VERSION = "3.5.0";
27+
our $VERSION = "3.6.0";
2828
################################################################################
2929
# collect plugins
3030
our %plugins;
3131
################################################################################
3232
# all plugin directory variants
3333
# propably too many, check-a-lot
3434
our @ppaths = (
35+
'auto',
36+
'auto/lib',
3537
'arch',
3638
'arch/auto',
3739
'arch/auto/lib',
@@ -44,9 +46,9 @@ our @ppaths = (
4446
'blib/lib/arch',
4547
'blib/lib/arch/auto',
4648
'lib',
49+
'lib/auto',
4750
'lib/arch',
4851
'lib/arch/auto',
49-
'lib/auto',
5052
);
5153
################################################################################
5254
use Exporter 'import'; # gives you Exporter's import() method directly
@@ -63,21 +65,23 @@ foreach my $path (map {
6365
# normalize all slashes
6466
$rpath =~ s/[\\\/]+/\//g;
6567
# remove our own file from path
66-
$rpath =~ s/CSS\/Plugins\.pm$//;
67-
# remove perl path parts
68-
$rpath =~ s/(?:b?lib\/+)+//g;
68+
$rpath =~ s/CSS\/(?:Sass\/)?Plugins\.pm$//;
69+
# remove perl path parts (install tests)
70+
$rpath =~ s/(?:blib\/+lib\/*)$//g;
6971
# remove trailing slash
7072
$rpath =~ s/[\\\/]+$//g;
7173
# only interested in base path
72-
$rpath = $rpath . $path;
74+
$rpath = $rpath . '/' . $path;
7375
# silently ignore missing directory
7476
next unless -d $rpath;
7577
# open plugins directory to query
7678
opendir (my $dh, $rpath) or
7779
die "error querying plugins";
7880
while (my $item = readdir($dh)) {
7981
next unless $item =~ m/^[a-zA-Z\-]+$/;
80-
$plugins{$item} = $rpath . $item
82+
$plugins{$item} = $rpath . '/' . $item;
83+
# normalize directory slashes
84+
$plugins{$item} =~ s/[\\\/]+/\//g;
8185
}
8286

8387
}

lib/CSS/Sass/Value.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use CSS::Sass;
3939

4040
################################################################################
4141
package CSS::Sass::Value;
42-
our $VERSION = "3.5.0";
42+
our $VERSION = "3.6.0";
4343
################################################################################
4444
use CSS::Sass qw(import_sv);
4545
use CSS::Sass qw(sass_operation);

0 commit comments

Comments
 (0)