diff options
author | Richard Levitte <levitte@openssl.org> | 2024-08-28 18:52:39 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2024-08-30 05:20:48 +0200 |
commit | 15b748496faeebb3b6d8021049bccc93903ee322 (patch) | |
tree | febb8f1f1a95e01d0f940929ecb3d19f584a687d | |
parent | endecode_test.c: Avoid running the SM2 tests with 3.0.0 FIPS provider (diff) | |
download | openssl-15b748496faeebb3b6d8021049bccc93903ee322.tar.xz openssl-15b748496faeebb3b6d8021049bccc93903ee322.zip |
exporters for pkg-config: align with the changes for CMake
The latest CMake exporter changes reworked the the variables in builddata.pm
and installdata.pm. Unfortunately, the pkg-config exporter templates were
forgotten in that effort.
Fixes #25299
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25308)
-rw-r--r-- | exporters/pkg-config/libcrypto.pc.in | 11 | ||||
-rw-r--r-- | exporters/pkg-config/libssl.pc.in | 13 | ||||
-rw-r--r-- | exporters/pkg-config/openssl.pc.in | 17 |
3 files changed, 29 insertions, 12 deletions
diff --git a/exporters/pkg-config/libcrypto.pc.in b/exporters/pkg-config/libcrypto.pc.in index f225bd6d22..3d56e97418 100644 --- a/exporters/pkg-config/libcrypto.pc.in +++ b/exporters/pkg-config/libcrypto.pc.in @@ -1,8 +1,13 @@ prefix={- $OpenSSL::safe::installdata::PREFIX[0] -} exec_prefix=${prefix} -libdir={- $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0] - ? '${exec_prefix}/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0] - : $OpenSSL::safe::installdata::libdir[0] -} +libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) { + my $x = ''; + $x = '/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0] + if $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]; + '${exec_prefix}' . $x; + } else { + $OpenSSL::safe::installdata::libdir[0]; + } -} includedir={- $OUT = ''; $OUT .= '${prefix}/' . $_ . ' ' foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -} diff --git a/exporters/pkg-config/libssl.pc.in b/exporters/pkg-config/libssl.pc.in index 80c91ec034..162db65c99 100644 --- a/exporters/pkg-config/libssl.pc.in +++ b/exporters/pkg-config/libssl.pc.in @@ -1,8 +1,13 @@ -prefix={- $OpenSSL::safe::installdata::PREFIX -} +prefix={- $OpenSSL::safe::installdata::PREFIX[0] -} exec_prefix=${prefix} -libdir={- $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX - ? '${exec_prefix}/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX - : $OpenSSL::safe::installdata::libdir -} +libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) { + my $x = ''; + $x = '/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0] + if $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]; + '${exec_prefix}' . $x; + } else { + $OpenSSL::safe::installdata::libdir[0]; + } -} includedir={- $OUT = ''; $OUT .= '${prefix}/' . $_ . ' ' foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -} diff --git a/exporters/pkg-config/openssl.pc.in b/exporters/pkg-config/openssl.pc.in index 225bef9e23..73eb8e73c2 100644 --- a/exporters/pkg-config/openssl.pc.in +++ b/exporters/pkg-config/openssl.pc.in @@ -1,9 +1,16 @@ -prefix={- $OpenSSL::safe::installdata::PREFIX -} +prefix={- $OpenSSL::safe::installdata::PREFIX[0] -} exec_prefix=${prefix} -libdir={- $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX - ? '${exec_prefix}/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX - : $OpenSSL::safe::installdata::libdir -} -includedir=${prefix}/{- $OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX -} +libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) { + my $x = ''; + $x = '/' . $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0] + if $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]; + '${exec_prefix}' . $x; + } else { + $OpenSSL::safe::installdata::libdir[0]; + } -} +includedir={- $OUT = ''; + $OUT .= '${prefix}/' . $_ . ' ' + foreach (@OpenSSL::safe::installdata::INCLUDEDIR_REL_PREFIX); -} Name: OpenSSL Description: Secure Sockets Layer and cryptography libraries and tools |