mksh-57.ebuild (1188B)
1 # Copyright 1999-2019 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=6 5 6 inherit eutils toolchain-funcs 7 8 if [[ $PV = 9999 ]]; then 9 inherit cvs 10 ECVS_SERVER="anoncvs.mirbsd.org:/cvs" 11 ECVS_MODULE="mksh" 12 ECVS_USER="_anoncvs" 13 ECVS_AUTH="ext" 14 KEYWORDS="" 15 else 16 SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz" 17 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" 18 fi 19 20 DESCRIPTION="MirBSD Korn Shell" 21 HOMEPAGE="http://mirbsd.de/mksh" 22 LICENSE="BSD" 23 SLOT="0" 24 IUSE="static +lksh" 25 DEPEND="static? ( dev-libs/klibc )" 26 RDEPEND="" 27 S="${WORKDIR}/${PN}" 28 29 src_compile() { 30 tc-export CC 31 # we want to build static with klibc 32 if use static; then export CC="/usr/bin/klcc"; export LDSTATIC="-static"; fi 33 export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\"" 34 35 # Note: lksh should be used as a replacement to /bin/sh instead of mksh 36 if use lksh 37 then 38 export CPPFLAGS="${CPPFLAGS} -DMKSH_BINSHPOSIX -DMKSH_BINSHREDUCED" 39 sh Build.sh -r -L || die 40 fi 41 42 sh Build.sh -r || die 43 } 44 45 src_install() { 46 exeinto /bin 47 use lksh && doexe lksh 48 doexe mksh 49 doman mksh.1 50 dodoc dot.mkshrc 51 } 52 53 src_test() { 54 ./test.sh -v || die 55 }