Skip to content

Commit

Permalink
Fix util/wrap.pl.in for VMS usage
Browse files Browse the repository at this point in the history
In the name of consistency, make sure that this same script is used
across more platforms, in this case VMS.  This removes the need for
util/local_shlib.com.in and util/unlocal_shlib.com.in, which were
under-used anyway.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #20415)
  • Loading branch information
levitte committed Mar 8, 2023
1 parent 9313694 commit 1939ee7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 71 deletions.
6 changes: 1 addition & 5 deletions util/build.info
@@ -1,8 +1,4 @@
IF[{- $target{build_scheme}->[1] eq "VMS" -}]
SCRIPTS{noinst}=local_shlib.com unlocal_shlib.com
SOURCE[local_shlib.com]=local_shlib.com.in
SOURCE[unlocal_shlib.com]=unlocal_shlib.com.in
ELSIF[{- $target{build_scheme}->[1] eq "unix" -}]
IF[{- $target{build_scheme}->[1] eq "unix" -}]
SCRIPTS{noinst}=shlib_wrap.sh
SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in
ENDIF
Expand Down
31 changes: 0 additions & 31 deletions util/local_shlib.com.in

This file was deleted.

27 changes: 0 additions & 27 deletions util/unlocal_shlib.com.in

This file was deleted.

34 changes: 26 additions & 8 deletions util/wrap.pl.in
Expand Up @@ -23,6 +23,7 @@ my $std_engines = catdir($there, 'engines');
my $std_providers = catdir($there, 'providers');
my $std_openssl_conf = catdir($there, 'apps/openssl.cnf');
my $unix_shlib_wrap = catfile($there, 'util/shlib_wrap.sh');
my $std_openssl_conf_include;

if ($ARGV[0] eq '-fips') {
$std_openssl_conf = {-
Expand All @@ -32,19 +33,36 @@ if ($ARGV[0] eq '-fips') {
-};
shift;

my $std_openssl_conf_include = catdir($there, 'providers');
$ENV{OPENSSL_CONF_INCLUDE} = $std_openssl_conf_include
if ($ENV{OPENSSL_CONF_INCLUDE} // '') eq ''
&& -d $std_openssl_conf_include;
$std_openssl_conf_include = catdir($there, 'providers');
}

$ENV{OPENSSL_ENGINES} = $std_engines
local $ENV{OPENSSL_CONF_INCLUDE} = $std_openssl_conf_include
if defined $std_openssl_conf_include
&&($ENV{OPENSSL_CONF_INCLUDE} // '') eq ''
&& -d $std_openssl_conf_include;
local $ENV{OPENSSL_ENGINES} = $std_engines
if ($ENV{OPENSSL_ENGINES} // '') eq '' && -d $std_engines;
$ENV{OPENSSL_MODULES} = $std_providers
local $ENV{OPENSSL_MODULES} = $std_providers
if ($ENV{OPENSSL_MODULES} // '') eq '' && -d $std_providers;
$ENV{OPENSSL_CONF} = $std_openssl_conf
local $ENV{OPENSSL_CONF} = $std_openssl_conf
if ($ENV{OPENSSL_CONF} // '') eq '' && -f $std_openssl_conf;

{-
# For VMS, we define logical names to get the libraries properly
# defined.
use File::Spec::Functions qw(rel2abs);

if ($^O eq "VMS") {
my $bldtop = rel2abs($config{builddir});
my %names =
map { platform->sharedname($_) => $bldtop.platform->sharedlib($_) }
grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
@{$unified_info{libraries}};

foreach (sort keys %names) {
$OUT .= "local \$ENV\{'$_'\} = '$names{$_}';\n";
}
}
-}
my $use_system = 0;
my @cmd;

Expand Down

0 comments on commit 1939ee7

Please sign in to comment.