Permalink
Browse files

Dont mangle LD_RUN_PATH if system installed

  • Loading branch information...
1 parent 17cdd87 commit e2df61ad86dfb5c99087f1bc81ee91b3de2be574 @jberger jberger committed Mar 19, 2012
Showing with 12 additions and 2 deletions.
  1. +3 −0 Changes
  2. +9 −2 lib/Alien/Base.pm
View
@@ -1,5 +1,8 @@
Revision history for Perl module Alien::Base.
+0.000_004
+ - Don't mangle LD_RUN_PATH if system installed
+
0.000_003 Mar 18, 2012
- Require safer File::chdir
- Fixed "Bad File Descriptor" bug calling pkg-config
View
@@ -18,6 +18,8 @@ use Capture::Tiny qw/capture_merged/;
sub import {
my $class = shift;
+ return if $class->install_type('system');
+
my $libs = $class->libs;
my @L = $libs =~ /-L(\S+)/g;
@@ -55,13 +57,18 @@ sub libs {
return $self->_keyword('Libs', @_);
}
+sub install_type {
+ my $self = shift;
+ my $type = $self->config('install_type');
+ return @_ ? $type eq $_[0] : $type;
+}
+
sub _keyword {
my $self = shift;
my $keyword = shift;
# use pkg-config if installed system-wide
- my $type = $self->config('install_type');
- if ($type eq 'system') {
+ if ($self->install_type('system')) {
my $name = $self->config('name');
my $command = "pkg-config --\L$keyword\E $name";

0 comments on commit e2df61a

Please sign in to comment.