Return-Path: Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by mail.openembedded.org (Postfix) with ESMTP id 185AB77E86 for ; Tue, 5 Sep 2017 14:56:50 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id h15so2341212qta.0 for ; Tue, 05 Sep 2017 07:56:51 -0700 (PDT) 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:in-reply-to :references:organization; bh=OoSgt/+8OIuUO5oAVgrVlazEPUa+ZM4SAjVtIdfsUEM=; b=O/8fm/25KaFHFf7I/5CpQa8yOmq7EVIpmQ9qRVaCA166cdSSFIJs1cBKjMTgUu22gu 3k8fWW7i3qwQwINDsSYITwudZ15pjHpm56R2SCeQlhn2P2WfSP+zqBrhTx7bHUV0A932 TXsjEaHUxpYi63AA+0Ri3NGTaN31ndmdqFFSetakbx+2GWn+IDFmzEoQd0LJOguMbKAZ N5PsU7ycGxm1JRFIKwSJNbk4N6yLwfwoyObhDeOwvqlqeEjUQpeczPjOHvdf+w9wl9US E/I145JVIzxk3pplMx7pe4NUWk+mRywdpcEcux9cOomJKsYfdBpYJkl9+mYLRtxAsZRG 7ZGQ== X-Gm-Message-State: AHPjjUgXyJE5T7ppwT/QNJRdn5iZW8HGGzdTImyawx555NJSkc6bcrj4 e+O5EULT9dvPjzLF X-Google-Smtp-Source: ADKCNb48HRaOANhSKhSmRsL0xLne16NugYf7EZrXZQOX+A2Wh+HiIa1rPjXq61aEvFUm2tVtPrip7Q== X-Received: by 10.237.42.231 with SMTP id t94mr5484435qtd.210.1504623411264; Tue, 05 Sep 2017 07:56:51 -0700 (PDT) Received: from localhost.localdomain ([181.220.79.73]) by smtp.gmail.com with ESMTPSA id x124sm524147qka.85.2017.09.05.07.56.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Sep 2017 07:56:50 -0700 (PDT) Received: by localhost.localdomain (sSMTP sendmail emulation); Tue, 05 Sep 2017 11:56:44 -0300 From: Otavio Salvador To: OpenEmbedded Core Mailing List Date: Tue, 5 Sep 2017 11:55:36 -0300 Message-Id: <20170905145536.21149-9-otavio@ossystems.com.br> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170905145536.21149-1-otavio@ossystems.com.br> References: <20170905145536.21149-1-otavio@ossystems.com.br> Organization: O.S. Systems Software LTDA. Cc: Otavio Salvador Subject: [PATCH v2 8/8] go.bbclass: Use an auxiliary variable to add the build dependencies X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 14:56:50 -0000 This is going to easy the addition of nativesdk and virtual providers in the future. This change is based on the meta-golang[1] layer. Thanks to Matt Madison for his work on this. 1. https://github.com/madisongh/meta-golang Signed-off-by: Otavio Salvador --- Changes in v2: None meta/classes/go.bbclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index f64b07fd82..0c9fbbf984 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -24,6 +24,11 @@ GOROOT = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin" GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}" +DEPENDS_GOLANG_class-target = "go-cross-${TARGET_ARCH}" +DEPENDS_GOLANG_class-native = "go-native" + +DEPENDS_append = " ${DEPENDS_GOLANG}" + export GOBUILDFLAGS ?= "-v" GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " @@ -43,9 +48,6 @@ export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" -DEPENDS += "go-cross-${TARGET_ARCH}" -DEPENDS_class-native += "go-native" - FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}" FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*" -- 2.14.1