Message ID | 1436089229-21103-6-git-send-email-s.martin49@gmail.com |
---|---|
State | Superseded |
Headers | show |
Dear Samuel Martin, On Sun, 5 Jul 2015 11:40:27 +0200, Samuel Martin wrote: > Fully rework the GTK support in OpenCV because it now supports gtk-2 and > gtk-3 (but only one at the time). > Note that, in the build-system, the gtk support is only available when > Qt support is disabled; so make sure the menuconfig reflects this. Nothing in the patch is doing that. You're anyway using a "choice", so the user can only decide one of gtk2, gtk3, qt4 or qt5. So this comment in the commit log doesn't make sense. > +config BR2_PACKAGE_OPENCV_WITH_GTK3 > + bool "gtk3" > + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo > + depends on BR2_USE_MMU # libgtk3 -> libglib2 > + depends on BR2_USE_WCHAR # libgtk3 -> libglib2 > + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2 > + depends on BR2_INSTALL_LIBSTDCPP > + select BR2_PACKAGE_LIBGTK3 Please use a depends on BR2_PACKAGE_LIBGTK3, so that things are consistent with qt4 and qt5 (unless of course you switch to a select for Qt4/Qt5 following my previous comments). But in any case, be *consistent*. Thanks, Thomas
Thomas, On Sun, Jul 5, 2015 at 2:59 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Samuel Martin, > > On Sun, 5 Jul 2015 11:40:27 +0200, Samuel Martin wrote: >> Fully rework the GTK support in OpenCV because it now supports gtk-2 and >> gtk-3 (but only one at the time). >> Note that, in the build-system, the gtk support is only available when >> Qt support is disabled; so make sure the menuconfig reflects this. > > Nothing in the patch is doing that. You're anyway using a "choice", so > the user can only decide one of gtk2, gtk3, qt4 or qt5. So this comment > in the commit log doesn't make sense. Right. :-/ > > >> +config BR2_PACKAGE_OPENCV_WITH_GTK3 >> + bool "gtk3" >> + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo >> + depends on BR2_USE_MMU # libgtk3 -> libglib2 >> + depends on BR2_USE_WCHAR # libgtk3 -> libglib2 >> + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2 >> + depends on BR2_INSTALL_LIBSTDCPP >> + select BR2_PACKAGE_LIBGTK3 > > Please use a depends on BR2_PACKAGE_LIBGTK3, so that things are > consistent with qt4 and qt5 (unless of course you switch to a select > for Qt4/Qt5 following my previous comments). But in any case, be > *consistent*. We cannot use select for Qt4/Qt5 because of the way we are handling their mutual exclusivity in BR. :-/ For the consistency, I fully agree. I'll rework it. > > Thanks, > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com
diff --git a/package/opencv/Config.in b/package/opencv/Config.in index 15f68a2..776fa6d 100644 --- a/package/opencv/Config.in +++ b/package/opencv/Config.in @@ -62,6 +62,7 @@ choice preference by the OpenCV build system): - Qt5 - Qt4 + - gtk3 - gtk2 Note that, whatever you choose here will be used by OpenCV, even @@ -89,6 +90,21 @@ comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++" !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_INSTALL_LIBSTDCPP +config BR2_PACKAGE_OPENCV_WITH_GTK3 + bool "gtk3" + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo + depends on BR2_USE_MMU # libgtk3 -> libglib2 + depends on BR2_USE_WCHAR # libgtk3 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBGTK3 + +comment "gtk3 needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU # libgtk3 -> glib2 + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo + depends on !(BR2_USE_WCHAR || BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_INSTALL_LIBSTDCPP) + config BR2_PACKAGE_OPENCV_WITH_QT bool "qt4" depends on BR2_PACKAGE_QT diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk index 98e1614..c788aeb 100644 --- a/package/opencv/opencv.mk +++ b/package/opencv/opencv.mk @@ -236,11 +236,18 @@ else OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF endif +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK)$(BR2_PACKAGE_OPENCV_WITH_GTK3),) +OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF +endif + ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y) OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON OPENCV_DEPENDENCIES += libgtk2 -else -OPENCV_CONF_OPTS += -DWITH_GTK=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y) +OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF +OPENCV_DEPENDENCIES += libgtk3 endif ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)