Only install ParseXS and Slic3r-XS when --gui is not supplied

This commit is contained in:
Alessandro Ranellucci 2013-09-17 21:52:10 +02:00
parent bbbdae3952
commit c421feb633

View File

@ -27,7 +27,9 @@ my %recommends = qw(
Growl::GNTP 0.15 Growl::GNTP 0.15
XML::SAX::ExpatXS 0 XML::SAX::ExpatXS 0
); );
if (defined $ARGV[0] && $ARGV[0] eq '--gui') {
my $gui = defined $ARGV[0] && $ARGV[0] eq '--gui';
if ($gui) {
%prereqs = qw( %prereqs = qw(
Wx 0.9918 Wx 0.9918
); );
@ -106,22 +108,24 @@ EOF
} }
} }
# temporarily require this dev version until this upstream bug if (!$gui) {
# is resolved: https://rt.cpan.org/Ticket/Display.html?id=86367 # temporarily require this dev version until this upstream bug
system $cpanm, 'SMUELLER/ExtUtils-ParseXS-3.18_04.tar.gz'; # is resolved: https://rt.cpan.org/Ticket/Display.html?id=86367
system $cpanm, 'SMUELLER/ExtUtils-ParseXS-3.18_04.tar.gz';
# clean xs directory before reinstalling, to make sure Build is called # clean xs directory before reinstalling, to make sure Build is called
# with current perl binary # with current perl binary
if (-e './xs/Build') { if (-e './xs/Build') {
if ($^O eq 'MSWin32') { if ($^O eq 'MSWin32') {
system 'cd', 'xs'; system 'cd', 'xs';
system 'Build', 'distclean'; system 'Build', 'distclean';
system 'cd', '..'; system 'cd', '..';
} else { } else {
system './xs/Build', 'distclean'; system './xs/Build', 'distclean';
}
} }
system $cpanm, '--reinstall', './xs';
} }
system $cpanm, '--reinstall', './xs';
} }
if ($missing_prereqs) { if ($missing_prereqs) {
@ -130,7 +134,7 @@ if ($missing_prereqs) {
if (eval "use App::Prove; 1") { if (eval "use App::Prove; 1") {
App::Prove->new->run; App::Prove->new->run;
} }
if (!defined $ARGV[0] || $ARGV[0] ne '--gui') { if (!$gui) {
print "If you also want to use the GUI you can now run `perl Build.PL --gui` to install the required modules.\n"; print "If you also want to use the GUI you can now run `perl Build.PL --gui` to install the required modules.\n";
} }
} }