package/gerbera: add optional duktape dependency
authorJörg Krause <joerg.krause@embedded.rocks>
Thu, 25 Feb 2021 10:53:55 +0000 (11:53 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 1 Mar 2021 21:20:36 +0000 (22:20 +0100)
Duktape allows the user to enable JavaScript scripting support.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gerbera/Config.in
package/gerbera/gerbera.mk

index b734de95de715eddab9e5499f7392c36c72bd76a..33a9705bea5f09d9de9c308e81bfb31826902588 100644 (file)
@@ -20,6 +20,9 @@ config BR2_PACKAGE_GERBERA
          A free media server.
          Stream your media to devices on your home network.
 
+         Select BR2_PACKAGE_DUKTAPE if you want to enable JavaScript
+         for scripting.
+
          https://gerbera.io
 
 comment "gerbera needs a toolchain w/ C++, threads, wchar, gcc >= 8"
index 6e363777981eacb491534161ec0b9bd11eec05e7..ccb3b2eeb5b1d4ed3188b26ea80c8b7df3d4eec5 100644 (file)
@@ -16,15 +16,20 @@ GERBERA_DEPENDENCIES = \
        sqlite \
        util-linux \
        zlib
-GERBERA_CONF_OPTS = \
-       -DWITH_DEBUG=OFF \
-       -DWITH_JS=OFF
+GERBERA_CONF_OPTS = -DWITH_DEBUG=OFF
 
 # Uses __atomic_fetch_add_4
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 GERBERA_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
 endif
 
+ifeq ($(BR2_PACKAGE_DUKTAPE),y)
+GERBERA_DEPENDENCIES += duktape
+GERBERA_CONF_OPTS += -DWITH_JS=ON
+else
+GERBERA_CONF_OPTS += -DWITH_JS=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_EXIV2),y)
 GERBERA_DEPENDENCIES += exiv2
 GERBERA_CONF_OPTS += -DWITH_EXIV2=ON