[packages] mksh: update to r47
authorLuka Perkov <luka@openwrt.org>
Sun, 28 Jul 2013 23:28:21 +0000 (23:28 +0000)
committerLuka Perkov <luka@openwrt.org>
Sun, 28 Jul 2013 23:28:21 +0000 (23:28 +0000)
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Recommended-by: Sedat Dilek <sedat.dilek@gmail.com>
SVN-Revision: 37593

utils/mksh/Makefile
utils/mksh/patches/000-debian_build_fix.patch [deleted file]
utils/mksh/patches/100-dot_mkshrc

index 27a2801886ec1883c50c1073e9eed29d64e1849c..66e8e63a2b90f2403091dfa568ca9ecbd91c678b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2007-2011 OpenWrt.org
 #
 # Copyright (C) 2007-2011 OpenWrt.org
-# Copyright (c) 2009 Thorsten Glaser <tg@mirbsd.org>
+# Copyright (c) 2009-2013 Thorsten Glaser <tg@mirbsd.org>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mksh
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mksh
-PKG_VERSION:=40d
+PKG_VERSION:=47
 PKG_RELEASE:=1
 
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).cpio.gz
+PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh
 PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh
-PKG_MD5SUM:=c6428401103367730a95b99284bf47dc
+PKG_MD5SUM:=71c7cbcd78306897801b8b6691091e66
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
@@ -36,9 +36,9 @@ derivate currently being actively developed.  It includes bug
 fixes and feature improvements, in order to produce a modern,
 robust shell good for interactive and especially script use.
 mksh has UTF-8 support (in substring operations and the Emacs
 fixes and feature improvements, in order to produce a modern,
 robust shell good for interactive and especially script use.
 mksh has UTF-8 support (in substring operations and the Emacs
-editing mode) and, while R40d corresponds to OpenBSD 5.0-cur-
+editing mode) and - while R47 corresponds to OpenBSD 5.1-cur-
 rent ksh (without GNU bash-like PS1 and fancy character clas-
 rent ksh (without GNU bash-like PS1 and fancy character clas-
-ses), adheres to SUSv4 and is much more robust.  The code has
+ses) - adheres to SUSv4 and is much more robust. The code has
 been cleaned up and simplified, bugs fixed, standards compli-
 ance added, and several enhancements (for extended compatibi-
 lity to other modern shells - as well as a couple of its own)
 been cleaned up and simplified, bugs fixed, standards compli-
 ance added, and several enhancements (for extended compatibi-
 lity to other modern shells - as well as a couple of its own)
@@ -55,7 +55,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                TARGET_OS="$(shell uname -s)" \
                CFLAGS="$(TARGET_CFLAGS)" \
                CC="$(TARGET_CC)" \
                TARGET_OS="$(shell uname -s)" \
                CFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0 -DMKSH_GCC565048=1" \
+               CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0" \
                HAVE_CAN_FSTACKPROTECTORALL=0 \
                LDFLAGS="$(TARGET_LDFLAGS)" \
                        $(BASH) Build.sh -Q -r -c lto
                HAVE_CAN_FSTACKPROTECTORALL=0 \
                LDFLAGS="$(TARGET_LDFLAGS)" \
                        $(BASH) Build.sh -Q -r -c lto
diff --git a/utils/mksh/patches/000-debian_build_fix.patch b/utils/mksh/patches/000-debian_build_fix.patch
deleted file mode 100644 (file)
index b64fe71..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch is a backport of the fix proposed at:
-https://bugs.launchpad.net/ubuntu/+source/mksh/+bug/1058035
-
-diff -urN mksh/Build.sh mksh.new/Build.sh
---- mksh/Build.sh      2012-12-11 14:28:56.632807230 +0100
-+++ mksh.new/Build.sh  2012-12-11 14:35:23.704817141 +0100
-@@ -1530,9 +1530,11 @@
- /* but the next three are; we REQUIRE signed integer wraparound */
- cta(ari_is_signed, (mksh_ari_t)-1 < (mksh_ari_t)0);
- cta(ari_has_31_bit, 0 < (mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 1));
-+#if !defined(MKSH_GCC565048)
- cta(ari_sign_32_bit_and_wrap,
-     (mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 1) >
-     (mksh_ari_t)(((((mksh_ari_t)1 << 15) << 15) - 1) * 2 + 2));
-+#endif
- /* the next assertion is probably not really needed */
- cta(uari_is_4_char, sizeof(mksh_uari_t) == 4);
- /* but the next four are; we REQUIRE unsigned integer wraparound */
index f326ae744ce3219c5224c936d8a830deeb1755f1..7cdd162fca0c9f70e6258c9d67cd5d908eee23b2 100644 (file)
@@ -1,38 +1,50 @@
-$Id$
+From 2bee59bb9e6b142a78c94f5e77a54e4e2366c1b8 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@freewrt.org>
+Date: Thu, 25 Jul 2013 22:07:33 +0200
+Subject: [PATCH] Make default mkshrc file suitable for OpenWrt environment:
 
 
-       • Part of the FreeWRT patches:
-         – no hostname(1)
-         – ls(1) has no -o option
-       • OpenWrt and FreeWRT-1.0 fix:
-         – since this is not ~/.mkshrc make sure subshells find it
+* Part of the FreeWRT patches:
+  - no hostname(1)
+  - ls(1) has no -o option
+* OpenWrt and FreeWRT-1.0 fix:
+  - since this is not ~/.mkshrc make sure subshells find it
+---
+ dot.mkshrc | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
 
 
---- a/dot.mkshrc       Sat Nov 26 18:15:38 2011
-+++ b/dot.mkshrc       Sun Dec 11 21:31:27 2011
-@@ -21,7 +21,7 @@
- #-
- # ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells
+diff --git a/dot.mkshrc b/dot.mkshrc
+index c10b8fd..3a389b2 100644
+--- a/dot.mkshrc
++++ b/dot.mkshrc
+@@ -28,8 +28,8 @@ case $KSH_VERSION in
+ *) return 0 ;;
+ esac
  
  
--: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
-+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
- [[ $HOSTNAME = @(localhost|*([         ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
- : ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi
- function precmd {
-@@ -40,7 +40,7 @@ unalias ls
+-PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(ulimit -c 0; hostname -s \
+-    2>/dev/null)} = *([        ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \
++PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(</proc/sys/kernel/hostname
++    )} = *([   ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \
+     2>/dev/null); : ${EDITOR:=/bin/ed} ${HOSTNAME:=nil} ${TERM:=vt100}
+ : ${MKSH:=$(whence -p mksh)}; PS4='[$EPOCHREALTIME] '; PS1=$'\001\r''${|
+       local e=$?
+@@ -50,7 +50,7 @@ unalias ls
  alias l='ls -F'
  alias la='l -a'
  alias ll='l -l'
 -alias lo='l -alo'
 +alias lo='l -al'
  alias l='ls -F'
  alias la='l -a'
  alias ll='l -l'
 -alias lo='l -alo'
 +alias lo='l -al'
- whence -p rot13 >&- || alias rot13='tr \
+ alias doch='fc -ln -1 | sudo mksh -s'
+ whence -p rot13 >/dev/null || alias rot13='tr \
      abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
      abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
-     nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
-@@ -365,5 +365,9 @@ alias cls='print -n \\033c'
- #export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
+@@ -413,4 +413,8 @@ alias cls='print -n \\033c'
  
  unset p
  
  unset p
-+
 +# we need this in OpenWrt for subshells that are not login shells
 +: ${ENV=/etc/mkshrc}
 +[[ -z $ENV ]] || export ENV
 +# we need this in OpenWrt for subshells that are not login shells
 +: ${ENV=/etc/mkshrc}
 +[[ -z $ENV ]] || export ENV
++
  : place customisations above this line
  : place customisations above this line
+-- 
+1.8.3.2
+