Lines 23-29
error() {
Link Here
|
23 |
# |
23 |
# |
24 |
# Sanity/distro checks |
24 |
# Sanity/distro checks |
25 |
# |
25 |
# |
26 |
MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR |
26 |
MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR |
27 |
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then |
27 |
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then |
28 |
error pkg-config is too old ... upgrade to at least v${MIN_VER} |
28 |
error pkg-config is too old ... upgrade to at least v${MIN_VER} |
29 |
fi |
29 |
fi |
Lines 81-92
export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc
Link Here
|
81 |
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then |
81 |
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then |
82 |
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}" |
82 |
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}" |
83 |
fi |
83 |
fi |
84 |
# |
84 |
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" |
85 |
# This guy is horribly broken in pkg-config <=0.23: |
|
|
86 |
# https://bugs.freedesktop.org/show_bug.cgi?id=16905 |
87 |
# |
88 |
#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" |
89 |
unset PKG_CONFIG_SYSROOT_DIR |
90 |
|
85 |
|
91 |
# |
86 |
# |
92 |
# Sanity check the output to catch common errors that do not |
87 |
# Sanity check the output to catch common errors that do not |
Lines 95-107
unset PKG_CONFIG_SYSROOT_DIR
Link Here
|
95 |
output=$(pkg-config "$@") |
90 |
output=$(pkg-config "$@") |
96 |
ret=$? |
91 |
ret=$? |
97 |
|
92 |
|
98 |
# |
|
|
99 |
# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed. |
100 |
# We can't mung the .pc files as some of the vars are used at compile |
101 |
# time to encode runtime paths. |
102 |
# |
103 |
output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g') |
104 |
|
105 |
# We turn the output into a newline separate string of options, then use grep |
93 |
# We turn the output into a newline separate string of options, then use grep |
106 |
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things |
94 |
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things |
107 |
# outside the ${SYSROOT}. |
95 |
# outside the ${SYSROOT}. |
108 |
- |
|
|