Skip to content

Commit

Permalink
No longer need to fix -Llib
Browse files Browse the repository at this point in the history
Not sure why, but the current PLplot build is not using `LIBDIR`
correctly in that it is not using the install prefix. So not passing
this in will let it use the default which will use `PREFIX/lib` which is
the intended result.
  • Loading branch information
zmughal committed Sep 28, 2021
1 parent 571431e commit f65ed17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
4 changes: 3 additions & 1 deletion alienfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ share {
qw(
-DBUILD_SHARED_LIBS=OFF
),
@{ meta->prop->{plugin_build_cmake}->{args} },
( grep { $_ !~ /\Q-DCMAKE_INSTALL_LIBDIR:PATH=\E/ }
@{ meta->prop->{plugin_build_cmake}->{args} },
),
'%{.install.extract}'
],
'%{make}',
Expand Down
21 changes: 0 additions & 21 deletions lib/Alien/PLplot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,6 @@ sub inline_auto_include {
return [ 'plplot.h' ];
}

sub _fix_libs_flags {
my ($class, $libs_flags) = @_;
if( $class->install_type('share') ) {
my $lib_dir = File::Spec->catfile( $class->dist_dir, 'lib' );
$lib_dir =~ s,\\,/,g if $^O eq 'MSWin32';
$libs_flags =~ s/(^|\s)-Llib\b/$1-L$lib_dir/g;
}
return $libs_flags;
}

sub libs {
my $class = shift;
my $libs = $class->SUPER::libs(@_);
return $class->_fix_libs_flags($libs);
}
sub libs_static {
my $class = shift;
my $libs = $class->SUPER::libs_static(@_);
return $class->_fix_libs_flags($libs);
}

1;
__END__
# ABSTRACT: Alien package for the PLplot plotting library
Expand Down

0 comments on commit f65ed17

Please sign in to comment.