* [Buildroot] [PATCH] libv4l: Add new package libv4l
@ 2011-03-04 15:47 Klaus Schwarzkopf
2011-03-07 13:42 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Klaus Schwarzkopf @ 2011-03-04 15:47 UTC (permalink / raw)
To: buildroot
Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de>
---
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
diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
new file mode 100644
index 0000000..df447c9
--- /dev/null
+++ b/package/libv4l/Config.in
@@ -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
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
new file mode 100644
index 0000000..adf653e
--- /dev/null
+++ b/package/libv4l/libv4l.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# libv4l
+#
+#############################################################
+LIBV4L_VERSION = 0.8.1
+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 \
+
+define LIBV4L_BUILD_CMDS
+ #$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usr LINKTYPE=static
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib PREFIX=/usr
+#CFLAGS=-DO_LARGEFILE=0400000
+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
+
+ $(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
+
+$(eval $(call GENTARGETS,package,libv4l))
+#$(eval $(call AUTOTARGETS,package,libv4l))
+
+
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] libv4l: Add new package libv4l
2011-03-04 15:47 [Buildroot] [PATCH] libv4l: Add new package libv4l Klaus Schwarzkopf
@ 2011-03-07 13:42 ` Thomas Petazzoni
2011-03-07 17:27 ` Klaus Schwarzkopf
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2011-03-07 13:42 UTC (permalink / raw)
To: buildroot
Hello Klaus,
Thanks for this new package. A couple of comments below.
On Fri, 4 Mar 2011 16:47:00 +0100
Klaus Schwarzkopf <schwarzkopf@sensortherm.de> wrote:
> --- /dev/null
> +++ b/package/libv4l/Config.in
> @@ -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).
> +#############################################################
> +#
> +# libv4l
> +#
> +#############################################################
> +LIBV4L_VERSION = 0.8.1
Version 0.8.3 is the latest release. Any reason not to use it ?
> +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.
> +
> +define LIBV4L_BUILD_CMDS
> + #$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
Comment, remove.
> + $(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.
> +#CFLAGS=-DO_LARGEFILE=0400000
Comment, remove.
> +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
> +
> + $(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.
> +$(eval $(call GENTARGETS,package,libv4l))
> +#$(eval $(call AUTOTARGETS,package,libv4l))
Comment, remove.
Regards!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] libv4l: Add new package libv4l
@ 2011-03-07 17:21 Klaus Schwarzkopf
2011-04-05 10:10 ` Peter Korsgaard
0 siblings, 1 reply; 5+ messages in thread
From: Klaus Schwarzkopf @ 2011-03-07 17:21 UTC (permalink / raw)
To: buildroot
Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de>
---
package/Config.in | 1 +
package/libv4l/Config.in | 11 +++++++++++
package/libv4l/libv4l.mk | 30 ++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 0 deletions(-)
create mode 100644 package/libv4l/Config.in
create mode 100644 package/libv4l/libv4l.mk
diff --git a/package/Config.in b/package/Config.in
index f459c1b..18d7a6c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -96,6 +96,7 @@ source "package/rrdtool/Config.in"
comment "graphic libraries"
source "package/directfb/Config.in"
source "package/directfb-examples/Config.in"
+source "package/libv4l/Config.in"
source "package/divine/Config.in"
source "package/fbdump/Config.in"
source "package/fbgrab/Config.in"
diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
new file mode 100644
index 0000000..1620b93
--- /dev/null
+++ b/package/libv4l/Config.in
@@ -0,0 +1,11 @@
+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
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
new file mode 100644
index 0000000..12c998d
--- /dev/null
+++ b/package/libv4l/libv4l.mk
@@ -0,0 +1,30 @@
+#############################################################
+#
+# libv4l
+#
+#############################################################
+LIBV4L_VERSION = 0.8.3
+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_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 $(LIBV4L_MAKE_OPTS)
+endef
+
+define LIBV4L_INSTALL_STAGING_CMDS
+ $(MAKE) -C $(@D)/lib DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install
+endef
+
+define LIBV4L_INSTALL_TARGET_CMDS
+ $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install
+endef
+
+$(eval $(call GENTARGETS,package,libv4l))
+
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] libv4l: Add new package libv4l
2011-03-07 13:42 ` Thomas Petazzoni
@ 2011-03-07 17:27 ` Klaus Schwarzkopf
0 siblings, 0 replies; 5+ messages in thread
From: Klaus Schwarzkopf @ 2011-03-07 17:27 UTC (permalink / raw)
To: buildroot
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:
> Hello Klaus,
>
> Thanks for this new package. A couple of comments below.
>
> On Fri, 4 Mar 2011 16:47:00 +0100
> Klaus Schwarzkopf<schwarzkopf@sensortherm.de> wrote:
>
>> --- /dev/null
>> +++ b/package/libv4l/Config.in
>> @@ -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).
>
>> +#############################################################
>> +#
>> +# libv4l
>> +#
>> +#############################################################
>> +LIBV4L_VERSION = 0.8.1
>
> Version 0.8.3 is the latest release. Any reason not to use it ?
>
>> +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.
>
>> +
>> +define LIBV4L_BUILD_CMDS
>> + #$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
>
> Comment, remove.
>
>> + $(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.
>
>> +#CFLAGS=-DO_LARGEFILE=0400000
>
> Comment, remove.
>
>> +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
>> +
>> + $(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.
>
>> +$(eval $(call GENTARGETS,package,libv4l))
>> +#$(eval $(call AUTOTARGETS,package,libv4l))
>
> Comment, remove.
>
> Regards!
>
> Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] libv4l: Add new package libv4l
2011-03-07 17:21 Klaus Schwarzkopf
@ 2011-04-05 10:10 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2011-04-05 10:10 UTC (permalink / raw)
To: buildroot
>>>>> "Klaus" == Klaus Schwarzkopf <schwarzkopf@sensortherm.de> writes:
Klaus> Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de>
Committed, thanks.
I moved it to the hardware section though, as that imho makes more
sense.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-05 10:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 15:47 [Buildroot] [PATCH] libv4l: Add new package libv4l Klaus Schwarzkopf
2011-03-07 13:42 ` Thomas Petazzoni
2011-03-07 17:27 ` Klaus Schwarzkopf
-- strict thread matches above, loose matches on Subject: below --
2011-03-07 17:21 Klaus Schwarzkopf
2011-04-05 10:10 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox