Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "UNIX Shell similar to the Korn shell" |
| 2 | DESCRIPTION = "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." |
| 5 | HOMEPAGE = "http://www.zsh.org" |
| 6 | SECTION = "base/shell" |
| 7 | |
| 8 | LICENSE = "zsh" |
| 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec" |
| 10 | |
| 11 | DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native" |
| 12 | |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/5.8/${BP}.tar.xz \ |
| 14 | file://CVE-2021-45444_1.patch \ |
| 15 | file://CVE-2021-45444_2.patch \ |
| 16 | file://CVE-2021-45444_3.patch \ |
| 17 | " |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 18 | SRC_URI[sha256sum] = "dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 20 | inherit autotools-brokensep gettext update-alternatives manpages |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | |
| 22 | EXTRA_OECONF = " \ |
| 23 | --bindir=${base_bindir} \ |
| 24 | --enable-etcdir=${sysconfdir} \ |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 25 | --enable-fndir=${datadir}/${BPN}/${PV}/functions \ |
| 26 | --enable-site-fndir=${datadir}/${BPN}/site-functions \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 27 | --with-term-lib='ncursesw ncurses' \ |
| 28 | --with-tcsetpgrp \ |
| 29 | --enable-cap \ |
| 30 | --enable-multibyte \ |
| 31 | --disable-gdbm \ |
| 32 | --disable-dynamic \ |
| 33 | zsh_cv_shared_environ=yes \ |
| 34 | " |
| 35 | |
| 36 | # Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment |
| 37 | export bindir="${base_bindir}" |
| 38 | |
| 39 | EXTRA_OEMAKE = "-e MAKEFLAGS=" |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | ALTERNATIVE:${PN} = "sh" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" |
| 43 | ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}" |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 44 | ALTERNATIVE_PRIORITY = "90" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | |
| 46 | export AUTOHEADER = "true" |
| 47 | |
| 48 | do_configure () { |
| 49 | gnu-configize --force ${S} |
| 50 | oe_runconf |
| 51 | } |
| 52 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | pkg_postinst:${PN} () { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 54 | touch $D${sysconfdir}/shells |
| 55 | grep -q "bin/zsh" $D${sysconfdir}/shells || echo /bin/zsh >> $D${sysconfdir}/shells |
| 56 | grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells |
| 57 | } |
| 58 | |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 59 | # work around QA failures with usrmerge installing zsh in /usr/bin/zsh instead of /bin/zsh |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | # 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 III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 61 | # like bash does since https://git.openembedded.org/openembedded-core/commit/?id=4759408677a4e60c5fa7131afcb5bc184cf2f90a |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/zsh', '', d)}" |