libv4l: Add new package libv4l
PATCH 1/1 libv4l: Add new package libv4l
--- package/libv4l/Config.in | 10 ++++++++++ package/libv4l/libv4l.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 package/libv4l/Config.in create mode 100644 package/libv4l/libv4l.mk
package/libv4l/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBV4L + bool "libv4l" + depends on BR2_LARGEFILE + help + libv4l is an accompanying collection of libraries that adds a thin abstraction layer on top of video4linux2 (V4L2) devices. + + http://freshmeat.net/projects/libv4l + +comment "libv4l requires a toolchain with LARGEFILE support" + depends on !BR2_LARGEFILE
package/libv4l/libv4l.mk new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 1/1 libv4l: Add new package libv4l
Hello Klaus,
Thanks for this new package. A couple of comments below.
package/libv4l/Config.in line 7
Quoted 10 lines · On Fri, 4 Mar 2011 16:47:00 +0100 Klaus Schwarzkopf…
package/libv4l/Config.in new file +7
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBV4L + bool "libv4l" + depends on BR2_LARGEFILE + help + libv4l is an accompanying collection of libraries that adds a thin abstraction layer on top of video4linux2 (V4L2) devices. + + http://freshmeat.net/projects/libv4l
The help text indentation should be one tab + 2 spaces, and should be wrapped at a reasonable length (~80 columns).
package/libv4l/Config.in
Quoted 6 lines
package/libv4l/Config.in new file +6
-0+############################################################# +# +# libv4l +# +############################################################# +LIBV4L_VERSION = 0.8.1
Version 0.8.3 is the latest release. Any reason not to use it ?
package/libv4l/Config.in
Quoted 7 lines
package/libv4l/Config.in new file +6
-0+LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2 +LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils/ +LIBV4L_INSTALL_STAGING = YES +LIBV4L_INSTALL_TARGET = YES +LIBV4L_CONF_OPT = --enable-shared \ + --enable-static \
Since you're using the GENTARGETS infrastructure, this line is useless.
package/libv4l/Config.in
Quoted 3 lines
package/libv4l/Config.in new file +3
-0+ +define LIBV4L_BUILD_CMDS + #$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
Comment, remove.
package/libv4l/Config.in
Quoted 2 lines
package/libv4l/Config.in new file +2
-0+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usr LINKTYPE=static + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usr
static linking is only needed when BR2_PREFER_STATIC_LIB is used. So something like :
LIBV4L_MAKE_OPTS = PREFIX=/usr
ifeq ($(BR2_PREFER_STATIC_LIB),y)LIBV4L_MAKE_OPTS += LINKTYPE=static
endif
define LIBV4L_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib $(LIBV4AL_MAKE_OPTS)
endif
Moreover, why do you build only the library ? There are some utilities in utils/ that may be interesting to build (not all of them, since at least one of them depends on Qt, and we don't want libv4l to depend on Qt). You could add a sub-option "Install libv4l utils" to be able to selectively install or not the libv4l utilities.
Quoted 1 line
+#CFLAGS=-DO_LARGEFILE=0400000
Comment, remove.
Quoted 11 lines
package/libv4l/Config.in new file +11
-0+endef + +define LIBV4L_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.a $(STAGING_DIR)/usr/lib/libv4l1.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4l1.h $(STAGING_DIR)/usr/include/libv4l1.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.so* $(STAGING_DIR)/usr/lib + + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.a $(STAGING_DIR)/usr/lib/libv4l2.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4l2.h $(STAGING_DIR)/usr/include/libv4l2.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.so* $(STAGING_DIR)/usr/lib +
package/libv4l/Config.in
Quoted 10 lines
package/libv4l/Config.in new file +10
-0+ $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.a $(STAGING_DIR)/usr/lib/libv4l2.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4lconvert.h $(STAGING_DIR)/usr/include/libv4lconvert.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.so* $(STAGING_DIR)/usr/lib +endef + +define LIBV4L_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.so* $(TARGET_DIR)/usr/lib + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.so* $(TARGET_DIR)/usr/lib + $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.so* $(TARGET_DIR)/usr/lib +endef
Why don't you use the "make install" target here ? The libv4l Makefile supports the $(DESTDIR) variable, so something like:
define LIBV4L_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install
endif
define LIBV4L_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr install
endif
should work.
Quoted 2 lines
+$(eval $(call GENTARGETS,package,libv4l))
+#$(eval $(call AUTOTARGETS,package,libv4l))
Comment, remove.
Regards!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 libv4l: Add new package libv4l
Hello Thomas,
i have made a new patch with the changes.
Thanks for your response!
The libv4l utilities are in my next patch.
Regards,
Klaus
Am 07.03.2011 14:42, schrieb Thomas Petazzoni:
Quoted 114 lines
Hello Klaus,
Thanks for this new package. A couple of comments below.
package/libv4l/Config.in line 7
Quoted 10 lines · On Fri, 4 Mar 2011 16:47:00 +0100 Klaus…
package/libv4l/Config.in new file +7
-0@@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBV4L + bool "libv4l" + depends on BR2_LARGEFILE + help + libv4l is an accompanying collection of libraries that adds a thin abstraction layer on top of video4linux2 (V4L2) devices. + + http://freshmeat.net/projects/libv4lThe help text indentation should be one tab + 2 spaces, and should be wrapped at a reasonable length (~80 columns).
package/libv4l/Config.in
Quoted 6 lines
package/libv4l/Config.in new file +6
-0+############################################################# +# +# libv4l +# +############################################################# +LIBV4L_VERSION = 0.8.1Version 0.8.3 is the latest release. Any reason not to use it ?
package/libv4l/Config.in
Quoted 7 lines
package/libv4l/Config.in new file +6
-0+LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2 +LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils/ +LIBV4L_INSTALL_STAGING = YES +LIBV4L_INSTALL_TARGET = YES +LIBV4L_CONF_OPT = --enable-shared \ + --enable-static \Since you're using the GENTARGETS infrastructure, this line is useless.
package/libv4l/Config.in
Quoted 3 lines
package/libv4l/Config.in new file +3
-0+ +define LIBV4L_BUILD_CMDS + #$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) allComment, remove.
package/libv4l/Config.in
Quoted 2 lines
package/libv4l/Config.in new file +2
-0+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usr LINKTYPE=static + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usrstatic linking is only needed when
BR2_PREFER_STATIC_LIBis used. So something like :
LIBV4L_MAKE_OPTS= PREFIX=/usr
ifeq ($(BR2_PREFER_STATIC_LIB),y)LIBV4L_MAKE_OPTS+= LINKTYPE=static
endifdefine
LIBV4L_BUILD_CMDS$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib $(LIBV4AL_MAKE_OPTS)endif
Moreover, why do you build only the library ? There are some utilities in utils/ that may be interesting to build (not all of them, since at least one of them depends on Qt, and we don't want libv4l to depend on Qt). You could add a sub-option "Install libv4l utils" to be able to selectively install or not the libv4l utilities.
Quoted 1 line
+#CFLAGS=-DO_LARGEFILE=0400000
Comment, remove.
Quoted 11 lines
package/libv4l/Config.in new file +11
-0+endef + +define LIBV4L_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.a $(STAGING_DIR)/usr/lib/libv4l1.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4l1.h $(STAGING_DIR)/usr/include/libv4l1.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.so* $(STAGING_DIR)/usr/lib + + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.a $(STAGING_DIR)/usr/lib/libv4l2.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4l2.h $(STAGING_DIR)/usr/include/libv4l2.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.so* $(STAGING_DIR)/usr/lib +package/libv4l/Config.in
Quoted 10 lines
package/libv4l/Config.in new file +10
-0+ $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.a $(STAGING_DIR)/usr/lib/libv4l2.a + $(INSTALL) -D -m 0644 $(@D)/lib/include/libv4lconvert.h $(STAGING_DIR)/usr/include/libv4lconvert.h + $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.so* $(STAGING_DIR)/usr/lib +endef + +define LIBV4L_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l1/libv4l1.so* $(TARGET_DIR)/usr/lib + $(INSTALL) -D -m 0755 $(@D)/lib/libv4l2/libv4l2.so* $(TARGET_DIR)/usr/lib + $(INSTALL) -D -m 0755 $(@D)/lib/libv4lconvert/libv4lconvert.so* $(TARGET_DIR)/usr/lib +endefWhy don't you use the "make install" target here ? The libv4l
Makefilesupports the $(DESTDIR) variable, so something like:define
LIBV4L_INSTALL_STAGING_CMDS$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr installendif
define
LIBV4L_INSTALL_TARGET_CMDS$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr installendif
should work.
Quoted 2 lines
+$(eval $(call GENTARGETS,package,libv4l))
+#$(eval $(call AUTOTARGETS,package,libv4l))Comment, remove.
Regards!
Thomas