Signed-off-by: Michael Olbrich <[email protected]>
---
Would this work? Or do we need to exclude /usr/lib explicitly as well?
Michael
scripts/pkg-config-wrapper | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper
index d86fa7c683b5..dd786e47b212 100755
--- a/scripts/pkg-config-wrapper
+++ b/scripts/pkg-config-wrapper
@@ -17,9 +17,11 @@ else
fi
declare -a libdir system_path system_incpath
-libdir=( $(find ${prefix} -maxdepth 3 -type d -name pkgconfig) )
-system_libpath=( "${libdir[@]/%//../../lib}" "${libdir[@]/%//../lib}"
"/usr/lib" "/lib" )
-system_incpath=( "${libdir[@]/%//../../include}" "${libdir[@]/%//../include}"
"/usr/include" "/include" )
+libdir=( $(find ${prefix} -maxdepth 3 -type d -path */lib*/pkgconfig) )
+lib="$(basename $(dirname ${libdir[0]}))"
+libdir+=( "${prefix/%//share/pkgconfig}" )
+system_libpath=( "${libdir[@]/%//../../${lib}}" "/usr/${lib}" "/${lib}" )
+system_incpath=( "${libdir[@]/%//../../include}" "/usr/include" "/include" )
orig_IFS="${IFS}"
IFS=":"
--
2.29.2
_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to
[email protected]