From patchwork Sat Nov 8 13:54:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 408349 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 74B6F140079 for ; Sun, 9 Nov 2014 00:54:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 357B33338C; Sat, 8 Nov 2014 13:54:55 +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 vsqrZvHoxNIK; Sat, 8 Nov 2014 13:54:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 43EBF331B3; Sat, 8 Nov 2014 13:54:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4B93F1C2995 for ; Sat, 8 Nov 2014 13:54:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 47519922AF for ; Sat, 8 Nov 2014 13:54:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n0zFdI6HZ5sl for ; Sat, 8 Nov 2014 13:54:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.zacarias.com.ar (www.zacarias.com.ar [62.210.192.172]) by whitealder.osuosl.org (Postfix) with ESMTPS id D1A98922A6 for ; Sat, 8 Nov 2014 13:54:49 +0000 (UTC) Received: from asgard (cpe-186-23-17-245.telecentro-reversos.com.ar [186.23.17.245] (may be forged)) (authenticated bits=0) by www.zacarias.com.ar (8.14.9/8.14.9) with ESMTP id sA8DshGg004206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 8 Nov 2014 13:54:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1415454887; bh=dbaiKAUMyrVD1xiqVw5aHZuQ18iwUeoBsb4b1jCcheo=; h=From:To:Cc:Subject:Date; b=WKy5OTWvUDOSy6z0dcpiH0wRRxObhIbzD+QhjtMLZje7rTW/P24dEein1fanXtYXN yRvKJTQV3KWrK3trBKvX5PB39RPoNLyY4PI+1js5OwkX4yoZG+1UShlzKCp8pYibx+ oFbOmNPAKUdL5jUvMychmTe4/Gy3no/vy9tNa6OA= Received: by asgard (sSMTP sendmail emulation); Sat, 08 Nov 2014 10:54:37 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Sat, 8 Nov 2014 10:54:37 -0300 Message-Id: <1415454877-2710-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 2.0.4 X-Virus-Scanned: clamav-milter 0.98.4 at www X-Virus-Status: Clean Subject: [Buildroot] [PATCH] vim: install vi symlink 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" Install a 'vi' symlink to win over busybox vi (more features) and in case busybox isn't around, for people expecting plain simple 'vi' to call the editor. Signed-off-by: Gustavo Zacarias --- package/vim/vim.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/vim/vim.mk b/package/vim/vim.mk index e06af00..7a07ef8 100644 --- a/package/vim/vim.mk +++ b/package/vim/vim.mk @@ -8,7 +8,9 @@ VIM_SITE = https://vim.googlecode.com/hg VIM_SITE_METHOD = hg # 7.4 release patchlevel 333 VIM_VERSION = 8ae50e3ef8bf -VIM_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +# Win over busybox vi since vim is more feature-rich +VIM_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_PACKAGE_BUSYBOX),busybox) VIM_SUBDIR = src VIM_CONF_ENV = vim_cv_toupper_broken=no \ vim_cv_terminfo=yes \ @@ -40,6 +42,12 @@ define VIM_REMOVE_DOCS find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete endef +# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation +define VIM_INSTALL_VI_SYMLINK + ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi +endef +VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK + ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y) VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS