mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 14:51:11 -06:00
Switched to Perl local::lib for local compilation.
Taken from upstream Slic3r, thanks @alexrj.
This commit is contained in:
parent
952ca18bf9
commit
401059066e
44 changed files with 53 additions and 1 deletions
9
Build.PL
9
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';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue