2
0

VMS.pm 2.1 KB

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