From patchwork Sun Jun 7 10:26:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 481714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6E85C140081 for ; Sun, 7 Jun 2015 20:27:38 +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=n3yfuxp/; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B9004A432E; Sun, 7 Jun 2015 10:27:37 +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 sgitNMd2THhw; Sun, 7 Jun 2015 10:27:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B6E6EA4498; Sun, 7 Jun 2015 10:27:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4C02C1C2238 for ; Sun, 7 Jun 2015 10:27:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 466879208C for ; Sun, 7 Jun 2015 10:27:09 +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 9g-MNKGmsyLx for ; Sun, 7 Jun 2015 10:27:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7A5CA91FC7 for ; Sun, 7 Jun 2015 10:27:08 +0000 (UTC) Received: by wgez8 with SMTP id z8so83070643wge.0 for ; Sun, 07 Jun 2015 03:27:07 -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=Vh2lSn2FiPgOspyx1w9GH5t1jT7DtYttxI7wdhpteG8=; b=n3yfuxp/d00ld29iMyBAiG7iJo6x6NzM2ZPC31e7oAJPhW29Z928PwKWewE8MMEsob 8t/ivwha8xXfifZ9/DafSRMoZSfc1D1+cTfZHtwujpM/lhmhriW6xroTRmQS/q5PCBr6 2N5gGvEZ7uy/m4L8lh+muUYKu3tfXBWYynDmryHPTSUHtgNswM5nWd/kKOgs8TbQnJQ8 MqKg8gwiwbyuUCsbm9FOe7oLrAHe1P6SPt7bbvMnuwz8vylzMx3WfFqqDG2LasfBjIgs ieo+AVh9l7T2o4jkBe/Rkm0nU1xjTYMRUZmFw02qWnJzcE4cMAGTE+GWAv+o4/+epeyu 21Sw== X-Received: by 10.194.134.9 with SMTP id pg9mr22828261wjb.5.1433672827120; Sun, 07 Jun 2015 03:27:07 -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 cd9sm10498089wjc.34.2015.06.07.03.27.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 07 Jun 2015 03:27:04 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Sun, 7 Jun 2015 12:26:32 +0200 Message-Id: <1433672799-21387-7-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.4.2 In-Reply-To: <1433672799-21387-1-git-send-email-s.martin49@gmail.com> References: <1433672799-21387-1-git-send-email-s.martin49@gmail.com> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v5 06/13] 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, but only one can be enabled at the same time. Since Buildroot does not support Qt4/Qt5 co-existence, we keep the Qt support knob as a boolean, but make it depend on BR2_PACKAGE_QT or BR2_PACKAGE_QT5, and automatically uses the enabled one. 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 a dependency. 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" --- 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 | 32 ++++++++++++++++++++++++++++---- package/opencv/opencv.mk | 4 ++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/package/opencv/Config.in b/package/opencv/Config.in index 58a6ccb..4866780 100644 --- a/package/opencv/Config.in +++ b/package/opencv/Config.in @@ -209,13 +209,37 @@ config BR2_PACKAGE_OPENCV_WITH_QT bool "qt backend support" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_MMU # qt - depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI - select BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 + select BR2_PACKAGE_OPENCV_QT_BACKEND if BR2_PACKAGE_QT + select BR2_PACKAGE_OPENCV_QT5_BACKEND if BR2_PACKAGE_QT5 + help + Enable Qt support for OpenCV. + + This uses whatever Qt version you enabled: Qt4 or Qt5. + + If Qt4 is already enabled, then QtTest and QtGui modules and STL support + will be enabled as well. + + If Qt5 is already enabled, then the following components will be enabled + as well: base, concurrent, test, gui and widgets. + +config BR2_PACKAGE_OPENCV_QT_BACKEND + bool 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 + +config BR2_PACKAGE_OPENCV_QT5_BACKEND + bool + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_CONCURRENT + select BR2_PACKAGE_QT5BASE_TEST + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + +comment "qt backend needs either Qt4 or Qt5" + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5 + depends on !BR2_avr32 config BR2_PACKAGE_OPENCV_WITH_TIFF bool "tiff support" diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk index 0a1b94c..07bc893 100644 --- a/package/opencv/opencv.mk +++ b/package/opencv/opencv.mk @@ -248,8 +248,8 @@ OPENCV_CONF_OPTS += -DWITH_PNG=OFF endif ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y) -OPENCV_CONF_OPTS += -DWITH_QT=4 -OPENCV_DEPENDENCIES += qt +OPENCV_CONF_OPTS += -DWITH_QT=$(if $(BR2_PACKAGE_QT),4,5) +OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_QT),qt,qt5base) else OPENCV_CONF_OPTS += -DWITH_QT=OFF endif