Skip to content

Commit 5db54f2

Browse files
authored
Merge pull request #43 from sass/develop
Bump to LibSass version 3.6.4.
2 parents d95a2df + 18d7e40 commit 5db54f2

16 files changed

+152
-57
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ compiler:
66
- gcc
77

88
perl:
9-
- "5.20"
10-
- "5.18"
11-
- "5.16"
12-
- "5.14"
13-
- "5.12"
9+
- "5.30"
10+
- "5.28"
11+
- "5.26"
12+
- "5.24"
13+
- "5.22"
1414

1515
install:
1616
# Deal with dependencies

Changes

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
CSS::Sass (3.6.2)
2+
3+
Updating libsass to version 3.6.4
4+
https://github.com/sass/libsass/releases/tag/3.6.4
5+
6+
* Bumped libsass version to latest 3.6 stable branch (3.6.4)
7+
* CPAN release for 3.6.1 was skipped due to regressions
8+
* GCC 4.4 support was removed for now (might not come back)
9+
10+
-- Marcel Greter <[email protected]> Thu, 1 May 2020 13:46:07 +0100
11+
12+
CSS::Sass (3.6.1)
13+
14+
Updating libsass to version 3.6.3
15+
Improves extend compatibility with dart-sass
16+
https://github.com/sass/libsass/releases/tag/3.6.3
17+
18+
* Bumped libsass version to latest 3.6 stable branch (3.6.3)
19+
* Fixed issue with building plugins on Mac OSX (#41)
20+
* Updated sass-spec and adjusted spec runner
21+
22+
-- Marcel Greter <[email protected]> Mon, 4 Nov 2019 12:00:00 +0200
23+
124
CSS::Sass (3.6.0)
225

326
First release with next major libsass version

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.6.0"
71+
"version" : "v3.6.2"
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.6.0
42+
version: v3.6.2

Makefile.PL

Lines changed: 73 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ my $skip_manifest = env_option 'PSASS_SKIP_MANIFEST', 0;
4949
my $skip_version = env_option 'PSASS_SKIP_VERSION', 0;
5050
my $update_deps = env_option 'PSASS_UPDATE_DEPS', 0;
5151
my $checkout_deps = env_option 'PSASS_CHECKOUT_DEPS', 0;
52-
my $patch_gcc44 = env_option 'PSASS_PATCH_GCC44', 0;
52+
# my $patch_gcc44 = env_option 'PSASS_PATCH_GCC44', 0;
5353
my $skip_git = env_option 'PSASS_SKIP_GIT', 0;
5454

5555
# arrays for various switches
@@ -81,7 +81,7 @@ sub help
8181
print " --checkout-deps Checkout submodules at linked commit (needs git repo)\n";
8282
print " --get-versions Show versions of all perl package (.pm) files\n";
8383
print " --set-versions Set versions of all perl package (.pm) files\n";
84-
print " --patch-gcc44 Patch libsass for gcc44 compatibility\n";
84+
# print " --patch-gcc44 Patch libsass for gcc44 compatibility\n";
8585
print " --skip-git Do not try to use anything git related\n";
8686
print "\n";
8787
print " You may use environment variables to set any option\n";
@@ -163,7 +163,7 @@ GetOptions(
163163
'--library!' => \$install_library,
164164
'--compiler:s' => \$compiler,
165165
'--profiling!' => \$profiling,
166-
'--patch-gcc44' => \$patch_gcc44,
166+
# '--patch-gcc44' => \$patch_gcc44,
167167
'--skip-git!' => \$skip_git,
168168
'--skip-version!' => \$skip_version,
169169
'--skip-manifest!' => \$skip_manifest,
@@ -306,7 +306,7 @@ if ($install_sassc) {
306306
$sassc_version = <$fh> if (defined $fh);
307307
chomp($sassc_version);
308308
print "Detected sassc $sassc_version\n";
309-
# create compile flags to include the libsass version
309+
# create compile flags to include the sassc version
310310
push @defs, qq(SASSC_VERSION=\\"$sassc_version\\");
311311
} else {
312312
# give a warning if the version could not be determined (probably not generated yet)
@@ -318,24 +318,29 @@ if ($install_sassc) {
318318
# patch sources
319319
################################################################################
320320

321-
if ($patch_gcc44) {
322-
my $cwd = Cwd::getcwd;
323-
chdir ("libsass") or die "pushd: $!";
324-
print "Patching libsass source for gcc compatibility\n";
325-
foreach my $patch (sort glob("../patches/*.patch")) {
326-
print "applying $patch\n";
327-
# system "git", "am", "--abort";
328-
system "git", "am", "--3way", "--keep-cr",
329-
"--ignore-space-change", "--quiet", $patch;
330-
}
331-
system "perl", "script/replace-range-for-loops.pl";
332-
chdir ($cwd) or die "popd: $!";
333-
}
321+
# if ($patch_gcc44) {
322+
# my $cwd = Cwd::getcwd;
323+
# chdir ("libsass") or die "pushd: $!";
324+
# print "Patching libsass source for gcc compatibility\n";
325+
# foreach my $patch (sort glob("../patches/*.patch")) {
326+
# print "applying $patch\n";
327+
# # system "git", "am", "--abort";
328+
# system "git", "am", "--3way", "--keep-cr",
329+
# "--ignore-space-change", "--quiet", $patch;
330+
# }
331+
# system "perl", "script/replace-range-for-loops.pl";
332+
# chdir ($cwd) or die "popd: $!";
333+
# }
334334

335335
################################################################################
336336
# compiler configurations
337337
################################################################################
338338

339+
unless (defined $compiler) {
340+
$compiler = $ENV{'CC'} || $ENV{'CXX'};
341+
$compiler =~ s/\++$// if $compiler;
342+
}
343+
339344
my $guess = ExtUtils::CppGuess->new(
340345
(defined($compiler) ? (cc => $compiler) : ()),
341346
);
@@ -350,16 +355,37 @@ if ($guess->is_gcc) {
350355
$cc_version = sprintf("%d.%d.%d", $1, $2, $3);
351356
$guess->{'gcc_version'} = $cc_version;
352357
print "Detected GCC compiler $cc_version ...\n";
353-
if ($1 < 4 || ($1 == 4 && $2 < 4)) {
358+
if ($1 < 4 || ($1 == 4 && $2 < 7)) {
354359
warn "Your GCC Version is too old for LibSass!\n";
355-
warn "Needs at least gcc version 4.4 or higher!\n";
356-
die "Please consider upgrading your GCC compiler!\n";
360+
warn "Needs at least gcc version 4.7 or higher!\n";
361+
warn "Please consider upgrading your GCC compiler!\n";
362+
exit 0; # avoid any CPAN Testers failure reports
357363
}
358364
}
359365
else {
360366
print "Detected GCC compiler (version unknown) ...\n";
361367
}
362368
}
369+
elsif ($guess->is_clang) {
370+
# version not exposed by CppGuess!?
371+
use Capture::Tiny 'capture_merged';
372+
my $cmd = $guess->{cc} . " --version";
373+
my $cc_version = capture_merged { system($cmd) };
374+
if ($cc_version =~ m/clang\s+(?:version)?\s+(\d+)\.(\d+)\.(\d+)\s+\([^\)]+\)\r?\n/i) {
375+
$cc_version = sprintf("%d.%d.%d", $1, $2, $3);
376+
$guess->{'gcc_version'} = $cc_version;
377+
print "Detected CLANG compiler $cc_version ...\n";
378+
if ($1 < 3 || ($1 == 3 && $2 < 3)) {
379+
warn "Your CLANG Version is too old for LibSass!\n";
380+
warn "Needs at least clang version 3.3 or higher!\n";
381+
warn "Please consider upgrading your clang compiler!\n";
382+
exit 0; # avoid any CPAN Testers failure reports
383+
}
384+
}
385+
else {
386+
print "Detected CLANG compiler (version unknown) ...\n";
387+
}
388+
}
363389
# we never really tested compilation via MSVC yet ...
364390
elsif ($guess->is_msvc) { print "Detected MSVC compiler ...\n"; }
365391
else { print "Unknown compiler, trying anyway...\n"; }
@@ -606,7 +632,7 @@ my $static = 0;
606632
my $reported = 0;
607633

608634
sub compile_lib {
609-
my ($mm, $name) = @_;
635+
my ($lib, $mm, $name) = @_;
610636
my @args = (
611637
'$(LD) $(OPTIMIZE) -lstdc++ -shared', "-o ${name}",
612638
);
@@ -624,6 +650,11 @@ sub compile_lib {
624650
unless ($^O eq 'MSWin32' && $Config{cc} =~ /^cl/) {
625651
push @args, '-Wl,-rpath,\\$$ORIGIN/../..';
626652
}
653+
# add explicit library name on OSX
654+
if ($^O eq 'darwin') {
655+
push @args, '-Wl,-install_name,' . $lib;
656+
# push @args, '-Wl,-rpath,@loader_path/../..';
657+
}
627658
# -static-libgcc -static-libstdc++
628659
return join(' ', @args, @libs);
629660
}
@@ -643,6 +674,10 @@ sub libsass_sassc
643674
}
644675
# otherwise we asume gcc
645676
else {
677+
# On windows there is nothing like rpath for dll load paths
678+
# So dll and sassc would need to be in same directory
679+
# For now we just fall back to link sassc statically
680+
my $static = $static || $^O eq 'MSWin32';
646681
# create the sassc executable by linking against sassc and libsass
647682
push @ret, "\t" . '$(LD) -o $(SASSC_EXE) $(LDFLAGS) -lm $(SASSC_OBJ) $(LIBS)'
648683
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++')
@@ -667,7 +702,7 @@ sub libsass_lib
667702
# create the target for the makefile
668703
push @ret, '$(LIBSASS_LIB): $(LIBSASS_OBJ)';
669704
# create the libsass shared library by linking against all objects
670-
push @ret, "\t" . compile_lib($_[0], '$(LIBSASS_LIB)') . ' $(LIBSASS_OBJ)';
705+
push @ret, "\t" . compile_lib('libsass.$(SO)', $_[0], '$(LIBSASS_LIB)') . ' $(LIBSASS_OBJ)';
671706
# add target to virtual "pure_all"
672707
push @cleanups, '$(LIBSASS_OBJ)';
673708
push @cleanups, '$(LIBSASS_LIB)';
@@ -686,8 +721,11 @@ sub libsass_plugin_math
686721
# make sure the plugin path exists for output
687722
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/math';
688723
# create the libsass shared library by linking against all objects
689-
push @ret, "\t" . compile_lib($_[0], '$(MATH_LIB)') . ' $(MATH_OBJ)'
724+
push @ret, "\t" . compile_lib('math.$(SO)', $_[0], '$(MATH_LIB)') . ' $(MATH_OBJ)'
690725
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
726+
# change dynamic loading of libsass.dylib to look relative to ourself (only on mac)
727+
push @ret, "\t" . 'install_name_tool -change libsass.dylib @loader_path/../../libsass.dylib'
728+
. ' $(MATH_LIB)' if ($^O eq 'darwin' && !$static);
691729
# add target to virtual "pure_all"
692730
push @cleanups, '$(MATH_OBJ)';
693731
push @cleanups, '$(MATH_LIB)';
@@ -706,8 +744,11 @@ sub libsass_plugin_img_size
706744
# make sure the plugin path exists for output
707745
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/img-size';
708746
# create the libsass shared library by linking against all objects
709-
push @ret, "\t" . compile_lib($_[0], '$(IMG_SIZE_LIB)') . ' $(IMG_SIZE_OBJ)'
747+
push @ret, "\t" . compile_lib('img-size.$(SO)', $_[0], '$(IMG_SIZE_LIB)') . ' $(IMG_SIZE_OBJ)'
710748
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
749+
# change dynamic loading of libsass.dylib to look relative to ourself (only on mac)
750+
push @ret, "\t" . 'install_name_tool -change libsass.dylib @loader_path/../../libsass.dylib'
751+
. ' $(IMG_SIZE_LIB)' if ($^O eq 'darwin' && !$static);
711752
# add target to virtual "pure_all"
712753
push @cleanups, '$(IMG_SIZE_OBJ)';
713754
push @cleanups, '$(IMG_SIZE_LIB)';
@@ -731,8 +772,11 @@ sub libsass_plugin_digest
731772
# make sure the plugin path exists for output
732773
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/digest';
733774
# create the libsass shared library by linking against all objects
734-
push @ret, "\t" . compile_lib($_[0], '$(DIGEST_LIB)') . ' $(DIGEST_OBJ)'
775+
push @ret, "\t" . compile_lib('digest.$(SO)', $_[0], '$(DIGEST_LIB)') . ' $(DIGEST_OBJ)'
735776
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
777+
# change dynamic loading of libsass.dylib to look relative to ourself (only on mac)
778+
push @ret, "\t" . 'install_name_tool -change libsass.dylib @loader_path/../../libsass.dylib'
779+
. ' $(DIGEST_LIB)' if ($^O eq 'darwin' && !$static);
736780
# add target to virtual "pure_all"
737781
push @cleanups, '$(DIGEST_OBJ)';
738782
push @cleanups, '$(DIGEST_LIB)';
@@ -756,8 +800,11 @@ sub libsass_plugin_glob
756800
# make sure the plugin path exists for output
757801
push @ret, "\t" . '$(MKPATH) $(INST_ARCHAUTODIR)/plugins/glob';
758802
# create the libsass shared library by linking against all objects
759-
push @ret, "\t" . compile_lib($_[0], '$(GLOB_LIB)') . ' $(GLOB_OBJ)'
803+
push @ret, "\t" . compile_lib('glob.$(SO)', $_[0], '$(GLOB_LIB)') . ' $(GLOB_OBJ)'
760804
. ' ' . ($static ? '$(LIBSASS_OBJ)' : '-L$(INST_ARCHAUTODIR) -lsass -lstdc++');
805+
# change dynamic loading of libsass.dylib to look relative to ourself (only on mac)
806+
push @ret, "\t" . 'install_name_tool -change libsass.dylib @loader_path/../../libsass.dylib'
807+
. ' $(GLOB_LIB)' if ($^O eq 'darwin' && !$static);
761808
# add target to virtual "pure_all"
762809
push @cleanups, '$(GLOB_OBJ)';
763810
push @cleanups, '$(GLOB_LIB)';

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.6.0";
72+
our $VERSION = "3.6.2";
7373

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

lib/CSS/Sass/Plugins.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use warnings;
2424

2525
################################################################################
2626
package CSS::Sass::Plugins;
27-
our $VERSION = "3.6.0";
27+
our $VERSION = "3.6.2";
2828
################################################################################
2929
# collect plugins
3030
our %plugins;

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.6.0";
42+
our $VERSION = "3.6.2";
4343
################################################################################
4444
use CSS::Sass qw(import_sv);
4545
use CSS::Sass qw(sass_operation);

lib/CSS/Sass/Watchdog.pm

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

2626
################################################################################
2727
package CSS::Sass::Watchdog;
28-
our $VERSION = "3.6.0";
28+
our $VERSION = "3.6.2";
2929
################################################################################
3030

3131
use Exporter 'import'; # gives you Exporter's import() method directly

libsass

Submodule libsass updated 161 files

0 commit comments

Comments
 (0)