1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Refactor pkgconfig.sh

Refactor pkgconfig.sh to be able to use it
for Mbed TLS and TF-PSA-Crypto packages.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2024-10-17 17:49:57 +02:00
parent f85882de57
commit 4870e613f8
2 changed files with 12 additions and 5 deletions

View File

@ -135,7 +135,11 @@ component_test_cmake_as_package () {
make make
./cmake_package ./cmake_package
if [[ "$OSTYPE" == linux* ]]; then if [[ "$OSTYPE" == linux* ]]; then
PKG_CONFIG_PATH="${build_variant_dir}/mbedtls/pkgconfig" ${root_dir}/tests/scripts/pkgconfig.sh PKG_CONFIG_PATH="${build_variant_dir}/mbedtls/pkgconfig" \
${root_dir}/tests/scripts/pkgconfig.sh \
mbedtls mbedx509 mbedcrypto
# These are the EXPECTED package names. Renaming these could break
# consumers of pkg-config, consider carefully.
fi fi
} }

View File

@ -18,11 +18,14 @@
set -e -u set -e -u
# These are the EXPECTED package names. Renaming these could break if [ $# -le 0 ]
# consumers of pkg-config, consider carefully. then
all_pcs="mbedtls mbedx509 mbedcrypto" echo " [!] No package names specified" >&2
echo "Usage: $0 <package name 1> <package name 2> ..." >&2
exit 1
fi
for pc in $all_pcs; do for pc in "$@"; do
printf "testing package config file: ${pc} ... " printf "testing package config file: ${pc} ... "
pkg-config --validate "${pc}" pkg-config --validate "${pc}"
version="$(pkg-config --modversion "${pc}")" version="$(pkg-config --modversion "${pc}")"