From patchwork Mon Nov 13 18:40:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 837503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=micronovasrl.com header.i=@micronovasrl.com header.b="BK1IFRCp"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybKGd402wz9sPs for ; Tue, 14 Nov 2017 05:41:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6EDAB878E1; Mon, 13 Nov 2017 18:41:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HfOcKJssj+UP; Mon, 13 Nov 2017 18:41:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 477B2878E2; Mon, 13 Nov 2017 18:41:05 +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 A8D591C2355 for ; Mon, 13 Nov 2017 18:41:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A25088622A for ; Mon, 13 Nov 2017 18:41:04 +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 g8T2UStvFalf for ; Mon, 13 Nov 2017 18:41:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by whitealder.osuosl.org (Postfix) with ESMTP id C331B85A42 for ; Mon, 13 Nov 2017 18:41:03 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id DCD93B00E5F for ; Mon, 13 Nov 2017 19:41:00 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=x-mailer:message-id:date:date:subject:subject:to:from:from; s=dkim; t=1510598460; x=1511462461; bh=pJX8nvjbECP0nBgVHhVdibkE GISParGrWzeaG0SPn5I=; b=BK1IFRCpRFZsWgfT/qyn8wTrzgSVxoYbv+BzHInE pdZZuJp5S19z4p4ipIhsz4jXgjYxBsmGGw7KfxLKunKIGa2KgxxpeKK74Xl9i10B 65doXpisTOpdHJYIHiSOSpX2oSz8/WIgUaweZumdgbZVG9JiEL85bzJ2k/6qDWfI /MU= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BGPrDbqT1YUK for ; Mon, 13 Nov 2017 19:41:00 +0100 (CET) Received: from localhost.localdomain (benettig-pc.dominio.micronovasrl.com [192.168.123.215]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 0624AB00CFF; Mon, 13 Nov 2017 19:41:00 +0100 (CET) From: Giulio Benetti To: buildroot@buildroot.org Date: Mon, 13 Nov 2017 19:40:43 +0100 Message-Id: <1510598444-29408-1-git-send-email-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v3 1/1] qt5base: correct eglfs support in qmake.conf.in X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, Peter Seiderer , maxime.ripard@free-electrons.com, Giulio Benetti MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" qt5base: correct eglfs support in qmake.conf.in Setting EGLFS_DEVICE_INTEGRATION at the end of qmake.conf like is done by commit 0c219ddb8a doesn't work correctly: it has to be set before the include(../common/linux_device_post.conf) Instead of appending to the file, change it into a qmake.conf.in template file that contains an EGLFS_DEVICE_INTEGRATION assignment and update it with sed. Signed-off-by: Giulio Benetti --- Changes v1 -> v2: * write directly to package target qmake.conf * simplified eglfs backend choice package/qt5/qt5base/{qmake.conf => qmake.conf.in} | 2 ++ package/qt5/qt5base/qt5base.mk | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) rename package/qt5/qt5base/{qmake.conf => qmake.conf.in} (95%) diff --git a/package/qt5/qt5base/qmake.conf b/package/qt5/qt5base/qmake.conf.in similarity index 95% rename from package/qt5/qt5base/qmake.conf rename to package/qt5/qt5base/qmake.conf.in index 8b6debe..fb698b9 100644 --- a/package/qt5/qt5base/qmake.conf +++ b/package/qt5/qt5base/qmake.conf.in @@ -24,5 +24,7 @@ QMAKE_CFLAGS_ISYSTEM = # Architecturespecific configuration include(arch.conf) +EGLFS_DEVICE_INTEGRATION = @EGLFS_DEVICE@ + include(../common/linux_device_post.conf) load(qt_config) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index b3f9c79..ef99131 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -240,10 +240,23 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus -ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy) -# use vivante backend +ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y) +QT5BASE_EGLFS_DEVICE = eglfs_viv +else ifeq ($(BR2_PACKAGE_SUNXI_MALI),y) +QT5BASE_EGLFS_DEVICE = eglfs_mali +endif +endif + +ifeq ($(QT5BASE_EGLFS_DEVICE),) define QT5BASE_CONFIGURE_QMAKE_CONFIG - echo "EGLFS_DEVICE_INTEGRATION = eglfs_viv" >> \ + sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf +endef +else +define QT5BASE_CONFIGURE_QMAKE_CONFIG + sed 's/@EGLFS_DEVICE@/$(QT5BASE_EGLFS_DEVICE)/g' \ + $(QT5BASE_PKGDIR)/qmake.conf.in > \ $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf endef endif @@ -263,8 +276,7 @@ endef endif define QT5BASE_CONFIGURE_CMDS - $(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \ - $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf + mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/ $(QT5BASE_CONFIGURE_QMAKE_CONFIG) $(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \ $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h