add nghttp2 dependency on bmcweb

This commit is part of the review here:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40978

It adds a compile time dependency on nghttp2, and adjusts some of the
build params for OpenBMC.  Namely:
1. Building only a static library.
2. Enabling LTO.
3. Removing all features that we don't use (to reduce binary size)

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ifa9695c3c2313b4895d500a410307ef71ae1fad9
diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
index 35b5f31..29a60b5 100644
--- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
+++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb
@@ -9,6 +9,7 @@
     gtest \
     nlohmann-json \
     libtinyxml2 \
+    nghttp2 \
     ${@bb.utils.contains('PTEST_ENABLED', '1', 'gtest', '', d)} \
     ${@bb.utils.contains('PTEST_ENABLED', '1', 'gmock', '', d)} \
 "
diff --git a/meta-phosphor/recipes-support/nghttp2/nghttp2_%.bbappend b/meta-phosphor/recipes-support/nghttp2/nghttp2_%.bbappend
new file mode 100644
index 0000000..f1757e9
--- /dev/null
+++ b/meta-phosphor/recipes-support/nghttp2/nghttp2_%.bbappend
@@ -0,0 +1,15 @@
+EXTRA_OECMAKE:prepend = " \
+    -DENABLE_LIB_ONLY=ON \
+    -DENABLE_STATIC_LIB=ON \
+    -DENABLE_SHARED_LIB=OFF \
+    -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
+    -DENABLE_SHARED_LIB=OFF \
+    -DENABLE_HTTP3=OFF \
+    -DWITH_LIBXML2=OFF \
+    -DWITH_JEMALLOC=OFF \
+    -DWITH_MRUBY=OFF \
+    -DWITH_NEVERBLEED=OFF \
+    -DWITH_LIBBPF=OFF \
+    -DENABLE_ASIO_LIB=OFF \
+    -DENABLE_THREADS=OFF \
+"