@@ -175,6 +175,8 @@ if ($install_sassc) {
175
175
if ($install_plugins ) {
176
176
# add optional libsass-math plugin
177
177
push @submodules , " plugins/math" ;
178
+ # add optional libsass-img-size plugin
179
+ push @submodules , " plugins/img-size" ;
178
180
# add optional libsass-glob plugin
179
181
push @incs , ' plugins/glob/vendor' ;
180
182
push @submodules , " plugins/glob" ;
@@ -600,6 +602,26 @@ sub libsass_plugin_math
600
602
return join " \n " , @ret ;
601
603
}
602
604
605
+ sub libsass_plugin_img_size
606
+ {
607
+ my @ret = ' IMG_SIZE_OBJ = plugins/img-size/src/img-size$(OBJ_EXT)' ;
608
+ # location of the created object
609
+ push @ret , ' IMG_SIZE_LIB = $(INST_ARCHAUTODIR)/plugins/img-size/img-size.$(SO)' ;
610
+ # create the target for the makefile
611
+ push @ret , ' $(IMG_SIZE_LIB): $(LIBSASS_LIB) $(IMG_SIZE_OBJ)' ;
612
+ # make sure the plugin path exists for output
613
+ push @ret , " \t " . ' $(MKPATH) $(INST_ARCHAUTODIR)/plugins/img-size' ;
614
+ # create the libsass shared library by linking against all objects
615
+ push @ret , " \t " . compile_lib(' $(IMG_SIZE_LIB)' ) . ' $(IMG_SIZE_OBJ)'
616
+ . ' ' . ($static ? ' $(LIBSASS_OBJ)' : ' -L$(INST_LIB) -lsass' );
617
+ # add target to virtual "pure_all"
618
+ push @cleanups , ' $(IMG_SIZE_OBJ)' ;
619
+ push @cleanups , ' $(IMG_SIZE_LIB)' ;
620
+ push @targets , ' $(IMG_SIZE_LIB)' ;
621
+ # return makefile part
622
+ return join " \n " , @ret ;
623
+ }
624
+
603
625
sub libsass_plugin_digest
604
626
{
605
627
my @ret = ' DIGEST_OBJ = ' . join ' ' ,
@@ -670,6 +692,7 @@ sub runOnce
670
692
if ($install_plugins ) {
671
693
push @commands , ' ' , libsass_plugin_glob();
672
694
push @commands , ' ' , libsass_plugin_math();
695
+ push @commands , ' ' , libsass_plugin_img_size();
673
696
# needs a few C-API changes not yet released
674
697
# push @commands, '', libsass_plugin_digest();
675
698
}
0 commit comments