1*4882a593SmuzhiyunSUMMARY = "UNIX Shell similar to the Korn shell" 2*4882a593SmuzhiyunDESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \ 3*4882a593Smuzhiyun powerful scripting language. Many of the useful features of bash, \ 4*4882a593Smuzhiyun ksh, and tcsh were incorporated into zsh; many original features were added." 5*4882a593SmuzhiyunHOMEPAGE = "http://www.zsh.org" 6*4882a593SmuzhiyunSECTION = "base/shell" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunLICENSE = "zsh" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec" 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunDEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native" 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/5.8/${BP}.tar.xz \ 14*4882a593Smuzhiyun file://CVE-2021-45444_1.patch \ 15*4882a593Smuzhiyun file://CVE-2021-45444_2.patch \ 16*4882a593Smuzhiyun file://CVE-2021-45444_3.patch \ 17*4882a593Smuzhiyun " 18*4882a593SmuzhiyunSRC_URI[sha256sum] = "dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27" 19*4882a593Smuzhiyun 20*4882a593Smuzhiyuninherit autotools-brokensep gettext update-alternatives manpages 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunEXTRA_OECONF = " \ 23*4882a593Smuzhiyun --bindir=${base_bindir} \ 24*4882a593Smuzhiyun --enable-etcdir=${sysconfdir} \ 25*4882a593Smuzhiyun --enable-fndir=${datadir}/${PN}/${PV}/functions \ 26*4882a593Smuzhiyun --enable-site-fndir=${datadir}/${PN}/site-functions \ 27*4882a593Smuzhiyun --with-term-lib='ncursesw ncurses' \ 28*4882a593Smuzhiyun --with-tcsetpgrp \ 29*4882a593Smuzhiyun --enable-cap \ 30*4882a593Smuzhiyun --enable-multibyte \ 31*4882a593Smuzhiyun --disable-gdbm \ 32*4882a593Smuzhiyun --disable-dynamic \ 33*4882a593Smuzhiyun zsh_cv_shared_environ=yes \ 34*4882a593Smuzhiyun" 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun# Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment 37*4882a593Smuzhiyunexport bindir="${base_bindir}" 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunEXTRA_OEMAKE = "-e MAKEFLAGS=" 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunALTERNATIVE:${PN} = "sh" 42*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" 43*4882a593SmuzhiyunALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" 44*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "90" 45*4882a593Smuzhiyun 46*4882a593Smuzhiyunexport AUTOHEADER = "true" 47*4882a593Smuzhiyun 48*4882a593Smuzhiyundo_configure () { 49*4882a593Smuzhiyun gnu-configize --force ${S} 50*4882a593Smuzhiyun oe_runconf 51*4882a593Smuzhiyun} 52*4882a593Smuzhiyun 53*4882a593Smuzhiyunpkg_postinst:${PN} () { 54*4882a593Smuzhiyun touch $D${sysconfdir}/shells 55*4882a593Smuzhiyun grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells 56*4882a593Smuzhiyun grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells 57*4882a593Smuzhiyun} 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun# work around QA failures with usrmerge installing zsh in /usr/bin/zsh instead of /bin/zsh 60*4882a593Smuzhiyun# ERROR: QA Issue: /usr/share/zsh/5.8/functions/zed contained in package zsh requires /bin/zsh, but no providers found in RDEPENDS:zsh? [file-rdeps] 61*4882a593Smuzhiyun# like bash does since https://git.openembedded.org/openembedded-core/commit/?id=4759408677a4e60c5fa7131afcb5bc184cf2f90a 62*4882a593SmuzhiyunRPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/zsh', '', d)}" 63