From patchwork Tue Nov 24 06:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1405314 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=VsXUQKkl; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CgFJ74SL4z9sRR for ; Tue, 24 Nov 2020 17:59:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 46CA420C41; Tue, 24 Nov 2020 06:59:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Td5Ch9WvzPji; Tue, 24 Nov 2020 06:59:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2AB5E204CA; Tue, 24 Nov 2020 06:59:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 0D7271BF215 for ; Tue, 24 Nov 2020 06:59:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 000EF204CD for ; Tue, 24 Nov 2020 06:59:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j8YVPERQVJzK for ; Tue, 24 Nov 2020 06:59:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by silver.osuosl.org (Postfix) with ESMTPS id 5F7F320029 for ; Tue, 24 Nov 2020 06:59:23 +0000 (UTC) Received: by mail-wm1-f53.google.com with SMTP id a186so1451007wme.1 for ; Mon, 23 Nov 2020 22:59:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lJrMyGlAXrMwFKuu4U6EC16NNytYP2+qYII+YsnrlFg=; b=VsXUQKkl9K46J9JFZdSDh2D8DIB0zPFODE4oaXnMkPZSCgpPoPJlacm9Kg4+ccAJgF kIqcweHfeRaT84qhjPE2/N2LJR9iMYkU3QwnQwRgT8CiCstHEokw+lVXzU1lYWA7Xq3+ EAV4xXh+HkOZEn5zcOwlINtNCmMVfaSri1EIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lJrMyGlAXrMwFKuu4U6EC16NNytYP2+qYII+YsnrlFg=; b=HIVLW5lTDFGfJSKT74xlEDlM0aZ88qoJ4EhdBs2V3TmE1fj2MO6fNnXnb95uqJ2Ykg j6VCq1pNHAJwJsYdtqw7bg6o8Wlk4d2uvLu44ozM2SqaCvIY/rcxKwnUkBAg1YndprPQ bNdEvXLl9LHtH6S30S5lBZYJf+Kx5FtuhGrTZnXSH43/tYv0Ipy8p5+9TIzqhcfS+QMD 8N+HJ4QyTUUDiY5N4ZfqZNGWHoACqgjupdOBNge1GmxBdJKSGGsdZ68e+uT3/tbcSSj9 KkKmgxGif963P/4cBwe8sI43lx+ag1421zFPE9qFPJbvpZRxalJ/hyeBwOULZFnZYjCp yLLg== X-Gm-Message-State: AOAM531Z+d79IjT143DzAbUoaGvq9NZA94g7E5MgmfAhDaMsFVIFGdlW xJBg2HZIqlSbFofIQXjrhjoBeQGa6MgFWA== X-Google-Smtp-Source: ABdhPJxgCFZ+Du07obXg4f8ieRcjphO6kON/7T3FkJ1jsId0L/ikXiWOeHHKCiexvYOXYvmmtH4Lyg== X-Received: by 2002:a1c:9916:: with SMTP id b22mr2590111wme.182.1606201161936; Mon, 23 Nov 2020 22:59:21 -0800 (PST) Received: from localhost.localdomain (host185251138054.static.fidoka.tech. [185.251.138.54]) by smtp.gmail.com with ESMTPSA id 2sm13797224wrq.87.2020.11.23.22.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 22:59:21 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Tue, 24 Nov 2020 07:59:14 +0100 Message-Id: <20201124065917.1567055-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 1/4] package/pkg-qmake: adding FOO_SYNC_HEADERS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some qmake based packages need to call the syncqt.pl script before building to have a properly populated "include" directory inside the package build tree. This script is automatically executed by qmake when a source tree is from a git clone: buildroot purges the .git directory hence the script never runs. Signed-off-by: Angelo Compagnucci --- Changelog v1 -> v2: * Fixed hash file (suggested by Peter) v2 -> v3: * Moved to use FOO_INCLUDE_FIXUP v3 -> v4: * Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS docs/manual/adding-packages-qmake.txt | 4 ++++ package/pkg-qmake.mk | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/manual/adding-packages-qmake.txt b/docs/manual/adding-packages-qmake.txt index e1621e914e..c7e6ff354a 100644 --- a/docs/manual/adding-packages-qmake.txt +++ b/docs/manual/adding-packages-qmake.txt @@ -79,3 +79,7 @@ also be defined. * +LIBFOO_INSTALL_TARGET_OPTS+, to specify additional targets to pass to the +make+ command during the target installation step. By default, +install+. + +* +LIBFOO_SYNC_HEADERS+, to run syncqt.pl before qmake. Some packages + need this to have a properly populated include directory before + running the build. diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk index 27727119d7..24bf0f7940 100644 --- a/package/pkg-qmake.mk +++ b/package/pkg-qmake.mk @@ -44,6 +44,10 @@ ifneq ($(1),qt5base) $(2)_DEPENDENCIES += qt5base endif +ifdef $(2)_SYNC_HEADERS +$(2)_DEPENDENCIES += host-perl +endif + # # Configure step. Only define it if not already defined by the package # .mk file. @@ -52,6 +56,7 @@ ifndef $(2)_CONFIGURE_CMDS define $(2)_CONFIGURE_CMDS $$(QT5_QT_CONF_FIXUP) cd $$($(2)_BUILDDIR) && \ + $$(if $$($(2)_SYNC_HEADERS), $(HOST_DIR)/bin/syncqt.pl -version $(QT5_VERSION) &&) \ $$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS) endef endif