diff mbox series

[3/3] qt5webkit: select leveldb package

Message ID 20180831202204.28093-4-gael.portay@savoirfairelinux.com
State Superseded
Headers show
Series [1/3] leveldb: install memenv static library and headers | expand

Commit Message

Gaël PORTAY Aug. 31, 2018, 8:22 p.m. UTC
QtWebKit may build its own copy of leveldb.

Select leveldb package and build the buildroot's copy instead.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
---
 package/qt5/qt5webkit/Config.in    | 3 +++
 package/qt5/qt5webkit/qt5webkit.mk | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Arnout Vandecappelle Sept. 4, 2018, 9:10 p.m. UTC | #1
On 31/08/2018 22:22, Gaël PORTAY wrote:
> +	depends on BR2_INSTALL_LIBSTDCPP # leveldb

 I don't think we need to propagate this particular dependency - qt5webkit
already depends on libstdcpp indirectly through Qt5.

 Regards,
 Arnout
Thomas Petazzoni Sept. 5, 2018, 6:53 a.m. UTC | #2
Hello,

On Tue, 4 Sep 2018 23:10:46 +0200, Arnout Vandecappelle wrote:
> On 31/08/2018 22:22, Gaël PORTAY wrote:
> > +	depends on BR2_INSTALL_LIBSTDCPP # leveldb  
> 
>  I don't think we need to propagate this particular dependency - qt5webkit
> already depends on libstdcpp indirectly through Qt5.

I think we need at some point to define a real policy for this. When a
dependency is redundant, should we:

 (1) Avoid duplicating it, to simplify things, but with the risk that
     if we remove the dependency at a higher-level, we forget to re-add
     back to the sub-options.

 (2) Always duplicate them, even if they are useless right now, so
     that we don't forget them in the future if the higher-level option
     drops this dependency. Drawback of this solution is that such
     dependencies don't get "exercised" by autobuilder testing so they
     are often wrong.

I don't have a strong opinion, but we're doing (1) or (2) depending on
the package developer and/or situation, and this isn't really nice.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/qt5/qt5webkit/Config.in b/package/qt5/qt5webkit/Config.in
index 72c641b9f7..e8008f7bab 100644
--- a/package/qt5/qt5webkit/Config.in
+++ b/package/qt5/qt5webkit/Config.in
@@ -3,10 +3,13 @@  config BR2_PACKAGE_QT5WEBKIT
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	depends on BR2_HOST_GCC_AT_LEAST_4_8 # icu
+	depends on BR2_INSTALL_LIBSTDCPP # leveldb
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # icu
+	depends on BR2_TOOLCHAIN_HAS_THREADS # leveldb
 	depends on !BR2_BINFMT_FLAT # icu
 	# assumes a FPU is available on MIPS
 	depends on !BR2_MIPS_SOFT_FLOAT
+	select BR2_PACKAGE_LEVELDB
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5BASE_ICU
 	select BR2_PACKAGE_QT5BASE_GUI
diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk
index e8d368fb01..a0a0998d12 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -16,7 +16,7 @@  endif
 QT5WEBKIT_SOURCE = qtwebkit-opensource-src-$(QT5WEBKIT_VERSION).tar.xz
 QT5WEBKIT_DEPENDENCIES = \
 	host-bison host-flex host-gperf host-python host-ruby \
-	qt5base sqlite
+	leveldb qt5base sqlite
 QT5WEBKIT_INSTALL_STAGING = YES
 
 QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
@@ -45,7 +45,7 @@  endef
 QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
 
 define QT5WEBKIT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/bin/qmake)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/bin/qmake WEBKIT_CONFIG+=use_system_leveldb)
 endef
 
 define QT5WEBKIT_BUILD_CMDS