package/swupdate: add optional systemd dependency
authorJames Hilliard <james.hilliard1@gmail.com>
Mon, 30 Mar 2020 00:26:49 +0000 (18:26 -0600)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 4 Apr 2020 21:01:39 +0000 (23:01 +0200)
When the swupdate SYSTEMD option is enabled, systemd needs to be built
before swupdate, otherwise the build fails with:

core/notifier.c:27:10: fatal error: systemd/sd-daemon.h: No such file or directory
   27 | #include <systemd/sd-daemon.h>
      |          ^~~~~~~~~~~~~~~~~~~~~

Of course, it remains up to the user to make sure that the systemd
package is enabled when systemd support is enabled in the swupdate
configuration.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/swupdate/swupdate.mk

index 237a44e2334993e7786ad1b1d1d55ad47d27d3b7..2b51edb66d950df78a1736f681a98b5c0999505c 100644 (file)
@@ -110,6 +110,10 @@ SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=n
 endif
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+SWUPDATE_DEPENDENCIES += systemd
+endif
+
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS),y)
 SWUPDATE_DEPENDENCIES += uboot-tools
 SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=y