[meta-oe,5/8] wpa-supplicant: Build static library if not DISABLE_STATIC

Message ID 20220412130315.25917-5-alexk@zuma.ai
State New
Headers show
Series [meta-oe,1/8] wpa-supplicant: Reorder/group following style guide | expand

Commit Message

Alex Kiernan April 12, 2022, 1:03 p.m. UTC
Build the static library if the configuration indicates we should.

Signed-off-by: Alex Kiernan <alexk@zuma.ai>
---
 .../wpa-supplicant/wpa-supplicant_2.10.bb             | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb
index f72a925ac883..43865ed96045 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.10.bb
@@ -55,6 +55,9 @@  do_compile () {
 	unset CFLAGS CPPFLAGS CXXFLAGS
 	sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
 	oe_runmake -C wpa_supplicant
+	if [ -z "${DISABLE_STATIC}" ]; then
+		oe_runmake -C wpa_supplicant libwpa_client.a
+	fi
 }
 
 do_install () {
@@ -89,6 +92,14 @@  do_install () {
 
 	install -d ${D}/etc/default/volatiles
 	install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
+
+	install -d ${D}${includedir}
+	install -m 0644 ${S}/src/common/wpa_ctrl.h ${D}${includedir}
+
+	if [ -z "${DISABLE_STATIC}" ]; then
+		install -d ${D}${libdir}
+		install -m 0644 wpa_supplicant/libwpa_client.a ${D}${libdir}
+	fi
 }
 
 pkg_postinst:${PN} () {