[From nobody Thu Jun 25 05:55:19 2020
Received: from mail-vs1-xe44.google.com ([2607:f8b0:4864:20::e44])
 by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux))
 id 1hvB3s-0002LZ-DZ
 for openwrt-devel@lists.openwrt.org; Wed, 07 Aug 2019 01:48:21 +0000
Received: by mail-vs1-xe44.google.com with SMTP id v129so59623653vsb.11
 for &lt;openwrt-devel@lists.openwrt.org&gt;; Tue, 06 Aug 2019 18:48:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=googlemail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=lBHQEC5VCy2/3HKMMeLDfXwYhwz1BynFDCPkG6isy1k=;
 b=KGcbhygsXfaQoN6GiF4NaaPt0zfIk0tMcRfLRaZmvi0Jwl7oCkjZRp4W8HDgyjUnYo
 JqRHgZPHxc1TfY4rOOlgj+tSkBfagagrkU1bT3aVfQQasONTrF0qBOBRgJ1VfZiP9zYo
 RnAx8vBjosqlMD8Xsc+3slHYBUolIEo6a4SC3JM8ZJ/WNzkEzR3SnsVjwsRKdx/Fbpje
 xNBKMD1huYCIU+zLyNUJ2G3/oObjltb/XK/OhrVGugM6MdEWd1zBg4gmaYgWKRh9KH6Z
 Zvmn7LoB1C5brMK6qFAyPdkFUOu6OSeJxpq0Pjdp1ln+RK/Y95FA8RH94zVva1/1kaYG
 sFiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=lBHQEC5VCy2/3HKMMeLDfXwYhwz1BynFDCPkG6isy1k=;
 b=IvGmwLQNyKiZwu1GP0MwV6l8Ah059QZ8k0EeEI3Y+DLvrAUA2bfjmIZOevWHgqycMe
 cE8ZWVPJn2MEXQBY6E9J78gQ45qXRDoKBAO2RS4kJ0n61b4/v/GbTB8Vi2wjueMG5cg5
 o2ljWEuyQGXZ34c0/z0oh7L4X36L11LbUYFTA0vON3FXucDCvY9AO6dUxD2U7Dc9Mkt1
 /3fBoaLH/DeSMIqBaptSWp3yGF2v/YytAlQ0S63+7/ndrJsDaujE6vVcLRPAA8U3U6qZ
 C7uYBl1EwdDKBKzXyZZVZIUaKMrGG0oK150aHPdDk6oJTEDYsNE+FvYRIYkozMc44t5q
 wkDQ==
X-Gm-Message-State: APjAAAVYMl/DZOE1ecdzehQTq1Fbmi6DICk3uEjVvt3sPhRqLwuSP/bV
 KaQWufhDwzm32wWJj3pv/hSyPgalDRpwfd25NDgAuQj++RI=
X-Google-Smtp-Source: APXvYqy4glIPq5y5ys65OF5RoX2UqE7ZN/71Dy4S+AgwwpwJoZOcZTfZ8qde6PkYCldCxoxs6FpiqOmYGM6KqhfOtak=
X-Received: by 2002:a67:eb12:: with SMTP id a18mr4460899vso.119.1565142498381; 
 Tue, 06 Aug 2019 18:48:18 -0700 (PDT)
MIME-Version: 1.0
From: Thomas Albers &lt;thomas.gameiro@googlemail.com&gt;
Date: Tue, 6 Aug 2019 20:48:07 -0500
Message-ID: &lt;CALYGOBU51HmRrwJGmYUxhcYJCg8OOSEUOo+7=T-nuJLk9XnSmQ@mail.gmail.com&gt;
Subject: [PATCH 1/2] fix make kernel_menuconfig
To: openwrt-devel@lists.openwrt.org
Content-Type: text/plain; charset=&quot;UTF-8&quot;
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20190806_184820_479485_1C2CFE12 
X-CRM114-Status: UNSURE (   6.50  )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-0.2 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2607:f8b0:4864:20:0:0:0:e44 listed in]
 [list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (thomas.gameiro[at]googlemail.com)
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
 valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
 author's domain
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from
 envelope-from domain

Hello!

This is part 1 of a patch to fix issue 2423 in Flyspray,
kernel_menuconfig not working. This is not an upstream bug, it is due
to the toolchain missing ncurses. make menuconfig relies on the
/system's/ installation of ncurses, but make kernel_menuconfig invokes
the /toolchain's/ ncurses. ncurses is missing, consequently the
kconfig script can't be linked against it.

This fixes pkg-config in the toolchain. Previously, pkg-config would
expand an environment variable $STAGING_PREFIX, which is not defined,
consequently the attempts variable assignmetn would cause pkg-config
to fail with an error. Right now, anything relying on pkg-config works
only because of sensible defaults and good fortune.

Signed-off-by: Thomas Albers &lt;thomas.gameiro@gmail.com&gt;

diff --git a/tools/pkg-config/files/pkg-config
b/tools/pkg-config/files/pkg-config
index 82cc74ffcb..b36a8c62f5 100755
--- a/tools/pkg-config/files/pkg-config
+++ b/tools/pkg-config/files/pkg-config
@@ -1,3 +1,3 @@
 #!/bin/sh

-pkg-config.real --define-variable=prefix=${STAGING_PREFIX}
--define-variable=exec_prefix=${STAGING_PREFIX}
--define-variable=bindir=${STAGING_PREFIX}/bin $@
+pkg-config.real --define-variable=prefix=${STAGING_DIR_HOST}
--define-variable=exec_prefix=${STAGING_DIR_HOST}
--define-variable=bindir=${STAGING_DIR_HOST}/bin $@

]