mac: Move to using cppcheck via apt install

Not clear based on history why cppcheck was installed manually vs. using
apt install. Manually building the package on a mac os causes a hang and
eventually a g++ core dump.

Tested:
- Verified 1.88 is installed and works fine
- Verified successful run of run-unit-test-docker.sh against
phosphor-state-manager repo on a macbook pro

Change-Id: I48ec53e4eb63c3f47363cc50fd4894ba3d584741
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index fed3de2..0fc3537 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -107,7 +107,6 @@
   [libvncserver]=1354f7f1bb6962dab209eddb9d6aac1f03408110
   # version from meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_5.0.1.bb
   [tinyxml2]=37bc3aca429f0164adf68c23444540b4a24b5778
-  [cppcheck]=df32b0fb05f0c951ab0efa691292c7428f3f50a9
 )
 
 # Turn the depcache into a dictionary so we can reference the HEAD of each repo
@@ -233,7 +232,8 @@
     libjson-perl \
     protobuf-compiler \
     libgpiod-dev \
-    device-tree-compiler
+    device-tree-compiler \
+    cppcheck
 
 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 \
   --slave /usr/bin/g++ g++ /usr/bin/g++-9 \
@@ -302,13 +302,6 @@
 ./bootstrap.sh --prefix=${PREFIX} --with-libraries=context,coroutine && \
 ./b2 && ./b2 install --prefix=${PREFIX}
 
-FROM openbmc-base as openbmc-cppcheck
-RUN curl -L https://github.com/danmar/cppcheck/archive/${PKG_REV['cppcheck']}.tar.gz | tar -xz && \
-cd cppcheck-* && \
-mkdir "${PREFIX}/cppcheck-cfg" && cp cfg/* "${PREFIX}/cppcheck-cfg/" && \
-make -j$(nproc) CFGDIR="${PREFIX}/cppcheck-cfg" CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" && \
-make PREFIX=${PREFIX} install
-
 FROM openbmc-base as openbmc-tinyxml2
 RUN curl -L https://github.com/leethomason/tinyxml2/archive/${PKG_REV['tinyxml2']}.tar.gz | tar -xz && \
 cd tinyxml2-* && \