diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-08-31 01:49:54 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-08-31 01:49:54 -0400 |
| commit | 97fa708ecc14ca8a2136b586b7eca113b7020fd3 (patch) | |
| tree | 1edf6b390ce24cef554ba6f73a527602eaac6755 /sbopkglint.d/95-pkgconfig.t.sh | |
| parent | 2b3e9b84ad566f3c45d2628b6f9114ba70751b25 (diff) | |
| download | sbo-maintainer-tools-0.9.8.tar.gz | |
Diffstat (limited to 'sbopkglint.d/95-pkgconfig.t.sh')
| -rw-r--r-- | sbopkglint.d/95-pkgconfig.t.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sbopkglint.d/95-pkgconfig.t.sh b/sbopkglint.d/95-pkgconfig.t.sh index ac0f182..cd77889 100644 --- a/sbopkglint.d/95-pkgconfig.t.sh +++ b/sbopkglint.d/95-pkgconfig.t.sh @@ -27,10 +27,13 @@ check_libinc_dir() { local flag=$2 local file=$3 local dir + local dir_rp #echo "===> $flag" dir="$( printf "%s" $flag | tail -c+3 )" + dir_rp="$( realpath -m "$dir" )" + case "$dir" in /usr/local*) warn "$file references $type dir $dir; /usr/local is incorrect" @@ -38,6 +41,27 @@ check_libinc_dir() { ;; esac + # 20260831 bkw: allow some common lib and include paths even if + # they're not in the package. scafacos was complaining: + # --- ERR: usr/lib64/pkgconfig/scafacos.pc references library dir /usr/lib64/gcc/x86_64-slackware-linux/11.2.0, but it's missing from the package + # ...even though it's a valid path on Slackware. also it was + # bitching about /lib/../lib64/, which isn't in the package, but + # shoud be allowed (as it's just /lib64). + + # note that realpath gets rid of any trailing slash(es), so + # /usr/include/ would come out /usr/include + if [ "$type" = "include" ]; then + case "$dir_rp" in + /usr/include) return ;; # always OK (shouldn't be mentioned in a .pc tho) + esac + elif [ "$type" = "library" ]; then + case "$dir_rp" in + /lib|/lib64|/usr/lib|/usr/lib64) return ;; + /usr/lib/gcc/*-slackware-linux/*) return ;; + /usr/lib64/gcc/*-slackware-linux/*) return ;; + esac + fi + [ -d $PKG/$dir ] || warn "$file references $type dir $dir, but it's missing from the package" } |
