libv4l: add options to install utilites
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 5 Apr 2011 10:05:08 +0000 (12:05 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 5 Apr 2011 10:05:08 +0000 (12:05 +0200)
These have extra deps though (C++ for some, argp.h for others which is not
available on uClibc).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libv4l/Config.in
package/libv4l/libv4l.mk

index 1620b93a33ecfd4c30029b2c2752d2760f296e2c..1e5eec642d9e676f209d8ad9945468f543cd08f3 100644 (file)
@@ -7,5 +7,55 @@ config BR2_PACKAGE_LIBV4L
 
          http://freshmeat.net/projects/libv4l
 
+if BR2_PACKAGE_LIBV4L
+
+config BR2_PACKAGE_LIBV4L_DECODE_TM6000
+       bool "decode_tm6000"
+       depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc
+       help
+         Tool to decode tm6000 proprietary format streams
+
+comment "decode_tm6000 requires a GLIBC based toolchain"
+       depends on !(BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc)
+
+config BR2_PACKAGE_LIBV4L_IR_KEYTABLE
+       bool "ir-keytable"
+       depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc
+       help
+         Tool to alter keymaps of Remote Controller devices
+
+comment "ir-keytable requires a GLIBC based toolchain"
+       depends on !(BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc)
+
+config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE
+       bool "v4l2-compliance"
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         Tool to test v4l2 API compliance of drivers
+
+comment "v4l2-compliance requires a toolchain with C++ support enabled"
+       depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_LIBV4L_V4L2_CTL
+       bool "v4l2-ctl"
+       depends on BR2_INSTALL_LIBSTDCPP
+       default y
+       help
+         Tool to configure v4l2 controls from the cmdline
+
+comment "v4l2-ctl requires a toolchain with C++ support enabled"
+       depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_LIBV4L_V4L2_DBG
+       bool "v4l2-dbg"
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         Tool to directly get and set registers of v4l2 devices
+
+comment "v4l2-dbg requires a toolchain with C++ support enabled"
+       depends on !BR2_INSTALL_LIBSTDCPP
+
+endif
+
 comment "libv4l requires a toolchain with LARGEFILE support"
         depends on !BR2_LARGEFILE
index a72320ee67fa91444ccbcbd50a7daa01bf744287..1ea859aa328ece5d9c3276273334ea99587ba9b9 100644 (file)
@@ -9,20 +9,33 @@ LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils/
 LIBV4L_INSTALL_STAGING = YES
 LIBV4L_MAKE_OPTS = PREFIX=/usr
 
+LIBV4L_DIRS_y += lib
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_DECODE_TM6000)        += utils/decode_tm6000
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_IR_KEYTABLE)  += utils/keytable
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE) += utils/v4l2-compliance
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_CTL)     += utils/v4l2-ctl
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_DBG)     += utils/v4l2-dbg
+
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
        LIBV4L_MAKE_OPTS += LINKTYPE=static
 endif
 
 define LIBV4L_BUILD_CMDS
-       $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib $(LIBV4L_MAKE_OPTS)
+       for i in $(LIBV4L_DIRS_y); do \
+               $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$$i \
+                       $(LIBV4L_MAKE_OPTS); done
 endef
 
 define LIBV4L_INSTALL_STAGING_CMDS
-       $(MAKE) -C $(@D)/lib DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install
+       for i in $(LIBV4L_DIRS_y); do \
+               $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$$i \
+                       DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install; done
 endef
 
 define LIBV4L_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install
+       for i in $(LIBV4L_DIRS_y); do \
+               $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$$i \
+                       DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install; done
 endef
 
 $(eval $(call GENTARGETS,package,libv4l))