* [Buildroot] [PATCH v2] qt5base: add an option to build and install examples
@ 2014-01-02 7:07 Fatih Aşıcı
2014-01-02 14:04 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fatih Aşıcı @ 2014-01-02 7:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Fatih A??c? <fatih.asici@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
Changes v1 -> v2:
- rebase against current master
- drop upstreamed patches
- no need to pass -compile-examples as it is default now
- add configure option using a one-line if block
---
package/qt5/qt5base/Config.in | 7 +++++++
package/qt5/qt5base/qt5base.mk | 14 +++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in
index e932e24..3090d65 100644
--- a/package/qt5/qt5base/Config.in
+++ b/package/qt5/qt5base/Config.in
@@ -28,6 +28,13 @@ config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED
See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
+config BR2_PACKAGE_QT5BASE_EXAMPLES
+ bool "Compile and install examples (with code)"
+ select BR2_PACKAGE_QT5BASE_NETWORK
+ select BR2_PACKAGE_QT5BASE_XML
+ help
+ If unsure, say N.
+
config BR2_PACKAGE_QT5BASE_NETWORK
bool "network module"
help
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index e46bdeb..6928bb8 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -134,6 +134,8 @@ QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2)
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu)
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
+QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples
+
# Build the list of libraries to be installed on the target
QT5BASE_INSTALL_LIBS_y += Qt5Core
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network
@@ -162,8 +164,9 @@ define QT5BASE_CONFIGURE_CMDS
-headerdir /usr/include/qt5 \
-sysroot $(STAGING_DIR) \
-plugindir /usr/lib/qt/plugins \
+ -examplesdir /usr/lib/qt/examples \
-no-rpath \
- -nomake examples -nomake tests \
+ -nomake tests \
-device buildroot \
-device-option CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
-device-option BUILDROOT_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
@@ -203,15 +206,24 @@ define QT5BASE_INSTALL_TARGET_FONTS
fi
endef
+define QT5BASE_INSTALL_TARGET_EXAMPLES
+ if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
+ mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
+ cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
+ fi
+endef
+
ifeq ($(BR2_PREFER_STATIC_LIB),y)
define QT5BASE_INSTALL_TARGET_CMDS
$(QT5BASE_INSTALL_TARGET_FONTS)
+ $(QT5BASE_INSTALL_TARGET_EXAMPLES)
endef
else
define QT5BASE_INSTALL_TARGET_CMDS
$(QT5BASE_INSTALL_TARGET_LIBS)
$(QT5BASE_INSTALL_TARGET_PLUGINS)
$(QT5BASE_INSTALL_TARGET_FONTS)
+ $(QT5BASE_INSTALL_TARGET_EXAMPLES)
endef
endif
--
1.8.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2] qt5base: add an option to build and install examples
2014-01-02 7:07 [Buildroot] [PATCH v2] qt5base: add an option to build and install examples Fatih Aşıcı
@ 2014-01-02 14:04 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-01-02 14:04 UTC (permalink / raw)
To: buildroot
Dear Fatih A??c?,
On Thu, 2 Jan 2014 09:07:02 +0200, Fatih A??c? wrote:
> Signed-off-by: Fatih A??c? <fatih.asici@gmail.com>
> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
>
> ---
> Changes v1 -> v2:
> - rebase against current master
> - drop upstreamed patches
> - no need to pass -compile-examples as it is default now
> - add configure option using a one-line if block
> ---
> package/qt5/qt5base/Config.in | 7 +++++++
> package/qt5/qt5base/qt5base.mk | 14 +++++++++++++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-02 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-02 7:07 [Buildroot] [PATCH v2] qt5base: add an option to build and install examples Fatih Aşıcı
2014-01-02 14:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox