2018-05-22 15:22:19 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
2022-12-11 10:54:48 +08:00
|
|
|
cflags=$1
|
|
|
|
libs=$2
|
|
|
|
bin=$3
|
|
|
|
|
2018-05-22 15:22:19 +08:00
|
|
|
PKG="Qt5Core Qt5Gui Qt5Widgets"
|
|
|
|
|
2022-04-02 07:18:02 +08:00
|
|
|
if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
|
kconfig: do not require pkg-config on make {menu,n}config
Meelis Roos reported a {menu,n}config regression:
"I have libncurses devel package installed in the default system
location (as do 99%+ on actual developers probably) and in this
case, pkg-config is useless. pkg-config is needed only when
libraries and headers are installed in non-default locations but
it is bad to require installation of pkg-config on all the machines
where make menuconfig would be possibly run."
For {menu,n}config, do not use pkg-config if it is not installed.
For {g,x}config, keep checking pkg-config since we really rely on it
for finding the installation paths of the required packages.
Fixes: 4ab3b80159d4 ("kconfig: check for pkg-config on make {menu,n,g,x}config")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
2018-08-31 17:34:55 +08:00
|
|
|
echo >&2 "*"
|
2022-04-02 07:18:02 +08:00
|
|
|
echo >&2 "* 'make xconfig' requires '${HOSTPKG_CONFIG}'. Please install it."
|
kconfig: do not require pkg-config on make {menu,n}config
Meelis Roos reported a {menu,n}config regression:
"I have libncurses devel package installed in the default system
location (as do 99%+ on actual developers probably) and in this
case, pkg-config is useless. pkg-config is needed only when
libraries and headers are installed in non-default locations but
it is bad to require installation of pkg-config on all the machines
where make menuconfig would be possibly run."
For {menu,n}config, do not use pkg-config if it is not installed.
For {g,x}config, keep checking pkg-config since we really rely on it
for finding the installation paths of the required packages.
Fixes: 4ab3b80159d4 ("kconfig: check for pkg-config on make {menu,n,g,x}config")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Meelis Roos <mroos@linux.ee>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
2018-08-31 17:34:55 +08:00
|
|
|
echo >&2 "*"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-04-02 07:18:02 +08:00
|
|
|
if ${HOSTPKG_CONFIG} --exists $PKG; then
|
2022-12-11 10:54:48 +08:00
|
|
|
${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
|
|
|
|
${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
|
|
|
|
${HOSTPKG_CONFIG} --variable=host_bins Qt5Core > ${bin}
|
2018-05-22 15:22:19 +08:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo >&2 "*"
|
2022-04-02 07:18:02 +08:00
|
|
|
echo >&2 "* Could not find Qt5 via ${HOSTPKG_CONFIG}."
|
2020-10-24 20:38:39 +08:00
|
|
|
echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH"
|
2022-07-21 01:37:49 +08:00
|
|
|
echo >&2 "* You need $PKG"
|
2018-05-22 15:22:19 +08:00
|
|
|
echo >&2 "*"
|
|
|
|
exit 1
|