From patchwork Mon Nov 11 21:00:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 290504 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 295362C0097 for ; Tue, 12 Nov 2013 08:01:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AF8C432FF3; Mon, 11 Nov 2013 21:01:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ByPzW9n8hNXo; Mon, 11 Nov 2013 21:01:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id ED94533075; Mon, 11 Nov 2013 21:00:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id ED5FE1CE7E3 for ; Mon, 11 Nov 2013 21:00:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E60F88D10D for ; Mon, 11 Nov 2013 21:00:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3MzRP1XmKu1a for ; Mon, 11 Nov 2013 21:00:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 31BC38D206 for ; Mon, 11 Nov 2013 21:00:47 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id m19so2789020wiv.14 for ; Mon, 11 Nov 2013 13:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=egOWylAofv4Izo7kO0lHgHwsOusmj8o+gwB2+sJnDZQ=; b=HflG4xuIlAaa9c4kmf6+3neFXboG6DOJXn8ZZDkuTQBISl3rivQo2TeeTbXo6y+o0N D4LNkK6jeosnWtc6tyX8rbeYFfkt0Bg8quEGGV6aeXs6ABPw5ruSrYAOo4Ks7Vdcomwc P4DJ2Jdqz3oRbYPpSX7UlZEtcnUnsrCIXzPHiknCOaHtp67JfHQZoBWptiORbGxatGO/ kwDr/TC0Gzv1lPyC8X+cyDEwGElecew8hpA0Q8/PwnXLWsIXYgJXjLPvLqXSmfsjIOni 5I9/V/Wwd/ssEZnI81ObBE/YBFmyszffT9CmQxaYi0UgNv8x7B0fvPQ8Pz2EetcwIfjR eJlA== X-Received: by 10.180.38.43 with SMTP id d11mr11529780wik.40.1384203645829; Mon, 11 Nov 2013 13:00:45 -0800 (PST) Received: from smartin-de.aldebaran.lan ([46.218.232.202]) by mx.google.com with ESMTPSA id ma3sm37778572wic.1.2013.11.11.13.00.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Nov 2013 13:00:45 -0800 (PST) From: Samuel Martin To: buildroot@busybox.net Date: Mon, 11 Nov 2013 22:00:12 +0100 Message-Id: <1384203613-17871-7-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1384203613-17871-1-git-send-email-s.martin49@gmail.com> References: <1384203613-17871-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH 6/7] opencv: rework V4L/libv4l support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 --- 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 bd466ca..a4342da 100644 --- a/package/opencv/Config.in +++ b/package/opencv/Config.in @@ -193,14 +193,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 c53d984..bbaba72 100644 --- a/package/opencv/opencv.mk +++ b/package/opencv/opencv.mk @@ -164,10 +164,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: