Home | History | Annotate | Line # | Download | only in platform
      1  1.1  christos package platform::VMS;
      2  1.1  christos 
      3  1.1  christos use strict;
      4  1.1  christos use warnings;
      5  1.1  christos use Carp;
      6  1.1  christos 
      7  1.1  christos use vars qw(@ISA);
      8  1.1  christos 
      9  1.1  christos require platform::BASE;
     10  1.1  christos @ISA = qw(platform::BASE);
     11  1.1  christos 
     12  1.1  christos # Assume someone set @INC right before loading this module
     13  1.1  christos use configdata;
     14  1.1  christos 
     15  1.1  christos # VMS has a cultural standard where all installed libraries are prefixed.
     16  1.1  christos # For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
     17  1.1  christos # conversation with VSI, Tuesday January 26 2016)
     18  1.1  christos sub osslprefix          { 'OSSL$' }
     19  1.1  christos 
     20  1.1  christos sub binext              { '.EXE' }
     21  1.1  christos sub dsoext              { '.EXE' }
     22  1.1  christos sub shlibext            { '.EXE' }
     23  1.1  christos sub libext              { '.OLB' }
     24  1.1  christos sub defext              { '.OPT' }
     25  1.1  christos sub objext              { '.OBJ' }
     26  1.1  christos sub depext              { '.D' }
     27  1.1  christos sub asmext              { '.ASM' }
     28  1.1  christos 
     29  1.1  christos # Other extra that aren't defined in platform::BASE
     30  1.1  christos sub shlibvariant        { $target{shlib_variant} || '' }
     31  1.1  christos 
     32  1.1  christos sub optext              { '.OPT' }
     33  1.1  christos sub optname             { return $_[1] }
     34  1.1  christos sub opt                 { return $_[0]->optname($_[1]) . $_[0]->optext() }
     35  1.1  christos 
     36  1.1  christos # Other projects include the pointer size in the name of installed libraries,
     37  1.1  christos # so we do too.
     38  1.1  christos sub staticname {
     39  1.1  christos     # Non-installed libraries are *always* static, and their names remain
     40  1.1  christos     # the same, except for the mandatory extension
     41  1.1  christos     my $in_libname = platform::BASE->staticname($_[1]);
     42  1.1  christos     return $in_libname
     43  1.1  christos         if $unified_info{attributes}->{libraries}->{$_[1]}->{noinst};
     44  1.1  christos 
     45  1.1  christos     return platform::BASE::__concat($_[0]->osslprefix(),
     46  1.1  christos                                     platform::BASE->staticname($_[1]),
     47  1.1  christos                                     $target{pointer_size});
     48  1.1  christos }
     49  1.1  christos 
     50  1.1  christos # To enable installation of multiple major OpenSSL releases, we include the
     51  1.1  christos # version number in installed shared library names.
     52  1.1  christos my $sover_filename =
     53  1.1  christos     join('', map { sprintf "%02d", $_ } split(m|\.|, $config{shlib_version}));
     54  1.1  christos sub shlib_version_as_filename {
     55  1.1  christos     return $sover_filename;
     56  1.1  christos }
     57  1.1  christos sub sharedname {
     58  1.1  christos     return platform::BASE::__concat($_[0]->osslprefix(),
     59  1.1  christos                                     platform::BASE->sharedname($_[1]),
     60  1.1  christos                                     $_[0]->shlib_version_as_filename(),
     61  1.1  christos                                     ($_[0]->shlibvariant() // ''),
     62  1.1  christos                                     "_shr$target{pointer_size}");
     63  1.1  christos }
     64  1.1  christos 
     65  1.1  christos 1;
     66