xref: /OK3568_Linux_fs/buildroot/package/qt5/qt5tools/qt5tools.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# qt5tools
4#
5################################################################################
6
7QT5TOOLS_VERSION = 53ee43a51b5a3de2877dafffc78e71ff55926708
8QT5TOOLS_SITE = $(QT5_SITE)/qttools/-/archive/$(QT5TOOLS_VERSION)
9QT5TOOLS_SOURCE = qttools-$(QT5TOOLS_VERSION).tar.bz2
10
11QT5TOOLS_INSTALL_STAGING = YES
12QT5TOOLS_SYNC_QT_HEADERS = YES
13
14# linguist tools compile conditionally on qtHaveModule(qmldevtools-private),
15# but the condition is used only used to decide if lupdate will support
16# parsing qml files (via setting QT_NO_QML define), no linking against
17# target qt5 will happen
18ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
19QT5TOOLS_DEPENDENCIES += qt5declarative
20endif
21
22QT5TOOLS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
23QT5TOOLS_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
24
25define QT5TOOLS_FIXUP_DESIGNER
26	sed -i "s/qtBuildPart(tools)/qtConfig(process)/" \
27		$(@D)/src/designer/src/uitools/uitools.pro
28endef
29QT5TOOLS_PRE_CONFIGURE_HOOKS += QT5TOOLS_FIXUP_DESIGNER
30
31QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \
32	linguist/lconvert linguist/lrelease linguist/lupdate
33QT5TOOLS_INSTALL_STAGING_DIR_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \
34	linguist
35
36ifeq ($(BR2_PACKAGE_QT5TOOLS_QDOC_TOOL),y)
37QT5TOOLS_BUILD_DIRS_y += qdoc
38QT5TOOLS_INSTALL_STAGING_DIR_y += qdoc
39QT5TOOLS_DEPENDENCIES += host-clang
40endif
41
42QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_DESIGNER) += \
43	designer/src/lib \
44	designer/src/components \
45	designer/src/designer
46
47QT5TOOLS_INSTALL_STAGING_DIR_$(BR2_PACKAGE_QT5TOOLS_DESIGNER) += \
48	designer/src/lib \
49	designer/src/components \
50
51QT5TOOLS_INSTALL_TARGET_DIR_$(BR2_PACKAGE_QT5TOOLS_DESIGNER) += \
52	designer/src/lib \
53	designer/src/components \
54	designer/src/designer
55
56QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool
57QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool
58
59QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag
60QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag
61
62QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths
63QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths
64
65QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
66QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
67
68define QT5TOOLS_BUILD_CMDS
69	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) sub-src-qmake_all
70	$(foreach p,$(QT5TOOLS_BUILD_DIRS_y), \
71		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p)$(sep))
72endef
73
74# use install target to copy cmake module files
75define QT5TOOLS_INSTALL_STAGING_CMDS
76	$(foreach p,$(QT5TOOLS_INSTALL_STAGING_DIR_y), \
77		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p) install$(sep))
78endef
79
80define QT5TOOLS_INSTALL_TARGET_CMDS
81	$(foreach p,$(QT5TOOLS_INSTALL_TARGET_y), \
82		$(INSTALL) -D -m0755 $(@D)/bin/$(p) $(TARGET_DIR)/usr/bin/$(p)$(sep))
83	$(INSTALL) -m 0755 -d $(@D)/tmp-target-install$(STAGING_DIR)/
84	$(foreach p,$(QT5TOOLS_INSTALL_TARGET_DIR_y), \
85		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p) \
86		INSTALL_ROOT=$(@D)/tmp-target-install install$(sep))
87	rsync -arv $(@D)/tmp-target-install$(STAGING_DIR)/ $(TARGET_DIR)/
88endef
89
90$(eval $(qmake-package))
91