Skip to content

Commit

Permalink
Makefile.PL: help ora_libdir find ORACLE_HOME on Gentoo
Browse files Browse the repository at this point in the history
On Gentoo, for better or worse, we install oracle-instantclient on 64-bit
systems to /usr/lib64/oracle/client/ with:
* /usr/lib64/oracle/client/lib for 32-bit libraries (multilib)
* /usr/lib64/oracle/client/lib64 for native 64-bit libraries

Adapt the logic to handle lib64 if it exists and we're using a 64-bit Perl.

(And fix some whitespace while at it.)
  • Loading branch information
thesamesam authored and djzort committed Jul 16, 2024
1 parent 9dc2ca0 commit 5122724
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -1115,14 +1115,15 @@ sub perl_is_64bit {
return defined $Config{use64bitall} ;
}
sub ora_libdir {
my $libdir = 'lib' ;
my $libdir = 'lib';
if ( $client_version >= 9 ) {
$libdir = 'lib32' if ! perl_is_64bit() and -d "$OH/lib32";
$libdir = 'lib64' if perl_is_64bit() and -d "$OH/lib64";
# Solaris OIC 12+ from pkg
$libdir = 'lib/64' if perl_is_64bit() and -d "$OH/lib/64";
# Solaris OIC 12+ from pkg
}
else {
$libdir = 'lib64' if perl_is_64bit() and -d "$OH/lib64";
$libdir = 'lib64' if perl_is_64bit() and -d "$OH/lib64";
}

return $libdir;
Expand Down

0 comments on commit 5122724

Please sign in to comment.