ci: upgrade gcovr to the latest version

And adjust lcov invocation for lcov 2.1

Change-Id: I9fc71d72bcfc2d9b48e90a221087648c076a6640
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index bb9d8cc..16f7474 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -32,7 +32,7 @@
 FORMULAE=(boost openssl pkgconf)
 case $JOB_NAME in
     *code-coverage)
-        APT_PKGS+=(lcov)
+        APT_PKGS+=(lcov libjson-xs-perl)
         ;;
     *Docs)
         ;;
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index fadb5b1..d8c998c 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -8,29 +8,36 @@
 
 set -x
 
-# Generate an XML report (Cobertura format) and a detailed HTML report using gcovr
+# Generate a detailed HTML report and an XML report in Cobertura format using gcovr
 # Note: trailing slashes are important in the paths below. Do not remove them!
-uvx gcovr@5.2 \
-    --object-directory build \
+uvx --from 'git+https://github.com/gcovr/gcovr@99b82e7' gcovr \
+    --decisions \
     --filter tools/ \
     --exclude-throw-branches \
     --exclude-unreachable-branches \
     --cobertura build/coverage.xml \
     --html-details build/gcovr/ \
-    --print-summary
+    --txt-summary \
+    build
 
 # Generate a detailed HTML report using lcov
-lcov --quiet \
-     --capture \
-     --directory . \
-     --exclude "$PWD/tests/*" \
-     --no-external \
-     --rc lcov_branch_coverage=1 \
-     --output-file build/coverage.info
+lcov \
+    --quiet \
+    --capture \
+    --directory . \
+    --include "$PWD/tools/*" \
+    --ignore-errors count,inconsistent \
+    --branch-coverage \
+    --rc no_exception_branch=1 \
+    --output-file build/coverage.info
 
-genhtml --branch-coverage \
-        --demangle-cpp \
-        --legend \
-        --output-directory build/lcov \
-        --title "ndn-tools unit tests" \
-        build/coverage.info
+genhtml \
+    --quiet \
+    --branch-coverage \
+    --demangle-cpp \
+    --legend \
+    --missed \
+    --show-proportion \
+    --title "ndn-tools $(cat VERSION.info)" \
+    --output-directory build/lcov \
+    build/coverage.info