From patchwork Thu Sep 28 18:07:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 819708 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=) 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 3y32jv5LjPz9tX9 for ; Fri, 29 Sep 2017 04:08:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7C20088E7E; Thu, 28 Sep 2017 18:08:14 +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 j9gqhm85sGNA; Thu, 28 Sep 2017 18:08:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CE0DD89D92; Thu, 28 Sep 2017 18:08:12 +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 6754E1C0057 for ; Thu, 28 Sep 2017 18:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5F6168888C for ; Thu, 28 Sep 2017 18:08:11 +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 1c8VXxwaPPgp for ; Thu, 28 Sep 2017 18:08:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9A1A188888 for ; Thu, 28 Sep 2017 18:08:09 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 8662B160E7AB; Thu, 28 Sep 2017 15:07:44 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 76A35160E7A5; Thu, 28 Sep 2017 15:07:44 -0300 (BRT) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id goEH_kMAX25p; Thu, 28 Sep 2017 15:07:44 -0300 (BRT) Received: from PEDELD011457.datacom.net (unknown [172.31.206.21]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 09A37160E7A3; Thu, 28 Sep 2017 15:07:43 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Thu, 28 Sep 2017 15:07:56 -0300 Message-Id: <1506622076-21776-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.7.5 In-Reply-To: <20170928085957.04978e60@windsurf.lan> References: <20170928085957.04978e60@windsurf.lan> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH v2] dash: enable line editting if libedit is selected. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Otherwise, explicitly disable it, so that the configure script does not misdetect a system-installed libedit for example. Also, add a profile snippet enabling line editing, Emacs style. Change-Id: I68c6dbbafa95e266860329cb9c7ff5519fda5bf8 Signed-off-by: Carlos Santos --- package/dash/dash.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/package/dash/dash.mk b/package/dash/dash.mk index 72ef722..0098fad 100644 --- a/package/dash/dash.mk +++ b/package/dash/dash.mk @@ -10,6 +10,19 @@ DASH_SITE = http://gondor.apana.org.au/~herbert/dash/files DASH_LICENSE = BSD-3-Clause, GPL-2.0+ (mksignames.c) DASH_LICENSE_FILES = COPYING +# Enable line editing, Emacs style +define DASH_INSTALL_PROFILE + echo 'set -E' > $(TARGET_DIR)/etc/profile.d/dash.sh +endef + +ifeq ($(BR2_PACKAGE_LIBEDIT),y) +DASH_DEPENDENCIES += libedit +DASH_CONF_OPTS += --with-libedit +DASH_POST_INSTALL_TARGET_HOOKS += DASH_INSTALL_PROFILE +else +DASH_CONF_OPTS += --without-libedit +endif + define DASH_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash endef