[package] mksh: update to 40d

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31186 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-04-04 14:13:46 +00:00
parent d1a7b7bc4c
commit 7b9859cfc8
2 changed files with 23 additions and 24 deletions

View File

@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mksh PKG_NAME:=mksh
PKG_VERSION:=39 PKG_VERSION:=40d
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).cpio.gz PKG_SOURCE:=$(PKG_NAME)-R$(PKG_VERSION).cpio.gz
PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh PKG_SOURCE_URL:=http://www.mirbsd.org/MirOS/dist/mir/mksh
PKG_MD5SUM:=b2eeb4fe4ccac2704e1440e53cd2672c PKG_MD5SUM:=c6428401103367730a95b99284bf47dc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@ -35,13 +35,14 @@ milar to the original AT&T Korn shell; mksh is the only pdksh
derivate currently being actively developed. It includes bug derivate currently being actively developed. It includes bug
fixes and feature improvements, in order to produce a modern, fixes and feature improvements, in order to produce a modern,
robust shell good for interactive and especially script use. robust shell good for interactive and especially script use.
mksh has UTF-8 support (e.g. in the emacs editing mode); R38c mksh has UTF-8 support (in substring operations and the Emacs
corresponds to OpenBSD 4.5-current ksh (without GNU bash-like editing mode) and, while R40d corresponds to OpenBSD 5.0-cur-
$PS1 and fancy character classes). The code has throughoutly rent ksh (without GNU bash-like PS1 and fancy character clas-
ses), adheres to SUSv4 and is much more robust. The code has
been cleaned up and simplified, bugs fixed, standards compli- been cleaned up and simplified, bugs fixed, standards compli-
ance added, and several enhancements (for extended compatibi- ance added, and several enhancements (for extended compatibi-
lity to other modern shells - as well as a couple of its own) lity to other modern shells - as well as a couple of its own)
have been placed. are available. It has sensible defaults as usual with BSD.
endef endef
define Build/Compile define Build/Compile
@ -50,17 +51,14 @@ define Build/Compile
# UTF-8 mode, neither use setlocale/nl_langinfo # UTF-8 mode, neither use setlocale/nl_langinfo
# nor look at $LC_* and $LANG (not recommended) # nor look at $LC_* and $LANG (not recommended)
# HAVE_CAN_FSTACKPROTECTORALL=0 ⇒ nuke libssp dependency # HAVE_CAN_FSTACKPROTECTORALL=0 ⇒ nuke libssp dependency
# HAVE_REALPATH=x ⇒ add the realpath builtin, which was
# disabled by MKSH_SMALL, back if realpath() exists
cd $(PKG_BUILD_DIR); \ cd $(PKG_BUILD_DIR); \
CC="$(TARGET_CC)" \ CC="$(TARGET_CC)" \
TARGET_OS="$(shell uname -s)" \ TARGET_OS="$(shell uname -s)" \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0" \ CPPFLAGS="-DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=0" \
HAVE_CAN_FSTACKPROTECTORALL=0 \ HAVE_CAN_FSTACKPROTECTORALL=0 \
HAVE_REALPATH=x \
LDFLAGS="$(TARGET_LDFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \
$(BASH) Build.sh -Q -r $(BASH) Build.sh -Q -r -c lto
endef endef
define Package/mksh/postinst define Package/mksh/postinst

View File

@ -2,36 +2,37 @@ $Id$
• Part of the FreeWRT patches: • Part of the FreeWRT patches:
no hostname(1) no hostname(1)
ls has no -o ls(1) has no -o option
• OpenWrt fix: • OpenWrt and FreeWRT-1.0 fix:
since this is not ~/.mkshrc make sure subshells find it since this is not ~/.mkshrc make sure subshells find it
--- a/dot.mkshrc --- a/dot.mkshrc Sat Nov 26 18:15:38 2011
+++ b/dot.mkshrc +++ b/dot.mkshrc Sun Dec 11 21:31:27 2011
@@ -20,7 +20,7 @@ @@ -21,7 +21,7 @@
#- #-
# ~/.mkshrc: mksh initialisation file for interactive shells # ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells
-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)} -: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)} +: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
[[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-) [[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
: ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi : ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi
function precmd { function precmd {
@@ -38,7 +38,7 @@ unalias ls @@ -40,7 +40,7 @@ unalias ls
alias l='ls -F' alias l='ls -F'
alias la='l -a' alias la='l -a'
alias ll='l -l' alias ll='l -l'
-alias lo='l -alo' -alias lo='l -alo'
+alias lo='l -al' +alias lo='l -al'
alias which='whence -p'
whence -p rot13 >&- || alias rot13='tr \ whence -p rot13 >&- || alias rot13='tr \
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
@@ -304,4 +304,8 @@ function Lstripcom { nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
done; } @@ -365,5 +365,9 @@ alias cls='print -n \\033c'
} #export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
unset p
+
+# we need this in OpenWrt for subshells that are not login shells +# we need this in OpenWrt for subshells that are not login shells
+: ${ENV=/etc/mkshrc} +: ${ENV=/etc/mkshrc}
+[[ -z $ENV ]] || export ENV +[[ -z $ENV ]] || export ENV
+
: place customsations above this line : place customisations above this line