Alien-libpq

 view release on metacpan or  search on metacpan

lib/Alien/libpq.pm  view on Meta::CPAN

sub _add_rpath {
    my ($self, $libs) = @_;
    if ($^O eq 'darwin' && $self->install_type eq 'share' && $libs =~ /-L(\S+)/) {
        return "-Wl,-rpath,$1 $libs";
    }
    return $libs;
}

# On macOS share installs, the dylib uses @rpath in its install_name.
# Inject -rpath so the loader can find it at runtime.
sub libs        { $_[0]->_add_rpath($_[0]->SUPER::libs) }
sub libs_static { $_[0]->_add_rpath($_[0]->SUPER::libs_static) }

1;

__END__

=head1 NAME

Alien::libpq - Find or build libpq PostgreSQL client library

=head1 SYNOPSIS



( run in 0.341 second using v1.01-cache-2.11-cpan-0d23b851a93 )