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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-08-18 10:58:50 +0300
committerbubnikv <bubnikv@gmail.com>2017-08-18 10:58:50 +0300
commit401059066eeb8de3a3a8576ba532cd9150710423 (patch)
treeaba3910be12b25d89599c5b56a9f82d0e4e397fe /Build.PL
parent952ca18bf9e84835d72838d54a5ccfb484af2fcd (diff)
Switched to Perl local::lib for local compilation.
Taken from upstream Slic3r, thanks @alexrj.
Diffstat (limited to 'Build.PL')
-rw-r--r--Build.PL9
1 files changed, 9 insertions, 0 deletions
diff --git a/Build.PL b/Build.PL
index 0e5113456..20844c2de 100644
--- a/Build.PL
+++ b/Build.PL
@@ -103,6 +103,15 @@ EOF
my @cpanm_args = ();
push @cpanm_args, "--sudo" if $sudo;
+ # install local::lib without --local-lib otherwise it's not usable afterwards
+ if (!eval "use local::lib qw(local-lib); 1") {
+ my $res = system $cpanm, @cpanm_args, 'local::lib';
+ warn "Warning: local::lib is required. You might need to run the `cpanm --sudo local::lib` command in order to install it.\n"
+ if $res != 0;
+ }
+
+ push @cpanm_args, ('--local-lib', 'local-lib');
+
# make sure our cpanm is updated (old ones don't support the ~ syntax)
system $cpanm, @cpanm_args, 'App::cpanminus';