Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386339 - app-shells/ksh-93.20110208 version bump
Summary: app-shells/ksh-93.20110208 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 238906 338648
  Show dependency tree
 
Reported: 2011-10-08 14:46 UTC by Daniel Douglas
Modified: 2012-02-13 04:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Douglas 2011-10-08 14:46:11 UTC
ksh93u has been around for a while. Newest sources are from "2011-02-08"

http://www2.research.att.com/~gsf/cgi-bin/download.cgi?action=list&name=ast-ksh
Comment 1 Daniel Douglas 2011-10-11 18:04:34 UTC
Just a few changes. I'm not sure if versionator can be used here, but instead of hardcoding $RELEASE:

if [[ $PV =~ ([0-9]{4})([0-9]{2})([0-9]{2}) ]]; then                                                                                                                                                                                                                           
    printf -v RELEASE '%s-%s-%s' "${BASH_REMATCH[@]:1}"                                                                                                                                                                                                                        
else                                                                                                                                                                                                                                                                           
    die                                                                                                                                                                                                                                                                        
fi

And for the license under src_install:

dodoc lib/package/LICENSES/cpl

The old file no longer exists.
Comment 2 Fabian Groffen gentoo-dev 2011-12-27 16:38:33 UTC
I wasted an entire day on this stupid package in vain, in case someone wants to reuse the work done on the ebuild:

% cat ksh-93.20110208.ebuild
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit flag-o-matic toolchain-funcs

RELEASE="2011-02-08"

DESCRIPTION="The Original Korn Shell, 1993 revision (ksh93u)"
HOMEPAGE="http://www.kornshell.com/"
SRC_URI="mirror://gentoo/INIT.${RELEASE}.tgz
        mirror://gentoo/ast-ksh.${RELEASE}.tgz"

LICENSE="CPL-1.0"
SLOT="0"
KEYWORDS="~x86-interix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
IUSE=""

DEPEND="!app-shells/pdksh"
RDEPEND=""

S=${WORKDIR}

src_unpack() {
        # the AT&T build tools look in here for packages.
        mkdir -p "${S}"/lib/package/tgz

        # move the packages into place.
        cp "${DISTDIR}"/ast-ksh.${RELEASE}.tgz "${S}"/lib/package/tgz/ || die

        # INIT provides the basic tools to start building.
        unpack INIT.${RELEASE}.tgz

        # `package read` will unpack any tarballs put in place.
        sh "${S}"/bin/package read || die
}

src_prepare() {
        # run through /bin/sh due to #294817
        # don't prefer broken old ksh versions
        sed -i \
                -e '1i#!/bin/sh' \
                -e 's/for i in ksh sh bash/for i in bash sh ksh/' \
                "${S}"/bin/package "${S}"/src/cmd/INIT/package.sh || die

        # use Prefix' config files
        sed -i \
                -e "/\(e_defedit\|e_sysprofile\|e_suidprofile\|e_sysrc\|e_bash_sysrc\)/s:= \":= \"${EPREFIX}:" \
                src/cmd/ksh93/data/msg.c || die
}

src_compile() {
        sh bin/package only make ast-ksh SHELL=${CONFIG_SHELL:-${BASH}} \
                HOSTTYPE="$(uname),$(tc-getCC)" CCFLAGS="${CFLAGS}" LD="$(tc-getCC)" || die
}

src_install() {
        exeinto /bin

        doexe "${S}"/arch/$(uname),$(tc-getCC)/bin/ksh || die

        newman "${S}"/arch/$(uname),$(tc-getCC)/man/man1/sh.1 ksh.1

        dohtml lib/package/ast-ksh.html
}
Comment 3 Daniel Douglas 2011-12-28 04:17:13 UTC
Preferably the ebuild could do some extra setup similar to Bash. E.g.: a dosym to  create the symlink for "rksh", and adjusting to the different way ksh handles user profiles. Really doing this properly would probably require reverse engineering and replicating the functionality of that nasty "${S}/bin/package" script.

I just setup DIR_COLORS in ~/.kshrc for now:

if whence -p dircolors >/dev/null ; then
    if [[ -f ~/.dir_colors ]] ; then
        eval ${ dircolors -b ~/.dir_colors;}
    elif [[ -f /etc/DIR_COLORS ]] ; then
        eval ${ dircolors -b /etc/DIR_COLORS;}
    fi
fi

Testing versions are hidden away over here: http://www2.research.att.com/sw/download/beta/
Comment 4 Pacho Ramos gentoo-dev 2012-02-09 11:54:37 UTC
(In reply to comment #2)
> I wasted an entire day on this stupid package in vain, in case someone wants to
> reuse the work done on the ebuild:
> 

Maybe we should treeclean this is nobody is willing to maintain this (or proxy-maintain it...)
Comment 5 Daniel Douglas 2012-02-11 02:38:43 UTC
The versions in the tree aren't broken or horribly outdated. I'd leave it if there are no serious pending bugs aside from lack of maintainer.
Comment 6 Mike Gilbert gentoo-dev 2012-02-11 03:46:48 UTC
I'll see what I can do with this.
Comment 7 Mike Gilbert gentoo-dev 2012-02-13 03:45:44 UTC
I bumped to the latest official version.

Can you file a separate bug for any improvements you would like to see?
Comment 8 Daniel Douglas 2012-02-13 04:36:16 UTC
Thanks Mike, You're too quick, and inspired me to try finishing what I'd started shortly before noticing the commit land in RSS. Looks like You've already noticed the Eclipse license change. Will report if I can think of anything useful to add. It looks like the next release is nearing completion as well.

If it would be helpful, I'd be happy to proxy maintain this. I follow the AST mailing lists and use this shell in my daily work about as extensively as Bash.