phosphor-host-postd: add 7-segment display support

Add '7seg' to the PACKAGECONFIG to enable the 7 segment display daemon
for a machine.

(From meta-phosphor rev: a41f2463815d2a9382d5249fbb7654226032f9ce)

Change-Id: I3602b3526cc3bbbcabb5e5a778ea7bad7b509fe7
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb b/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb
index 4d12a96..a1a9f52 100644
--- a/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb
+++ b/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb
@@ -9,6 +9,9 @@
 inherit autotools pkgconfig
 inherit systemd
 
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[7seg] = "--enable-7seg,--disable-7seg,,udev"
+
 DEPENDS += "autoconf-archive-native"
 DEPENDS += "sdbusplus"
 DEPENDS += "sdeventplus"
@@ -31,3 +34,10 @@
   POST_CODE_BYTES="${POST_CODE_BYTES}" \
   SYSTEMD_TARGET="multi-user.target" \
 "
+
+POSTCODE_SEVENSEG_DEVICE ?= "seven_seg_disp_val"
+SERVICE_FILE_7SEG = " \
+  postcode-7seg@.service \
+  postcode-7seg@${POSTCODE_SEVENSEG_DEVICE}.service \
+"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', '7seg', '${SERVICE_FILE_7SEG}', '', d)}"