ci: switch to pkgconf on Linux too

And delete dead code

Change-Id: I8e035c0099f4b6679240486afa0775fe558efd1d
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index deb3219..7ed8a10 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -14,21 +14,20 @@
     libboost-thread-dev
     libsqlite3-dev
     libssl-dev
-    pkg-config
+    pkgconf
     python3
 )
+DNF_PKGS=(
+    boost-devel
+    gcc-c++
+    libasan
+    lld
+    openssl-devel
+    pkgconf
+    python3
+    sqlite-devel
+)
 FORMULAE=(boost openssl pkgconf)
-PIP_PKGS=()
-case $JOB_NAME in
-    *code-coverage)
-        APT_PKGS+=(lcov python3-pip)
-        PIP_PKGS+=('gcovr~=5.2')
-        ;;
-    *Docs)
-        APT_PKGS+=(python3-pip)
-        PIP_PKGS+=(sphinx)
-        ;;
-esac
 
 set -x
 
@@ -43,10 +42,5 @@
     sudo apt-get update -qq
     sudo apt-get install -qy --no-install-recommends "${APT_PKGS[@]}"
 elif [[ $ID_LIKE == *fedora* ]]; then
-    sudo dnf install -y gcc-c++ libasan lld pkgconf-pkg-config python3 \
-                        boost-devel openssl-devel sqlite-devel
-fi
-
-if (( ${#PIP_PKGS[@]} )); then
-    pip3 install --user --upgrade --upgrade-strategy=eager "${PIP_PKGS[@]}"
+    sudo dnf install -y "${DNF_PKGS[@]}"
 fi
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 090e65d..48a8874 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -11,7 +11,7 @@
     conf.start_msg('Checking C++ compiler version')
 
     cxx = conf.env.CXX_NAME # generic name of the compiler
-    ccver = tuple(int(i) for i in conf.env.CC_VERSION)
+    ccver = get_compiler_ver(conf)
     ccverstr = '.'.join(conf.env.CC_VERSION)
     errmsg = ''
     warnmsg = ''
@@ -60,6 +60,10 @@
     conf.env.DEFINES += generalFlags['DEFINES']
 
 
+def get_compiler_ver(conf):
+    return tuple(int(i) for i in conf.env.CC_VERSION)
+
+
 @Configure.conf
 def check_compiler_flags(conf):
     # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
@@ -124,9 +128,6 @@
 
 
 class CompilerFlags:
-    def getCompilerVersion(self, conf):
-        return tuple(int(i) for i in conf.env.CC_VERSION)
-
     def getGeneralFlags(self, conf):
         """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
         return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []}
@@ -226,7 +227,7 @@
         elif Utils.unversioned_sys_platform() == 'freebsd':
             # Bug #4790
             flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
-        if self.getCompilerVersion(conf) >= (18, 0, 0):
+        if get_compiler_ver(conf) >= (18, 0, 0) and get_compiler_ver(conf) < (20, 1, 0):
             # Bug #5300
             flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
         return flags
@@ -240,10 +241,10 @@
         flags = super().getDebugFlags(conf)
         flags['CXXFLAGS'] += self.__cxxFlags
         # Enable assertions in libc++
-        if self.getCompilerVersion(conf) >= (18, 0, 0):
+        if get_compiler_ver(conf) >= (18, 0, 0):
             # https://libcxx.llvm.org/Hardening.html
             flags['DEFINES'] += ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
-        elif self.getCompilerVersion(conf) >= (15, 0, 0):
+        elif get_compiler_ver(conf) >= (15, 0, 0):
             # https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
             flags['DEFINES'] += ['_LIBCPP_ENABLE_ASSERTIONS=1']
         # Tell libc++ to avoid including transitive headers