From patchwork Tue Feb 4 13:31:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1233343 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=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=efQA+D/e; 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 48Blwy3YLbzB3xK for ; Wed, 5 Feb 2020 00:32:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 734BE203A2; Tue, 4 Feb 2020 13:32:16 +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 BGRs+FC-kfSC; Tue, 4 Feb 2020 13:32:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3B88C203DF; Tue, 4 Feb 2020 13:32:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6BB631BF271 for ; Tue, 4 Feb 2020 13:32:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6890C84B65 for ; Tue, 4 Feb 2020 13:32:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id koH3-nyJRQn5 for ; Tue, 4 Feb 2020 13:32:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8D35B84B26 for ; Tue, 4 Feb 2020 13:32:11 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id y11so23055333wrt.6 for ; Tue, 04 Feb 2020 05:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wtPkA0y9AHFFY/+vn7zhIDrly1bgsl1StBkilyN0HbM=; b=efQA+D/ekyuHk2gDd4Fa51fuspW/Qa/MKaYaWyaMntt1bE+BnT+R2s5jGH4YXO6gd1 dvkdDYkAv9adGwHVjxphokkoaECf9xm79Aqx4j4JRgzGCaMS1aNBJYq2vNYeWMMa/3ux TrddaggMRVZqKK+wJZnJ/biZgIWiU8Wl9pEik5mghUXclYaYdGkpFPPQ07Eqc8NR6awl fsNKNft+xIe38iyGlH1ozg7BlBqevmnNt/1rYWpapwXwXi85o1skjecmv/WUR1IQf0QD kqmXx6qGkqiXGtUWJgBQdB4w1iD258r6WWfoNTYIDwjZ/zaCRiH8dwJyyqZMiNSfwTC6 JxbA== 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:mime-version:content-transfer-encoding; bh=wtPkA0y9AHFFY/+vn7zhIDrly1bgsl1StBkilyN0HbM=; b=WYwXCkuvWBOUse/kZ9/EfkqnZzMOngQNefwZgKBaQ0RSvod2b9SOWoq35gdFchUXmz hBUm2uhgD0UkO0D0fVph+Ka5mJAEP2fK2iy2r3wswtQCIQlYkpk1RffzXeYysBCVUkgk vC2OQdXAvuBvS5SMZViK8j0D+R3vGlj7jlRYj7thgGTQNHbkr8mvhiieiqAYHvGVJ6rI +0tYo0eHwwh0/DJLMmrPLx1MNEhvtCvg07600pfoi9KB2jSsS5qdId1z612r/uI9gaNp Z21vKMEBJVTWQk9DOkLa/BWg8gmaJ4qXBCJF0gvh3tusuUlMOLRxTI6IYhLWUAkQlMHw d7Fg== X-Gm-Message-State: APjAAAWCHhzngBfxCtPuouZqMHKeoZFtJFaJ8tW1I8IIiKnV08lQiNBn zzZzSH5zQdLryEs5zvOAjuIYxcKh+zIntA== X-Google-Smtp-Source: APXvYqy/7YH99aWjq+SAvYpxtAs0lO9bbnHw0A2qVfq3LNcXwDXZdwFWPMdacmFdJlgUphkZr4QnFg== X-Received: by 2002:a5d:4d4a:: with SMTP id a10mr23555445wru.220.1580823129748; Tue, 04 Feb 2020 05:32:09 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:463c:fbe1:fd20:7f18]) by smtp.gmail.com with ESMTPSA id o187sm4281901wme.36.2020.02.04.05.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 05:32:09 -0800 (PST) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 14:31:57 +0100 Message-Id: <20200204133157.10824-3-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204133157.10824-1-titouan.christophe@railnova.eu> References: <20200204133157.10824-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/norm: make wscript Python3 compatible 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: Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This makes slight modifications to the waf build definition files that make possible to compile norm with Waf running on Python3. This has been tested on my experimental Python3 waf-package infrastructure, and still works with the actual Py2 setup. Signed-off-by: Titouan Christophe --- ...ction-call-for-Python3-compatibility.patch | 29 +++++++++++++ ...ixed-tabs-spaces-in-protolib-wscript.patch | 41 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 package/norm/0002-Use-print-as-function-call-for-Python3-compatibility.patch create mode 100644 package/norm/0003-Fix-mixed-tabs-spaces-in-protolib-wscript.patch diff --git a/package/norm/0002-Use-print-as-function-call-for-Python3-compatibility.patch b/package/norm/0002-Use-print-as-function-call-for-Python3-compatibility.patch new file mode 100644 index 0000000000..945a9df48c --- /dev/null +++ b/package/norm/0002-Use-print-as-function-call-for-Python3-compatibility.patch @@ -0,0 +1,29 @@ +From 8c02c2cbc6f07ddaef23e6bf2f6b9a269ed85ff4 Mon Sep 17 00:00:00 2001 +From: Titouan Christophe +Date: Tue, 4 Feb 2020 11:59:07 +0100 +Subject: [PATCH] Use print as function call for Python3 compatibility + +A similar patch has already been applied upstream, in commit +ada15125a1cbb3b1718d6eef78512a36ed327fcc, which will therefore be +available in the next norm release + +Signed-off-by: Titouan Christophe +--- + wscript | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wscript b/wscript +index 8428899..0fdae96 100644 +--- a/wscript ++++ b/wscript +@@ -32,7 +32,7 @@ for line in vfile.readlines(): + if "#define" == line[0] and "VERSION" == line[1]: + VERSION = line[2].strip('"') + if VERSION is None: +- print "Warning: NORM VERSION not found!?" ++ print("Warning: NORM VERSION not found!?") + + # So you don't need to do ./waf configure if you are just using the defaults + waflib.Configure.autoconfig = True +-- +2.24.1 diff --git a/package/norm/0003-Fix-mixed-tabs-spaces-in-protolib-wscript.patch b/package/norm/0003-Fix-mixed-tabs-spaces-in-protolib-wscript.patch new file mode 100644 index 0000000000..e99f292d22 --- /dev/null +++ b/package/norm/0003-Fix-mixed-tabs-spaces-in-protolib-wscript.patch @@ -0,0 +1,41 @@ +From 0ff75628845d3c86974c31b50ecd60c0b0144c6d Mon Sep 17 00:00:00 2001 +From: Titouan Christophe +Date: Tue, 4 Feb 2020 13:44:27 +0100 +Subject: [PATCH] Fix mixed tabs/spaces in protolib wscript + +This fixes the following error when using waf in Python3: + TabError: inconsistent use of tabs and spaces in indentation + +The upstream file has since diverged, but with similar issues. +[Upstream status: https://github.com/USNavalResearchLaboratory/protolib/pull/6] + +Signed-off-by: Titouan Christophe +--- + protolib/wscript | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/protolib/wscript b/protolib/wscript +index 155a660..97dda93 100644 +--- a/protolib/wscript ++++ b/protolib/wscript +@@ -120,7 +120,7 @@ def configure(ctx): + # Compiler-specific flags + if ctx.options.debug: + #ctx.env.DEFINES_BUILD_PROTOLIB += ['PROTO_DEBUG', 'DEBUG', '_DEBUG'] +- ctx.env.DEFINES_BUILD_PROTOLIB += ['PROTO_DEBUG', 'DEBUG'] ++ ctx.env.DEFINES_BUILD_PROTOLIB += ['PROTO_DEBUG', 'DEBUG'] + else: + ctx.env.DEFINES_BUILD_PROTOLIB += ['NDEBUG', "PROTO_DEBUG"] + +@@ -139,7 +139,7 @@ def configure(ctx): + ctx.env.CFLAGS += ['/Od', '/RTC1', '/ZI'] + else: + ctx.env.CXXFLAGS += ['/Ox', '/DNDEBUG'] +- #ctx.env.CXXFLAGS += ['/Ox', '/DNDEBUG', '/DWINVER=0x0501'] ++ #ctx.env.CXXFLAGS += ['/Ox', '/DNDEBUG', '/DWINVER=0x0501'] + ctx.env.CFLAGS + + def build(ctx): +-- +2.24.1 +