Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-09-17 23:52:10 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-09-17 23:52:10 +0400
commitc421feb633a3cb9620a3b0896231b0a0ff10cdd6 (patch)
tree660cabc48988a29ef1584e6a233adfc756514a6a /Build.PL
parentbbbdae39525f42d792efda03655903442c942bd5 (diff)
Only install ParseXS and Slic3r-XS when --gui is not supplied
Diffstat (limited to 'Build.PL')
-rw-r--r--Build.PL36
1 files changed, 20 insertions, 16 deletions
diff --git a/Build.PL b/Build.PL
index 13cece256..5b87d2999 100644
--- a/Build.PL
+++ b/Build.PL
@@ -27,7 +27,9 @@ my %recommends = qw(
Growl::GNTP 0.15
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(
Wx 0.9918
);
@@ -106,22 +108,24 @@ EOF
}
}
- # temporarily require this dev version until this upstream bug
- # 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
- # with current perl binary
- if (-e './xs/Build') {
- if ($^O eq 'MSWin32') {
- system 'cd', 'xs';
- system 'Build', 'distclean';
- system 'cd', '..';
- } else {
- system './xs/Build', 'distclean';
+ if (!$gui) {
+ # temporarily require this dev version until this upstream bug
+ # 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
+ # with current perl binary
+ if (-e './xs/Build') {
+ if ($^O eq 'MSWin32') {
+ system 'cd', 'xs';
+ system 'Build', 'distclean';
+ system 'cd', '..';
+ } else {
+ system './xs/Build', 'distclean';
+ }
}
+ system $cpanm, '--reinstall', './xs';
}
- system $cpanm, '--reinstall', './xs';
}
if ($missing_prereqs) {
@@ -130,7 +134,7 @@ if ($missing_prereqs) {
if (eval "use App::Prove; 1") {
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";
}
}