blob: 0429cb9cc708e3bcbff8b24dba44cb8be357b0fa [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "UNIX Shell similar to the Korn shell"
2DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
3 powerful scripting language. Many of the useful features of bash, \
4 ksh, and tcsh were incorporated into zsh; many original features were added."
5HOMEPAGE = "http://www.zsh.org"
6SECTION = "base/shell"
7
8LICENSE = "zsh"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec"
10
11DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native"
12
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070013SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/5.8/${BP}.tar.xz"
14SRC_URI[sha256sum] = "dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27"
Brad Bishop316dfdd2018-06-25 12:45:53 -040015
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070016inherit autotools-brokensep gettext update-alternatives manpages
Brad Bishop316dfdd2018-06-25 12:45:53 -040017
18EXTRA_OECONF = " \
19 --bindir=${base_bindir} \
20 --enable-etcdir=${sysconfdir} \
21 --enable-fndir=${datadir}/${PN}/${PV}/functions \
22 --enable-site-fndir=${datadir}/${PN}/site-functions \
23 --with-term-lib='ncursesw ncurses' \
24 --with-tcsetpgrp \
25 --enable-cap \
26 --enable-multibyte \
27 --disable-gdbm \
28 --disable-dynamic \
29 zsh_cv_shared_environ=yes \
30"
31
32# Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment
33export bindir="${base_bindir}"
34
35EXTRA_OEMAKE = "-e MAKEFLAGS="
36
Patrick Williams213cb262021-08-07 19:21:33 -050037ALTERNATIVE:${PN} = "sh"
Brad Bishop316dfdd2018-06-25 12:45:53 -040038ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
39ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050040ALTERNATIVE_PRIORITY = "90"
Brad Bishop316dfdd2018-06-25 12:45:53 -040041
42export AUTOHEADER = "true"
43
44do_configure () {
45 gnu-configize --force ${S}
46 oe_runconf
47}
48
Patrick Williams213cb262021-08-07 19:21:33 -050049pkg_postinst:${PN} () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040050 touch $D${sysconfdir}/shells
51 grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells
52 grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
53}
54
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070055# work around QA failures with usrmerge installing zsh in /usr/bin/zsh instead of /bin/zsh
Patrick Williams213cb262021-08-07 19:21:33 -050056# 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]
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070057# like bash does since https://git.openembedded.org/openembedded-core/commit/?id=4759408677a4e60c5fa7131afcb5bc184cf2f90a
Patrick Williams213cb262021-08-07 19:21:33 -050058RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/zsh', '', d)}"