Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support
Date: Mon, 3 Mar 2014 23:38:04 +0100	[thread overview]
Message-ID: <20140303233804.72c3beae@skate> (raw)
In-Reply-To: <1392588004-13317-3-git-send-email-s.martin49@gmail.com>

Thomas,

Can you have a look at the below dependency tricks, and tell me your
opinion about how they are expressed in terms of comments and al. ?

Thanks,

Thomas

On Sun, 16 Feb 2014 22:59:55 +0100, Samuel Martin wrote:
> Starting with the 2.4.7 release, for V4L support, OpenCV does not
> requires a libv4l dependency for its V4L support.
> 
> So, it now provides 2 distincts knobs for this: WITH_V4L and a new
> one: WITH_LIBV4L.
> 
> This patch takes advantage of this new knob and libv4l support is
> now automatically enabled if only the libv4l package is enabled.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/opencv/Config.in | 11 ++++++-----
>  package/opencv/opencv.mk | 10 +++++++---
>  2 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index c3273fd..2acbe19 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -189,14 +189,15 @@ config BR2_PACKAGE_OPENCV_WITH_TIFF
>  
>  config BR2_PACKAGE_OPENCV_WITH_V4L
>  	bool "v4l support"
> -	depends on BR2_LARGEFILE
> -	depends on BR2_TOOLCHAIN_HAS_THREADS
> -	select BR2_PACKAGE_LIBV4L
>  	help
>  	  Enable Video 4 Linux support.
>  
> -comment "v4l support needs a toolchain w/ largefile, threads"
> -	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
> +	  If the package libv4l is enabled, its support is automatically enabled.
> +
> +if BR2_PACKAGE_OPENCV_WITH_V4L && !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
> +comment "libv4l support will be disabled."
> +comment "libv4l support needs a toolchain w/ largefile, threads"
> +endif
>  
>  comment "Install options"
>  
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 43aef62..fb56769 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -210,10 +210,14 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
>  endif
>  
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
> -OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
> -OPENCV_DEPENDENCIES += libv4l
> +OPENCV_CONF_OPT += \
> +	-DWITH_V4L=ON \
> +	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
> +OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
>  else
> -OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
> +OPENCV_CONF_OPT += \
> +	-DWITH_V4L=OFF \
> +	-DWITH_LIBV4L=OFF
>  endif
>  
>  # Installation hooks:



-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-03-03 22:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
2014-03-05 22:49   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
2014-03-03 22:38   ` Thomas Petazzoni [this message]
2014-03-05 22:55   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 03/11] opencv: add jasper support Samuel Martin
2014-03-05 22:59   ` Yann E. MORIN
2014-03-05 23:08     ` Samuel Martin
2014-03-05 23:27       ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 04/11] opencv: add Qt5 support Samuel Martin
2014-03-05 23:22   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 05/11] clapack: new package Samuel Martin
2014-03-06 19:30   ` Yann E. MORIN
2014-03-06 19:42     ` Yann E. MORIN
2014-03-06 20:16       ` Samuel Martin
2014-03-06 20:50         ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 06/11] armadillo: " Samuel Martin
2014-03-02 10:04   ` Samuel Martin
2014-03-02 13:04     ` Thomas De Schampheleire
2014-02-16 22:00 ` [Buildroot] [PATCH 07/11] python-numpy: " Samuel Martin
2014-03-03 22:40   ` Thomas Petazzoni
2014-02-16 22:00 ` [Buildroot] [PATCH 08/11] python-numpy: add install-staging command Samuel Martin
2014-03-03 22:42   ` Thomas Petazzoni
2014-02-16 22:00 ` [Buildroot] [PATCH 09/11] opencv: add python/numpy support Samuel Martin
2014-03-06 23:04   ` Yann E. MORIN
2014-02-16 22:00 ` [Buildroot] [PATCH 10/11] opencv: define modules inter-dependencies Samuel Martin
2014-02-16 22:00 ` [Buildroot] [PATCH 11/11] vlc: add opencv support Samuel Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140303233804.72c3beae@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox