From patchwork Sun Jul 5 09:40:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 491298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B66B4140D19 for ; Sun, 5 Jul 2015 19:40:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=N96D7paP; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E639B95091; Sun, 5 Jul 2015 09:40:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RSmW2Tyi81nw; Sun, 5 Jul 2015 09:40:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 46BB295075; Sun, 5 Jul 2015 09:40:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 8512C1C25F1 for ; Sun, 5 Jul 2015 09:40:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8154BA2CF2 for ; Sun, 5 Jul 2015 09:40:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0u_ywjX-2lMv for ; Sun, 5 Jul 2015 09:40:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9924DA2CEF for ; Sun, 5 Jul 2015 09:40:42 +0000 (UTC) Received: by wguu7 with SMTP id u7so117701781wgu.3 for ; Sun, 05 Jul 2015 02:40:41 -0700 (PDT) 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=VaqnUs6Wgn3L/9N608wDMieu/rWzOp5z4kqY/2UU/NA=; b=N96D7paPOGk3rkgUwDLI1jnSCsAwQZAeGS69PW6u/VWQ2TdBE5hoQq0p+f+2SajCKa QyHBST9fmwoXsUpEJAIU9qdv9K4ZICz66UZTKOjptDzsRrc8/1GDSDmGW/SXtyxAJNAv /nIXsfsBwNrKEnA6JEIwgJPZkgGWbByF8zbCpBbtGQyCV525G+i41bfwRoIIVeokAPZ9 onzc3cR6814PZJQJkSvTelFcqVPyKDk1hK9GeoFxI8cdRXcOwFs07h2vySaZHaH15s6L odXCX1uz9PrnS+9sK/Hm2bodpKf4ur8kogwLIIyT2k8eUnjMTOI3+KPG33rWbNwLt1FF S0aw== X-Received: by 10.194.24.196 with SMTP id w4mr82852900wjf.137.1436089241315; Sun, 05 Jul 2015 02:40:41 -0700 (PDT) Received: from bobook.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id z9sm41022473wiv.9.2015.07.05.02.40.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jul 2015 02:40:40 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Sun, 5 Jul 2015 11:40:26 +0200 Message-Id: <1436089229-21103-5-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1436089229-21103-1-git-send-email-s.martin49@gmail.com> References: <1436089229-21103-1-git-send-email-s.martin49@gmail.com> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v8 4/7] package/opencv: add qt5 support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI toolkit, but only one can be enabled at the same time. Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4 knob depend on BR2_PACKAGE_QT5. Note that we usually use 'select ...' to express the dependencies between packages, but in this case, we cannot since the Qt4/Qt5 co-existence exclusion is not handled by a simple choice, but by some extra dependencies in the choice entries. This makes impossible using 'select ...' for the Qt support knob without triggering a circular dependency at the kconfig level. Besides, we already use 'depends on ...' to express the dependencies with some "big" packages (like xorg or libgtk2). qt or qt5* packages are fairly big. So, I don't think it will hurt that much to use a 'depends on ...' statement in this case. Signed-off-by: Samuel Martin Cc: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- changes v7->v8: - update a/r/t tags changes v6->v7: - fix depends on statements and comments (Yann) changes v5->v6: - bury BR2_avr32 remains (Yann) - move knob in a choice (Yann) - reword commit log changes v4->v5: - rebase changes v3->v4: - rebase - rename _OPT -> _OPTS options - rework qt backend selection (Yann) changes v2->v3: - rebase - remove duplicate qt/qt5 dependencies (Yann) - add missing 'depends on' to the comment about qt4 changes v1->v2: - rebase - update threads support dependency for qt5 --- package/opencv/Config.in | 31 +++++++++++++++++++++++++------ package/opencv/opencv.mk | 11 +++++++++-- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/package/opencv/Config.in b/package/opencv/Config.in index d317603..15f68a2 100644 --- a/package/opencv/Config.in +++ b/package/opencv/Config.in @@ -60,6 +60,7 @@ choice The best toolkit to work with OpenCV are, in decreasing order of preference by the OpenCV build system): + - Qt5 - Qt4 - gtk2 @@ -90,18 +91,36 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++" config BR2_PACKAGE_OPENCV_WITH_QT bool "qt4" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_USE_MMU # qt - select BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT select BR2_PACKAGE_QT_STL select BR2_PACKAGE_QT_GUI_MODULE select BR2_PACKAGE_QT_TEST help - Use Qt with QtTest module and STL support + Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit. + +# no need for a comment about qt availability WRT the toolchain dependencies +# because they are included in the opencv's ones, so already met. -comment "qt4 needs a toolchain w/ C++" +comment "qt4 support needs qt" depends on BR2_USE_MMU # qt - depends on !BR2_INSTALL_LIBSTDCPP + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5 + +config BR2_PACKAGE_OPENCV_WITH_QT5 + bool "qt5" + depends on BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_CONCURRENT + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + help + Use Qt5 with base, concurrent, test, gui and widgets components, as GUI + toolkit. + +# no need for a comment about qt5 availability WRT the toolchain dependencies +# because they are included in the opencv's ones, so already met. + +comment "qt5 support needs qt5" + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5 endchoice diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk index 0e5cf77..98e1614 100644 --- a/package/opencv/opencv.mk +++ b/package/opencv/opencv.mk @@ -266,11 +266,18 @@ else OPENCV_CONF_OPTS += -DWITH_PNG=OFF endif +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),) +OPENCV_CONF_OPTS += -DWITH_QT=OFF +endif + ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y) OPENCV_CONF_OPTS += -DWITH_QT=4 OPENCV_DEPENDENCIES += qt -else -OPENCV_CONF_OPTS += -DWITH_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y) +OPENCV_CONF_OPTS += -DWITH_QT=5 +OPENCV_DEPENDENCIES += qt5base endif ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)